Re: ColdFusion 9 on Java 8

2015-03-12 Thread Dan G. Switzer, II

You may find the jump from CF9 to CF10/11 to require changes to your app. I
know the change for us was not straightforward. Make sure you plan for an
extensive QA cycle after upgrading. One of the biggest issues we ran into
was with date/time conversions. We store everything in UTC. Adobe changed
the internals of the way that dates converted to UTC work that can cause
issues with some types of date mathematical operations (like using the
results of a createTimeSpan() to adjust a date.) We found a number of
things that made our upgrade from CF9 to CF10 slow.

On Thu, Mar 12, 2015 at 10:59 AM, Scott Stewart webmas...@sstwebworks.com
wrote:


 Wil, that's what I'm pushing for. The powers that be having been dragging
 their feet on upgrading. This may be just the thing to push them over.

 On Thu, Mar 12, 2015 at 10:48 AM, Wil Genovese jugg...@trunkful.com
 wrote:

 
  Unless I missed it, Adobe has not certified ColdFusion 9.0.x on Java 8.
  — Remember this as I continue
 
  Also, Adobe ColdFusion 9.x.x reached End Of Life back on December 31st,
  2014.
 
 http://www.trunkful.com/index.cfm/2014/11/24/ColdFusion-9-Reaches-End-Of-Life-Long-Live-ColdFusion
   — Remember this too
 
  Now, that I got those two items out of the way I will say that while
  researching and testing ColdFusion potential POODLE issues via CFHTTP I
 did
  happen to successfully attempt to run ColdFusion 9.0.2 fully patched on
  Java 1.8. (This blog post BTW:
 
 http://www.trunkful.com/index.cfm/2014/12/8/Preventing-SSLv3-Fallback-in-ColdFusion
  - The note at the bottom)
 
  There were no errors or warnings. I was able to run some code. I by no
  means tried to test all the functionality because I had a different goal
 to
  achieve when I was doing my research.
 
  So it could very well be possible. However I do have another concern. The
  company/agency you’re working for is requiring Java to be up to date, but
  not ColdFusion? I would embrace the Java 8 upgrade and say then we need
 to
  buy ColdFusion 11 and make the migration.  (IMHO)
 
  Regards,
  Wil
 
 
 
  Wil Genovese
  Sr. Web Application Developer/
  Systems Administrator
  CF Webtools
  www.cfwebtools.com
 
  wilg...@trunkful.com
  www.trunkful.com
 
   On Mar 12, 2015, at 9:37 AM, Scott Stewart webmas...@sstwebworks.com
  wrote:
  
  
   This is googleable uhmmm.. thanks Captain Obvious, here's your cape
 :P
  
   From what I was able to dig up ColdFusion 9 is a no go with Java 8.
 There
   are hotfixes available for 10 and 11... of course there's always
   Railo/Lucee ..
  
   On Thu, Mar 12, 2015 at 10:16 AM, Eric Roberts 
   ow...@threeravensconsulting.com wrote:
  
  
   This is googleable...i was just looking for a similar solution with
   10...you ar going to have to move several files from the sdk jre
   directory...one is tools.jar and msvcr1000.dll (I think)...you also
  have to
   change the java home setting in cfadmin to the jre directory in the
 sdk
  as
   well.  Charlie Airheart has a page that describes pretty much
 everything
   you need to know.  I don;t have the link handy, but I am sure you can
   easily find it via google.
  
   Eric
  
   On Thu, Mar 12, 2015 at 8:07 AM, Scott Stewart 
  webmas...@sstwebworks.com
   wrote:
  
  
   Oracle is EOL'ing Java 7 in February. The agency that I work for is
  going
   to require upgrades to Java 8.
  
   Does anyone know definitively whether or not ColdFusion 9 will work
 on
   Java
   8. We are in deep poop if it doesn't.
  
   Thanks
  
   sas
  
   --
   --
   Scott Stewart
   Adobe Certified Instructor, ColdFusion 8  9
   Adobe Certified Expert, ColdFusion 8  9
  
   Blog: http://www.sstwebworks.com
   Email: webmas...@sstwebworks.com
  
  
  
  
  
  
  
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360254
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Advise in optimizing an application

2014-11-15 Thread Dan G. Switzer, II

You need to turn use some debugging tools to help you identify the key
culprits. For example, if your query to check if a user has unsubscribed is
taking 500ms, that alone would be the reason for the slowness.

Either use the step debugger, a tool like FusionReactor or just turn on
verbose debugging output, so you can understand your current bottleneck.

It's very possible you have some inefficiencies in some of your SQL lookups
(do to missing indexes, etc) that would cause slowness over lots of loops.

You might look into using Java libs to read in the Excel file more
efficiently.

On Saturday, November 15, 2014, Les Mizzell lesm...@bellsouth.net wrote:


 Evening,

 I'm still fighting with my Excel Import application a bit. Basically, it
 works pretty well, as long as there's a limited number of records being
 imported.
 Problem is, the client tried to import a list with almost 15,000
 addresses today, and it eventually timed out or the server reset the
 connection before it finished the import. Then my phone rings...

 The app does several things:
 1. Import 4 columns from an excel sheet [email][first name][last
 name][company] into an array
 2. Check the email address to see if it's valid. If not, delete that row
 from the array
 3. Check the email address to see if it's been previously unsubscribed
 from the list and delete that row from the array
 4. Check the list against other email addresses already in the database
 for that list, and delete that row so as to not import it if it's
 already there.
 5. After all that, write the record

 Running some test with the 15,000 address sheet
 Reading the Excel sheet in and running steps 1 through 4 above is taking
 well over 10 minutes by itself.
 Writing the record after that, enough extra time to be sure it borks up.
 Smaller list (several hundred addresses) seem to import fine - MUCH
 faster than the former POI based app.

 So my question is - I need to optimize something somewhere to cut down
 CPU cycles and increase efficiency.
 The client uses this thing multiple times every day.

 Some of the code is from an example by Raymond Camden. Thanks Raymond.
 Full app below.
 Where are my major bottlenecks and what can I do about them?


 

 cftry
 cfset theISSUE = true /
 cfif structKeyExists(form, email_list) and len(form.email_list)

 !--- Each mail list has to belong to a group:
   1. If a New Group - add to groups table and get ID---
 cfif IsDefined(form.newGROUP) AND #form.newGROUP# NEQ 
 cfquery name=addGROUP datasource = #req.datasource#
 username=#username#  password=#password#
 SET NOCOUNT ON
 INSERT into nl_groupLIST ( mgroup,status ) values ( cfqueryparam
 value=#trim(form.newGROUP)# cfsqltype=CF_SQL_VARCHAR ,'act' )
 SELECT @@IDENTITY AS newGROUPID
 SET NOCOUNT OFF
 /cfquery
 cfset req.thisGROUPID = #addGROUP.newGROUPID# 
 /cfif
 !---2. If an existing group - just get the id---
 cfif IsDefined(form.mgroup) AND #form.mgroup# NEQ xxcfset
 req.thisGROUPID = #form.mgroup# /cfif

 !--- Get the Excel Sheet and send it to a destination outside of web
 root ---
  cfset dest = getTempDirectory()

 cffile action=upload
  destination=#dest#
  filefield=email_list
  result=upload nameconflict=makeunique

  cfif upload.fileWasSaved
  cfset theFile = upload.serverDirectory  /  upload.serverFile
  cfif isSpreadsheetFile(theFile)
  cfspreadsheet action=read src=#theFile# query=data
  cffile action=delete file=#theFile#
  cfelse
   cfset theISSUE = invalid /
  cfset errors = The file was not an Excel file.
  cffile action=delete file=#theFile#
  /cfif
  cfelse
  cfset theISSUE = loading /
  cfset errors = The file was not properly uploaded.
  /cfif

 /cfif

  cfset metadata = getMetadata(data)
  cfset colList = 
  cfloop index=col array=#metadata#
  cfset colList = listAppend(colList, col.name)
  /cfloop

   cfif data.recordCount is 0
   cfset theISSUE = empty /
cfelse

 !--- Create an array and read the data into it ---
 cfset mailREC=arraynew(2)

   cfoutput query=data
   cfif IsDefined(data.col_1) AND
 #isVALID(email,data.col_1)#cfset email = trim(#data.col_1#)
 /cfelsecfset email = - //cfif
   cfif IsDefined(data.col_2) AND #len(data.col_2)#cfset fname =
 trim(#data.col_2#) /cfelsecfset fname = - //cfif
   cfif IsDefined(data.col_3) AND #len(data.col_3)#cfset lname =
 trim(#data.col_3#) /cfelsecfset lname = - //cfif
   cfif IsDefined(data.col_4) AND #len(data.col_4)#cfset other =
 trim(#data.col_4#) /cfelsecfset other = - //cfif
   cfset mailREC[CurrentRow][1] = email /
   cfset mailREC[CurrentRow][2] = fname /
   cfset mailREC[CurrentRow][3] = lname /
   cfset mailREC[CurrentRow][4] = other /
 /cfoutput

 !--- Before we can save the list, we need to run two 

Re: Forms not passing data?

2014-09-21 Thread Dan G. Switzer, II

Are you posting the data via AJAX? There's a known issue w/IE9 and earlier
w/AJAX POST operations, where if the server's keep alive timeout is lower
than 60 seconds, it can cause IE problems and what you get is a request
that doesn't post the data back to the server.

-Dan

On Sun, Sep 21, 2014 at 1:04 AM, Phillip Vector vec...@mostdeadlygame.com
wrote:


 I don't know if this is a CFML issue or what... But perhaps someone has run
 across this and can offer a hand...

 form action=#myself#Login.CheckLogin method=post
 enctype=multipart/form-data
 input type=text name=username
 input type=Password name=Password
 input type=Submit class=submit name=Login
 value=Log in
 /form

 (It's not this bad, but I removed the formatting and so on). This works
 with all the browsers. When I try it with IE, Chrome, Firefox, it works
 fine.

 It hits

 cfquery datasource=PQ name=UID
 select QUID
 from Users
 where Username = cfqueryparam cfsqltype=cf_sql_varchar
 value=#form.Username#
 /cfquery

 and works perfectly.

 One user (using IE) tries to use it and most of the time, it works. But
 occasionally, I get this error emailed to me...

 The key [USERNAME] does not exist, only the following keys are available:
 [].

 (This is running fusebox on Railo).

 Does anyone know about an issue where IE SOMETIMES (he can do it most
 times) drops form data?


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359330
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF 9 and Java 1.7 ?

2013-12-19 Thread Dan G. Switzer, II

We've been running 1.7.0_17 with great success. We recently tried moving to
1.7.0_45, but started to see some very bizarre issues in production so we
rolled back to 17. Things have been fine since rolling back.

The issue we saw was that functions being passed argument collections would
eventually lose the arguments seemly randomly in certain conditions when
the collection was passed through a certain chain of events. We never were
able to boil down the exact cause and it was only biting us in one very
specific piece of code.

On Wednesday, December 18, 2013, Chris 0404tow...@gmail.com wrote:


 Hi all,

 Just thought I'd check back in about compatibility CF9 and Java JDK v1.7
 (now up to 1.7.0_45). It looks like 1.7 is fine with CF9.

 Anybody have any issues?

 many thanks,
 Chris


 On Tue, Aug 13, 2013 at 3:21 PM, Chris 0404tow...@gmail.comjavascript:;
 wrote:

  Thanks Wil, very helpful. And good news, too!
 
  Chris
 
 
  On Tue, Aug 13, 2013 at 3:17 PM, Wil Genovese 
  jugg...@trunkful.comjavascript:;
 wrote:
 
 
  We've been converting out CF9 and CF10 to Java 1.7 at CF Webtools. Here
  is what I wrote up about it.
 
  http://www.trunkful.com/index.cfm/2013/8/8/ColdFusion-on-Java-17
 
 
  Regards,
 
 
 
  Wil Genovese
  Sr. Web Application Developer/
  Systems Administrator
  CF Webtools
  www.cfwebtools.com
 
  wilg...@trunkful.com javascript:;
  www.trunkful.com
 
  On Aug 13, 2013, at 2:11 PM, Chris 0404tow...@gmail.com javascript:;
 wrote:
 
  
   Hi, are many people using CF 9 and Java 1.7 ?  With Cumulative HotFix
 4,
   CF9 should now support Java 1.7.
  
   Just wondering how it's working. I see a couple issues in
   https://bugbase.adobe.com
  
   thanks,
   Chris
  
  
  
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Removing bullets from textarea

2013-11-05 Thread Dan G. Switzer, II

You'd need to convert the hexidecimal numbers to standard decimal numbers.
The chr() does not work with hexidecimal values.

-Dan

On Tuesday, November 5, 2013, Joy Paulose wrote:


 John,

 I did use Replace function, but circle and square bullets still do not
 work.
 I tried all the following number codes

 chr(8220),chr(8221),chr(8226),chr(2022),chr(25E6),chr(9702),chr(2043),chr(9675),chr(9702),chr(9642),chr(9643),chr(9632),chr(9633)

 Thanks
 Joy

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357053
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Mobile

2013-09-27 Thread Dan G. Switzer, II

John,

I've looked into the following recently:

   - http://detectmobilebrowsers.com/ - In my testing, the code they give
   you works surprisingly well. It does not report tablets as mobile, which is
   the behavior I was looking for, but not be want you want. They basically
   give you some CFML and then you tweak the conditional statement for your
   needs.
   - WURFL (Java API) - Pretty easily to get up and running w/CF. The
   licensing is a bit weird, but you get very robust information back. Due to
   the fact you must load a 16MB XML config file, the initialization time is
   really slow, so you definitely want to cache your implementation so the
   init only happens once.
   - 51Degrees (Java API) - They offer a free version, but it lumps tablets
   in as a mobile device. You can upgrade to a paid version to differentiate
   tablets and phones. I like the API better than WURFL and initialization is
   much faster, but analyzing data is much slower. WURFL is darn quick.

I've still be trying to find a good database of User Agents that breaks the
strings down into desktop, tablet and phone so that I could run unit
tests of the various implementations, but the DetectMobileBrowsers.com code
has been as accurate as WURFL in my limited tests of a few dozen user
agents.

-Dan




On Fri, Sep 27, 2013 at 2:26 PM, John M Bliss bliss.j...@gmail.com wrote:


 Agreed. Unfortunately, client has only approved hours to develop mobile
 version...not hours to redevelop / redesign existing site so that it's
 responsive.

 Basically, when mobile is detected, I'll be rendering a mobile-optimized
 skin around existing CFML CMS-driven center trough content.


 On Fri, Sep 27, 2013 at 2:21 PM, Che Vilnonis ch...@asitv.com wrote:

 
  You could also look to Responsive Web Design in lieu of creating a
  separate site.
 
  ~Ché
 
  -Original Message-
  From: Ron Gowen [mailto:rsgo...@gmail.com]
  Sent: Friday, September 27, 2013 2:21 PM
  To: cf-talk
  Subject: Re: Mobile
 
 
  i use this: (not sure im cool though)
 
  https://github.com/sebarmeli/JS-Redirection-Mobile-Site
 
 
  On Fri, Sep 27, 2013 at 11:16 AM, John M Bliss bliss.j...@gmail.com
  wrote:
 
  
   Hi! I'm tasked with developing mobile browser-optimized version of
   existing site. What're the cool kids currently using for mobile
  browser-detection?
   This:
  
   http://www.cflib.org/udf/isMobileBrowser
  
   ...or something else?
  
   --
   John Bliss - http://about.me/jbliss
  
  
  
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356861
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Mobile

2013-09-27 Thread Dan G. Switzer, II

While user agent can be spoofed (and pretty easily with most browsers), the
reality is it's not a problem you need to worry about. You do generally
want to try and avoid user agent when possible, but if your trying to
detect the device purely on the server, there really isn't another option.
Any kind of client side detection (such as screen width) will require and
least a two trips to the server--once to serve up the client-side code that
detects the device, then you hit the server again to change the layout.

On Friday, September 27, 2013, John M Bliss wrote:


  I would suggest basing your redirect on screen width rather than user
 agent strings.

 This. This is why I ask questions like this one of this list. Answer so
 simple and yet so genius. Thank you!


 On Fri, Sep 27, 2013 at 5:50 PM, Brian Cain bcc9...@gmail.com wrote:

 
  I would suggest basing your redirect on screen width rather than user
  agent strings. Also the dev tools in Chrome has a neat little feature to
  allow you to specify a different user agent as well as screen size for
  testing on the desktop.
 
  Sent from my iPhone
 
   On Sep 27, 2013, at 4:13 PM, Dan G. Switzer, II 
  dswit...@pengoworks.com wrote:
  
  
   John,
  
   I've looked into the following recently:
  
 - http://detectmobilebrowsers.com/ - In my testing, the code they
 give
 you works surprisingly well. It does not report tablets as mobile,
  which is
 the behavior I was looking for, but not be want you want. They
  basically
 give you some CFML and then you tweak the conditional statement for
  your
 needs.
 - WURFL (Java API) - Pretty easily to get up and running w/CF. The
 licensing is a bit weird, but you get very robust information back.
  Due to
 the fact you must load a 16MB XML config file, the initialization
 time
  is
 really slow, so you definitely want to cache your implementation so
 the
 init only happens once.
 - 51Degrees (Java API) - They offer a free version, but it lumps
  tablets
 in as a mobile device. You can upgrade to a paid version to
  differentiate
 tablets and phones. I like the API better than WURFL and
  initialization is
 much faster, but analyzing data is much slower. WURFL is darn quick.
  
   I've still be trying to find a good database of User Agents that breaks
  the
   strings down into desktop, tablet and phone so that I could run
  unit
   tests of the various implementations, but the DetectMobileBrowsers.com
  code
   has been as accurate as WURFL in my limited tests of a few dozen user
   agents.
  
   -Dan
  
  
  
  
   On Fri, Sep 27, 2013 at 2:26 PM, John M Bliss bliss.j...@gmail.com
  wrote:
  
  
   Agreed. Unfortunately, client has only approved hours to develop
 mobile
   version...not hours to redevelop / redesign existing site so that it's
   responsive.
  
   Basically, when mobile is detected, I'll be rendering a
 mobile-optimized
   skin around existing CFML CMS-driven center trough content.
  
  
   On Fri, Sep 27, 2013 at 2:21 PM, Che Vilnonis ch...@asitv.com
 wrote:
  
  
   You could also look to Responsive Web Design in lieu of creating a
   separate site.
  
   ~Ché
  
   -Original Message-
   From: Ron Gowen [mailto:rsgo...@gmail.com]
   Sent: Friday, September 27, 2013 2:21 PM
   To: cf-talk
   Subject: Re: Mobile
  
  
   i use this: (not sure im cool though)
  
   https://github.com/sebarmeli/JS-Redirection-Mobile-Site
  
  
   On Fri, Sep 27, 2013 at 11:16 AM, John M Bliss bliss.j...@gmail.com
 
   wrote:
  
  
   Hi! I'm tasked with developing mobile browser-optimized version of
   existing site. What're the cool kids currently using for mobile
  Archive:
 http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356863
 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
 Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm



-- 
Dan G. Switzer, II
dswit...@pengoworks.com
http://blog.pengoworks.com/


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356864
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF10 Dev Edition...

2013-08-15 Thread Dan G. Switzer, II

That sounds like 3 requests from the same IP--which would be over the 2
request limit.


   1. Your initial request to the .cfm page
   2. The .cfm page makes an HTTP call to another page
   3. That page calls in invokes CFC over HTTP

-Dan



On Tue, Aug 13, 2013 at 7:33 PM, Eric Roberts 
ow...@threeravensconsulting.com wrote:


 No...1 ip...local...it is calling a page that makes an http request to
 another local page hat has http requests an cfc calls...all local...

 -Original Message-
 From: Russ Michaels [mailto:r...@michaels.me.uk]
 Sent: Tuesday, August 13, 2013 6:04 PM
 To: cf-talk
 Subject: Re: CF10 Dev Edition...


 so what this would mean, is that if you have 2 requests from 2 IP's already
 happening, then the internal request from the server to itself would
 probably fail as that would make 3 IP's but if you are only running this on
 your local machine then that would of course not be the case.



 On Tue, Aug 13, 2013 at 11:44 PM, Wil Genovese jugg...@trunkful.com
 wrote:

 
  Adobe changed the two IP restriction a bit.
 
  A small but significant change in ColdFusion 10 is around IP address
  restriction. Till ColdFusion 9, only two fixed IP addresses can access
  the developer edition of server. But this restriction is changed in
  ColdFusion 10. ColdFusion 10 developer edition can now be accessed
  concurrently by any two IP addresses. The restriction is on two
  concurrent request from any two IP addresses and not on which IP
 addresses.
 
 
  http://blogs.coldfusion.com/post.cfm/coldfusion-10-developer-edition-c
  an-now-be-accessed-by-any-ip-address
 
 
 
  Wil Genovese
  Sr. Web Application Developer/
  Systems Administrator
  CF Webtools
  www.cfwebtools.com
 
  wilg...@trunkful.com
  www.trunkful.com
 
  On Aug 13, 2013, at 5:35 PM, Eric Roberts 
  ow...@threeravensconsulting.com wrote:
 
  
   Is ther anything that limits the number of requests in the dev edition?
   We
   have some calls that use https and the call is crapping out when I
   use
  https
   to call another page hat has cfc and http  requests.  The code works
  fine on
   out cf9 production and dev servers.Iam trying to set up a local dev,
   but
  I
   have 10 installed.
  
  
  
   Eric
  
  
  
  
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356471
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How can I view arguments in a CFC on-screen?

2013-04-01 Thread Dan G. Switzer, II

Use the step debugger.

On Monday, April 1, 2013, Russ Michaels wrote:


 Dump them all to a file, then view the file.

 Regards
 Russ Michaels
 www.michaels.me.uk
 www.cfmldeveloper.com - Free CFML hosting for developers
 www.cfsearch.com - CF search engine
 On Apr 1, 2013 6:36 PM, Rick Faircloth 
 r...@whitestonemedia.comjavascript:;
 wrote:

 
  I wouldn't think this would be that difficult! Normally, I would include
  variables in a struct (when I'm using AJAX, whichis almost always) and
 view
  the variables when they're returned to the calling page. However, there
 are
  times, like right now, when I just want to have a look at allthe argument
  variables that a CFC is receiving and verify their accuracy. Isn't there
 an
  easy way to do this? I'm using CF 9. Thanks! Rick
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355221
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF 9.01 with Cumulative hot fix 4 won't work with Java 1.7

2013-03-27 Thread Dan G. Switzer, II

I had the same problem today, but followed Adobe's instructions and copied
to the file to {ColdFusion-Home}\runtime\bin and that resolved the issue
for me.

-Dan

On Wed, Mar 27, 2013 at 9:20 AM, DURETTE, STEVEN J sd1...@att.com wrote:


 All,

 I solved this one and wanted anyone else who might have this problem to
 have the solution too.

 It's similar to the Note about MSVCR100.dll is missing. You solve it by
 copying msvcr100.dll to C:\Windows\System32

 I was stuck because of a few things. First the cumulative hot fix stated
 that the error should have been MSVCR100.dll is missing., but it wasn't
 the best I could find was file not found. Second on a multi-instance
 install the \runtime\bin folder doesn't exist.

 I found this webpage about java7 and .Net that gave me the final push:
 http://www.jnbridge.com/jn/kb/?p=163

 Hope this helps someone else.

 Thanks,
 Steve


 -Original Message-
 From: DURETTE, STEVEN J
 Sent: Wednesday, March 27, 2013 8:05 AM
 To: cf-talk
 Subject: CF 9.01 with Cumulative hot fix 4 won't work with Java 1.7

 Hi all,

 I have a strange dilemma with a new install of ColdFusion 9 Enterprise on
 Windows 2008 R2.

 I have a server that is being swapped out, so on the new server I
 installed CF9 then applied the cf901 updater. After that I applied
 Cumulative hot fix 4.  I needed this configuration because we still have
 some Verity collections.

 The problem comes when I try to use Java 1.7. I have changed
 java.home=E:\\Java\\jdk1.7.0_17\\jre and java.home=E:/Java/jdk1.7.0_17/jre
 but both error out (see errors below).  This is 64-bit Windows, 64-Bit
 ColdFusion and 64-Bit Java.

 I have also tried E:\\Java\\jre7 and E:/Java/jre7 using just the JRE and
 those error as well.

 It is always stating that the file does not exist even though the file is
 there.

 Here are the Errors: (from the *-out.log)

 For E:\\Java\\jdk1.7.0_17\\jre - Error loading:
 E:\Java\jdk1.7.0_17\jre\bin\server\jvm.dll
 For E:/Java/jdk1.7.0_17/jre - Error loading
 E:/Java/jdk1.7.0_17/jre\bin\server\jvm.dll
 For E:/Java/jre7 - Error: no known VMs. (check for corrupt jvm.cfg file)
 For E:\\Java\\jre7 - Error: no known VMs. (check for corrupt jvm.cfg file)

 When I look at the Windows System Log for the Error Loading errors it has:
 The Macromedia JRun CFusion Server service terminated with
 service-specific error The system cannot find the file specified..

 The file does exist I have verified it more than once.

 The only configuration that is working is when java.home=E:/JRun4/jre in
 the jvm.config file.

 I'm stumped with this one and would really appreciate any insight.

 Thanks,
 Steve


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355178
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfcontent changing name of file

2012-12-29 Thread Dan G. Switzer, II

Rob,

The following should work:

cfheader name=Content-disposition
value=inline;filename=#downloadFile# /

-Dan

On Saturday, December 29, 2012, Rob Voyle wrote:


 Hi Russ
 creating objects is beyond my expertise and I couldn't get the sitepoint
 idea to
 work. Kept getting an object error. However my suspicion is that it
 wouldn't
 solve my problem.
 cfheader name=Content-disposition
 value=attachment;filename=#downloadFile# /
 forces the browser to save the file not view the file. I want people to
 first view it
 and then save it if they want.

 Rob



 On 30 Dec 2012 at 2:34, Russ Michaels wrote:

 
  try this.
  http://www.sitepoint.com/forums/showthread.php?640127-changing-filen
  ame-of-download-in-cfcontent
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353715
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: (ot) How compatible is SQLServer 2012 with SQL Server 2005 databases?

2012-09-14 Thread Dan G. Switzer, II

I don't think you will have any issues, but if your really worried about
creating 2005 databases in 2012 that aren't compatible, why don't you just
create a blank database in a 2005, then either take it offline and make a
master copy or make a backup of it. You could then use that backup to
create native 2005 databases anytime you need one.

-Dan

On Friday, September 14, 2012, Mike Kear wrote:


 OK, thanks everybody.I think I am fairly sure I'm going to be able to
 load up anything I might develop in the future onto that client's 2005
 server.

 And thanks Maureen for your offer.  If you dont mind, I'll keep your offer
 on my desk in case I really get stuck.

 Interesting, that I had multiple answers and suggestions inside 4 hours
 here,  when Microsoft have been unable to even take a stab at the answer in
 over a week.


 Cheers
 Mike Kear
 Windsor, NSW, Australia
 Adobe Certified Advanced ColdFusion Developer
 AFP Webworks
 http://afpwebworks.com
 ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month


 --


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352615
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: X-Sendfile for IIS6

2012-08-09 Thread Dan G. Switzer, II

Anyone seen any working solutions to this problem for IIS6?

-Dan

On Mon, Aug 6, 2012 at 4:25 PM, David Sifford david.siff...@givainc.comwrote:


 (I hope it's ok, but I thought I'd post this here as we're looking for a
 way to serve files via the Web server, similar to Ben Nadel's example at
 http://www.bennadel.com/blog/1226-Creating-Semi-Secure-File-Downloads-Without-Using-CFContent.htm):

 Hi everyone,

 We're looking for something that is similar to the apache x-sendfile mod,
 but for IIS6.  There are a couple for IIS7 (Helicon Ape and
 https://github.com/stakach/IIS-X-Sendfile-plugin), and these guys at
 http://ssl.x-sendfile-for-iis.com/index say they will have it for IIS6,
 but the program is not available yet.  Would anyone have any pointers to
 something that does this?

 Thanks for any info!

 -- David


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352078
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Streaming PDF in CF8 / Performance Issues

2012-08-01 Thread Dan G. Switzer, II

Have you looked into an X-sendfile-mod for your web server?

That will allow you to validate the request in CF, but pass the request
back to the webserver to serve the file. The file does not have to be in a
web accessible directory.

-Dan

On Wednesday, August 1, 2012, Jeff Chastain wrote:


 I am doing some performance test on a site running on ColdFusion 8 using
 FusionReactor.  There is one script that consistently ends up on the top of
 the long running requests list.  The script is very simple - it grabs a PDF
 file that already exists on the files system and streams it to the user.

 cfif fileExists( filePath  fileName ) 
 cfheader name=Content-Disposition value=attachment;
 filename=#fileName#
 cfcontent type=application/pdf file=#filePath##fileName#
 cfelse
 cfheader statuscode=410 statustext=Gone /
 pWe're sorry, but the page you have requested no longer exists
 on our site./p
 /cfif

 The PDF files in question are pretty small ... 1 to 2 MB.  In some cases
 (but not all), the request logs in FusionReactor are showing this script
 running for 200+ seconds.

 Does anybody have any ideas why this would be happening and is there a
 better way to stream PDF files that are not web accessible (i.e. the user
 has to register, then they get the file streamed to them)?  I am not
 looking to change the workflow - i.e. copying the file and sending a link
 by email etc.  I have streamed files like this before and have never seen
 these kinds of performance issues.

 Thanks for any input!


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352034
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Alternative for using SQL bind parameters

2012-06-08 Thread Dan G. Switzer, II

If you're on CF9+, then you can do what you want:

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffb.html

You can also duplicate this concept in earlier versions of ColdFusion. I
actually built an implementation for CF8 (probably would work in CF7 too)
that also fixed some of the bugs/issues w/the CF9 implementation due to how
they parse out the params (but it uses the same syntax.)

Unfortunately, I can't share the code, but the basic idea is you just parse
the SQL statement and then inside a cfquery statement you walk through
the parsed string, outputting the straight text or implementing
cfqueryparam / when you come to a parameter statement.

-Dan

On Fri, Jun 8, 2012 at 4:06 AM, Helwig, Till Helge till.hel...@saxsys.dewrote:


 Hi guys,

 I'm working on a very old CF application at the moment. When it was first
 created, apparently nobody cared about sanitizing SQL statements. There are
 lots of SQL queries in the code and most don't use cfqueryparam, which I
 would like to change whenever I stumble upon one of these. However, there
 is a slight problem: In many places the query statement is being assembled
 outside of cfquery by various functions and then there is only cfquery
 ...#sql#/cfquery in the code.

 Is there any way to make CF use bind variables in SQL statements apart
 from cfqueryparam, which obviously is not allowed outside of cfquery?
 I'm thinking about the flexibility in Java where you can just use :foo in
 statement strings and then provide a parameter map to the query. And if
 there isn't...how do you deal with situations like this?


 Till Helge


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351504
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: emailing a cfchart?

2012-02-20 Thread Dan G. Switzer, II

Dave,

I haven't had a chance to check this, but does CF10 no longer provide the
ability to generate static images for charts?

It looks like everything is canvas or Flash-based, which is going to be
problematic for emailing or using in a PDF--both of which I use.

Any idea?

-Dan

On Monday, February 20, 2012, Dave Watts wrote:


  Is it possible to have cfchart code (format=png or jpg) within a
  cfmail tag and have the graphic actually show up in the email? I can't
  seem to manage it...

 Not directly, by default, because what CFCHART generates is a
 time-limited URL to a servlet that produces the image, rather than an
 actual image file. You can use the NAME attribute of CFCHART to
 generate a CF variable that contains the image, store that to a file,
 then serve that instead.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349985
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamically Added Form Fields Not Submitted

2011-09-22 Thread Dan G. Switzer, II

I've seen this behavior with malformed HTML were the form tags are between
table and tr tags. Check to make sure your HTML is valid.

-Dan

On Thursday, September 22, 2011, Robert Nurse rnu...@gmail.com wrote:

Are you actually adding them as elements to the dom or just adding the
html
text to the table data?
I've had this exact issue and gotten around by properly adding the
children
to the form.





 Hi,

 I've been adding them via DOM calls to table cells which are added to
table rows which are added to a table.  The table is within a form.  It
works just fine in IE. But, no FireFox.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347631
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SAML Response to Google Apps

2011-08-09 Thread Dan G. Switzer, II

Are you running in the Dev version of CF? if so, it can add some HTML to the
output stream that will corrupt any XML output.

Are you sure the the code Google is seeing isn't getting altered?

-Dan

On Tuesday, August 9, 2011, Panning, Ryan ryan.pann...@district196.org
wrote:

 Has anyone successfully created a ColdFusion project that sends a SAML
 Response to Google Apps?



 I have nearly completed a project that decodes the SAML Request from
 Google, authenticates with the local directory, and submits a SAML
 Response back. However, Google Apps states that it could not parse the
 response. Using the SimpleSAML debug Web page [1], I am able to
 successfully decode my response. Since that works, I suspected the
 certificate signing. As per directions from other sources [2-4] I use
 the Apache Santuario Java libraries. From what I can tell, it seems to
 be working fine. I've even signed the response several ways, such as
 just the Response, just the Assertion, and both. I've been discussing
 this on the Google Dev forums [5] but the official Googlers don't seem
 to have access to the logs that say exactly why it can't parse the
 Response. Wish Google would say what specifically it doesn't like...



 Thanks for any help/feedback!

 ~ Ryan





 [1] https://rnd.feide.no/simplesaml/module.php/saml2debug/debug.php

 [2] http://dragonsaber.blogspot.com/2009/09/coldfusion-saml-part-1.html

 [3] http://dragonsaber.blogspot.com/2010/01/coldfusion-saml-part-2.html

 [4] http://dragonsaber.blogspot.com/2010/04/coldfusion-saml-part-3.html

 [5]
 http://code.google.com/googleapps/domain/sso/saml_sso_support.html?place
 =topic%2Fgoogle-apps-saml-sso%2Fixx23lPnlKY%2Fdiscussion



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346639
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Out of memory error when creating Solr collection

2011-07-23 Thread Dan G. Switzer, II

Oh, and if you worried about records changing during the process, you can
always dump the original query results into a table, then all you need to do
is grab the top 5 rows, process and then delete the top 5 rows,
rinse and repeat.

Then when your batch process is done, just grab any records that changed
since the batch process started and process those records again (which
should be a relatively small number of records.)

-Dan

On Friday, July 22, 2011, Dan G. Switzer, II dswit...@pengoworks.com
wrote:
 Eric,

 I'd return the records in like 50,000 row chunks and process them that
 way. If you're using SQL Server 2005+ you can use CTEs to paginate the
 results (but most modern database have a way of doing pagination.)

 This will keep the memory footprint lower.

 -Dan

 On Friday, July 22, 2011, cft...@ecartech.com cft...@ecartech.com wrote:

 I'm trying to create a Solr collection from a query that returns about 3
 million records.  The query itself takes about 3 minutes to run in SQL
 Studio.  When trying to run it in CF to create my collection, I get
 java.lang.OutOfMemoryError: Java heap space every time.  Here's what I've
 tried so far, with no luck:

 - Modified Solr Server Settings in CF Admin: set Solr Buffer Limit  = 80
 - Set Solr.lax file to -Xms1024m -Xmx2048m -XX:MaxPermSize=256m
 -XX:-UseConcMarkSweepGC
 - Set my CF JVM to -Xmx2048m
 - Set Solr lax.nl.current.vm to use the 64 bit javaw.exe

 Is there anything else I can try or should be looking for?  At this point
 I'm thinking, if CF  Solr can't create my collection using 2 gigs of ram
 apiece and a 64 bit jvm, I'm not so sure I want to use it.

 Any suggestions?

 Thanks,

 Eric Cobb
 http://www.cfgears.com



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346318
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Out of memory error when creating Solr collection

2011-07-22 Thread Dan G. Switzer, II

Eric,

I'd return the records in like 50,000 row chunks and process them that
way. If you're using SQL Server 2005+ you can use CTEs to paginate the
results (but most modern database have a way of doing pagination.)

This will keep the memory footprint lower.

-Dan

On Friday, July 22, 2011, cft...@ecartech.com cft...@ecartech.com wrote:

 I'm trying to create a Solr collection from a query that returns about 3
 million records.  The query itself takes about 3 minutes to run in SQL
 Studio.  When trying to run it in CF to create my collection, I get
 java.lang.OutOfMemoryError: Java heap space every time.  Here's what I've
 tried so far, with no luck:

 - Modified Solr Server Settings in CF Admin: set Solr Buffer Limit  = 80
 - Set Solr.lax file to -Xms1024m -Xmx2048m -XX:MaxPermSize=256m
 -XX:-UseConcMarkSweepGC
 - Set my CF JVM to -Xmx2048m
 - Set Solr lax.nl.current.vm to use the 64 bit javaw.exe

 Is there anything else I can try or should be looking for?  At this point
 I'm thinking, if CF  Solr can't create my collection using 2 gigs of ram
 apiece and a 64 bit jvm, I'm not so sure I want to use it.

 Any suggestions?

 Thanks,

 Eric Cobb
 http://www.cfgears.com



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346317
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: onSessionEnd not working as expected

2011-06-17 Thread Dan G. Switzer, II

Jerry,

On Fri, Jun 17, 2011 at 11:55 AM, Gerald Weir malleth...@verizon.netwrote:


 First, my apologies to all if this is a duplicate post. I seem to be having
 trouble posting.  Anyway,

 Hello All,

 Thanks for your input. Ray, you are correct in that I needed to pass in the
 session scope variables correctly.

 In my original post it is clear that a) I was not passing in the session
 scope vars (the array) correctly; and b) I had not indicated the path
 correctly.  Now I've fixed those items and am mostly successful as in the
 following:

 cffunction name=onSessionEnd returntype=void
cfargument name=SessionScope type=struct required=true /
cfargument name=ApplicationScope type=struct required=true /

cfinvoke component=lib.components.jobState
 method=writeJobStepArray returnvariable=isSuccess
cfinvokeargument name=theJobStepArray
 value=#Arguments.SessionScope.jobStepArray#
/cfinvoke

cflog file=#This.Name# type=Information text=Session ended
 with success.  Array Evaluation is #isSuccess#

cfreturn /
 /cffunction

 I had tried the / paths because it had appeared to me that the onSessionEnd
 was not finding the component but what I see now is that there is an error
 in the CFC regarding an application scope variable that I had not seen so
 naturally it was erroring out - not that it couldn't find the cfc.

 I definitely learned a lot about using CFLOG for debugging in this one.
  But, there is one other small issue and that is I tried to pass in the
 application scope var as follows and it didn't seem to work (so I've
 hard-coded for the time being):

 In application.cfc I have defined a datasource structure:
  application.database = structNew()

 The database is:  application.database.dsn

 I tried to pass this to the CFC in onSessionEnd like this:

 cfinvokeargument name=theDatasourceToUse
 value=#Arguments.ApplicationScope.application.database.dsn#

 ...but it didn't work.  What is the correct syntax for this?


You'd only need:

cfinvokeargument name=theDatasourceToUse
value=#Arguments.ApplicationScope.database.dsn#

-Dan

-- 
Dan G. Switzer, II
dswit...@pengoworks.com
http://blog.pengoworks.com/

█▀▀▀▀▀█ ▄▀ ▄█▄▄█  █▀▀▀▀▀█
█ ███ █ ▀███▀ █▀  █ ███ █
█ ▀▀▀ █ █▄ ▄  ▀██ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █ █ ▀ ▀▀▀▀▀▀▀
█▀▄█▄▄▀▀  █▄▀██ █▄█▀▀ ▀▀▄
 ▄▀█▄▀▀▀▄▀▀▄▄▄█ ▄█▄▀▀  ▀▀
▀▀▄▄▀▀▀▀█▄▄▀▀█ ▀▀██▄ █▄▀█
▀▄ ▄▀ ▀  ▀▀█▄█▄▄▄ █▄▀▄▀▄▀
▀▀ ▀▀ ▀ █▀ ██▄ ▄█▀▀▀███ ▄
█▀▀▀▀▀█ ▀▄█ ▄▀█▀█ ▀ █▄▄▀█
█ ███ █ ▄▀▀ █▀ ▄▀█▀██ ▄▀
█ ▀▀▀ █ ▄ █▄ ▄▄ ▄▄▄ ▀█▀ ▀
▀▀▀▀▀▀▀ ▀▀  ▀▀ ▀▀  ▀   ▀▀


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345399
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Best way to use cfschedule for large number of tasks

2011-06-01 Thread Dan G. Switzer, II

Mosh,

 Thanks for the reply.  In the past, I've always done things via the
 route you suggested (a single task working off of a queue).  My
 concern here, and it looks like I left this out of the original post,
 is that the tasks will be time-sensitive (but not time-critical).
 That is, if the task is set to run at 5:00 PM, it should run as close
 to 5:00 PM as possible (think calendar alert sensitive vs. giving
 someone scheduled medicine critical).

You might want to consider running these scheduled tasks on a separate 
CF instance--that way the threads tied up by background tasks are going 
to be tying up threads of your visitors.

Some other things you could try:

1) Run the background task every 60 seconds. If there are no tasks to 
run the overhead should really be essentially nil (you should only be 
dealing with a few milliseconds for any empty queue query.)

2) Use cfthread / to process multiple background tasks asynchronously. 
That way a single long running task won't bog down all the tasks 
scheduled to run on the current iteration.

3) Run multiple scheduled events (this might be better if you're running 
a separate instance for scheduled tasks.) You can assign tasks in a 
round robin fashion, so each background script would run a different set 
of tasks.

4) Do an asynchronous HTTP request to process the task. This is a good 
way to just trigger off a bunch of requests to be processed that will 
start right away. However, I'd only do this if you're running a separate 
instance for scheduled tasks.

-Dan

-- 
Dan G. Switzer, II
dswit...@pengoworks.com
http://blog.pengoworks.com/

█▀▀▀▀▀█ ▄▀ ▄█▄▄█  █▀▀▀▀▀█
█ ███ █ ▀███▀ █▀  █ ███ █
█ ▀▀▀ █ █▄ ▄  ▀██ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █ █ ▀ ▀▀▀▀▀▀▀
█▀▄█▄▄▀▀  █▄▀██ █▄█▀▀ ▀▀▄
  ▄▀█▄▀▀▀▄▀▀▄▄▄█ ▄█▄▀▀  ▀▀
▀▀▄▄▀▀▀▀█▄▄▀▀█ ▀▀██▄ █▄▀█
▀▄ ▄▀ ▀  ▀▀█▄█▄▄▄ █▄▀▄▀▄▀
▀▀ ▀▀ ▀ █▀ ██▄ ▄█▀▀▀███ ▄
█▀▀▀▀▀█ ▀▄█ ▄▀█▀█ ▀ █▄▄▀█
█ ███ █ ▄▀▀ █▀ ▄▀█▀██ ▄▀
█ ▀▀▀ █ ▄ █▄ ▄▄ ▄▄▄ ▀█▀ ▀
▀▀▀▀▀▀▀ ▀▀  ▀▀ ▀▀  ▀   ▀▀

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345023
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Best way to use cfschedule for large number of tasks

2011-05-31 Thread Dan G. Switzer, II

Mosh,

On 5/31/2011 1:42 PM, Mosh Teitelbaum wrote:

 All:

 I'm working on a system that will have a large number of timed,
 one-time tasks that need to be executed on a schedule.  I'm trying to
 figure out the best way to accomplish this with cfschedule.  The two
 options I see are as follows:

 1. A single, recurring task that runs every 5 minutes and queries the
 database for any tasks that need to be executed.  The benefit of this
 approach is that there is only a single task to create.  The
 negatives of this approach are (a) potentially querying the database
 when there are no tasks to execute (waste of resources) and (b) risk
 of too many tasks at any given time causing the scheduled execution
 to time out or cause later tasks in the run to be executed so late as
 to be off schedule.

(a) The overhead of running a script that doesn't find anything to run 
should be extremely minimal, so I wouldn't even factor this in as a 
waste of resources.

(b) You can always limit the number of tasks you're going to execute in 
one pass--that way you'll never run too many requests in a single batch.

Also, depending on your needs, if you have some requests that you know 
are long running, you could build into your scheduling queue when a 
valid window for that task is to run.

So, if you know a task might take 5 minutes to run (because it does a 
ton of warehousing, etc) you could make sure those type of events only 
run during non-peak hours.

 2. Create a new cfschedule task for each task that needs to be run.
 The benefits of this approach are that it solves all of the negatives
 of the other approach.  The negatives are that it would necessitate
 the creation of a very large number of cfschedule events and I don't
 know if this could negatively affect the scheduler or CF
 performance.

 Either approach would include code to do cleanup (e.g., delete the
 task from the CF scheduler after it has been executed, etc.).

 Any thoughts as to which approach (or a different one altogether) is
 better?

I've always preferred having a single background task to manage a queue, 
rather than trying to schedule everything via cfschedule / and clean 
up afterwards.

For one, it's much easier to catch errors. It also gives you a single 
point of entry/failure.

You can easily build reports on your executed tasks--because you're 
already storing that stuff in the database. If it's important enough, 
you can find out how long each task is taking to execute, find which 
generated errors, re-queue events, etc.

You can also really easily just fire off stuff in queue manually.

-Dan

-- 
Dan G. Switzer, II
dswit...@pengoworks.com
http://blog.pengoworks.com/

█▀▀▀▀▀█ ▄▀ ▄█▄▄█  █▀▀▀▀▀█
█ ███ █ ▀███▀ █▀  █ ███ █
█ ▀▀▀ █ █▄ ▄  ▀██ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █ █ ▀ ▀▀▀▀▀▀▀
█▀▄█▄▄▀▀  █▄▀██ █▄█▀▀ ▀▀▄
  ▄▀█▄▀▀▀▄▀▀▄▄▄█ ▄█▄▀▀  ▀▀
▀▀▄▄▀▀▀▀█▄▄▀▀█ ▀▀██▄ █▄▀█
▀▄ ▄▀ ▀  ▀▀█▄█▄▄▄ █▄▀▄▀▄▀
▀▀ ▀▀ ▀ █▀ ██▄ ▄█▀▀▀███ ▄
█▀▀▀▀▀█ ▀▄█ ▄▀█▀█ ▀ █▄▄▀█
█ ███ █ ▄▀▀ █▀ ▄▀█▀██ ▄▀
█ ▀▀▀ █ ▄ █▄ ▄▄ ▄▄▄ ▀█▀ ▀
▀▀▀▀▀▀▀ ▀▀  ▀▀ ▀▀  ▀   ▀▀

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345015
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfhttp response with non-english characters gets cut off

2011-05-18 Thread Dan G. Switzer, II

Morgan:

Have you tried using cfprocessingdirective pageEncoding=utf-8 / to the
page with your CFHTTP call?

-Dan

On Wed, May 18, 2011 at 11:35 AM, morgan l greyk...@gmail.com wrote:


 I'm running into a strange issue here.

 CF8: (8,0,1,195765)
 JVM: 1.6.0_16
 Windows Server 2003

 We're implementing a resume parsing service, posting the resumes to the
 service using cfhttp. All was going well until we ran across a handfull of
 our test resumes, all with non-English special characters (accented
 characters, Greek letters etc). As far as I can tell, all the characters
 are
 valid utf-8, but the cfhttp call fails with Connection Failure in the
 filecontent on all files containing one of these characters. If I remove
 the
 offending character, I get the full results.

 I've also tried saving the result to a file (by passing the file and path
 params to cfhttp), but the resulting file is getting cut off--but not at
 the
 offending character, there is plenty of the file content after the
 character. IIS logs indicate that the server is receiving the full byte
 count reported by the response headers. It appears that the content is
 getting cut off somewhere in the JVM or CF processing. Days of google
 searches have turned up no similar experiences, nor any workable solutions.

 If I retool the call to use MSXML as a COM object, the offending files run
 fine, though they take 20+ seconds longer to process. Such a degradation in
 performance is obviously unacceptable.

 We're at a loss trying to determine what the root cause of this problem is,
 and the only solution so far increases processing time 10 fold. Has anyone
 seen anything like this before? I'm open to any ideas on getting a workable
 solution to this.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344615
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Using CFTHREAD on CF PRO

2011-05-17 Thread Dan G. Switzer, II

Brook,

On Tue, May 17, 2011 at 10:56 AM, Brook Davies cft...@logiforms.com wrote:

 I am considering spawning a new thread via the onRequestEnd event to do
 some
 post processing. Basically its going to record some stats (a couple quick
 DB
 queries) and possibly send an email based on some criteria. I am
 considering
 CFTHREAD because the user does not need to wait for any results of this
 processing.

 I've read some things about CFTHREAD being a bottle neck and that CF
 Proffesional has limited threads. Would I be asking for trouble trying to
 do
 this? Should I just let the user wait for the processing to finish? It
 would
 really like only be 100-200 milliseconds or so


This is really one of those situations where running a load test really
gives you the best answer. You may end up getting a variety of answers, but
none will be quite as useful as spending 30-60 minutes running a simple load
test to see what happens.

If you don't currently have any tools for running a load test, download Apache
jMeter http://jakarta.apache.org/jmeter/ and then you can follow this
tutorial:

http://www.roseindia.net/jmeter/using-jmeter.shtml

Set up a simple test what the results are between using cfthread / and not
using it in your onRequestEnd and see what the impact is on your site under
various types of load. If you set up the Aggregate Report listener it'll
give you an idea of the overall impact.

I use jMeter a lot when I want to quickly see what the real impact of under
load of some code might be. I usually will set things up so that a URL
parameter can toggle various code branches--that way I can quickly change
the behavior right from jMeter. I'll run several tests simulate heavy load
and see which performs better overall and to see if any of the solutions are
causing weird queuing issues.

-Dan

-- 
Dan G. Switzer, II
dswit...@pengoworks.com
http://blog.pengoworks.com/

█▀▀▀▀▀█ ▄▀ ▄█▄▄█  █▀▀▀▀▀█
█ ███ █ ▀███▀ █▀  █ ███ █
█ ▀▀▀ █ █▄ ▄  ▀██ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █ █ ▀ ▀▀▀▀▀▀▀
█▀▄█▄▄▀▀  █▄▀██ █▄█▀▀ ▀▀▄
 ▄▀█▄▀▀▀▄▀▀▄▄▄█ ▄█▄▀▀  ▀▀
▀▀▄▄▀▀▀▀█▄▄▀▀█ ▀▀██▄ █▄▀█
▀▄ ▄▀ ▀  ▀▀█▄█▄▄▄ █▄▀▄▀▄▀
▀▀ ▀▀ ▀ █▀ ██▄ ▄█▀▀▀███ ▄
█▀▀▀▀▀█ ▀▄█ ▄▀█▀█ ▀ █▄▄▀█
█ ███ █ ▄▀▀ █▀ ▄▀█▀██ ▄▀
█ ▀▀▀ █ ▄ █▄ ▄▄ ▄▄▄ ▀█▀ ▀
▀▀▀▀▀▀▀ ▀▀  ▀▀ ▀▀  ▀   ▀▀


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344576
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Odd issue with Query

2011-04-08 Thread Dan G. Switzer, II

Charlie,

If you're using MSSQL and cfqueryparam /, sometimes running a query
directly in SSMS may lead to misleading information. I wrote a blog issue a
while back that talks about one issue:

http://blog.pengoworks.com/index.cfm/2010/12/8/Performance-issues-with-cfqueryparam--on-first-execution-when-using-Microsoft-SQL-Server

Essentially what can be happening is that MSSQL is having performance
problems running sp_prepexec to analyze the best way to run your SQL, so the
problem isn't running the query, it's with MSSQL trying to figure out the
best way to run the query.

You might also check out this lengthy article:
http://www.sommarskog.se/query-plan-mysteries.html

-Dan

On Thu, Apr 7, 2011 at 7:40 PM, Charlie Stell charlie.st...@gmail.comwrote:


 So this was a weird one... the error is resolved, but I was wondering if
 anyone could explain what was causing my error.

 I had a query that was timing out (its one of those nice long monster
 queries - so I'm not pasting it in its entirety) - but when I copied/pasted
 out of the cfcatch.sql (from error thrown on timeout) into SQL Query
 Analyzer - or another template, it completed in under a second.

 In the query there was a join that looked like this -

 LEFT JOIN tableA on ColX
 cfif condition...
 = ColY
 cfelse
 = ColZ
 /cfif

 Changing it to either of the following resolved the issue
 Solution 1:
 LEFT JOIN tableA on ColX cfif condition...
 = ColY
 cfelse
 = ColZ
 /cfif

 Solution 2:
 cfif condition...
 LEFT JOIN tableA on ColX = ColY
 cfelse
 LEFT JOIN tableA on ColX = ColZ
 /cfif

 So I'm assuming there was something going on related to the carriage return
 following ColX  - and in addition to the two solutions above, the process
 of copy-pasting also must have resolved it.

 If it makes any difference - I'm using SeeFusion for monitoring and so all
 my datasources use:
 JDBC URL:
 jdbc:seefusion:jdbcwrapper:{jdbc:macromedia:sqlserver://server1:1433;
 databaseName=dbname; SelectMethod=direct;
 sendStringParametersAsUnicode=false; MaxPooledStatements=1000};
 Driver Class: com.seefusion.Driver

 Anyone have any idea on the root problem?

 Thanks!
 charlie


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343623
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT: SQL CTE update

2011-03-29 Thread Dan G. Switzer, II

Why bother with cursors or temp tables at all and just sort across Depth
desc instead of Depth asc?

-Dan

On Tue, Mar 29, 2011 at 2:59 PM, Jason Durham jqdur...@gmail.com wrote:


 Nevermind... all I could see were nails.  I'll create a temp table for the
 regular navigation and use that table for breadcrumbs (the depth is
 accurately created on that query).

 Jason Durham


 On Tue, Mar 29, 2011 at 1:44 PM, Jason Durham jqdur...@gmail.com wrote:

  I apologize if this is an inappropriate place to ask this question.
 
  I'm using a CTE for a recursive query to assemble navigation.  In the
 CTE,
  I'm creating a column that contains the depth of the navigation.  This
 depth
  is ultimately inserted into the class of an HTML element.   I'm
 refactoring
  how my breadcrumbs are created and want to use a similar method.  The
 catch
  is, breadcrumbs start from the bottom of a recursive tree and work their
 way
  up.  This is causing undesired behavior on the depth calculation.  The
  bottom-most element is 0.  It's parent is 1.  It's grandparent is 2 (and
 so
  forth).  I need to reverse the order of this field.
 
  I'm currently trying to use a cursor to loop back over the CTE and update
  the depth field manually.  However, it appears that I'm I can't access
 the
  data stored in the temporary table (CTE) from with in the cursor.  Should
 I
  be going about this a different way?
 
  Here is the SQL...
 
  DECLARE @THEID INT
  SET @THEID=88;
 
  DECLARE BC_Cursor CURSOR FOR
  WITH Breadcrumbs(Navigation_ID, Parent_ID, Navigation_Name, Depth) AS
  (
  SELECT Navigation_ID, Parent_ID, Navigation_Name, 0
  FROM Navigation
  WHERE Navigation_ID = @THEID
 
  UNION ALL
 
  SELECT n.Navigation_ID, n.Parent_ID, n.Navigation_Name, bc.Depth+1
  FROM Navigation n
  INNER JOIN Breadcrumbs bc
  ON bc.Parent_ID = n.Navigation_ID
  )
  SELECT * FROM Breadcrumbs OPTION (MAXRECURSION 8)
  FOR UPDATE;
 
  DECLARE @maxRows int;
  SET @maxRows = @@ROWCOUNT; --- Will be used to renumber the depth
 
  OPEN BC_Cursor;
  FETCH NEXT FROM BC_Cursor;
  WHILE @@FETCH_STATUS = 0
  BEGIN
  FETCH NEXT FROM BC_Cursor;  --- This prints each row.  Instead
 of
  outputting them, I need to update and ultimately return the whole
 (virtual)
  table.
  END;
  CLOSE BC_Cursor;
 
  DEALLOCATE BC_Cursor;
 
 
  Thanks in advance.
 
  Jason Durham
 


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343386
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT: SQL CTE update

2011-03-29 Thread Dan G. Switzer, II

Jason,

That's why I said to sort the tree in using DESC instead of ASC on 
the Depth column:

  - - -*Drivers *(3)
  - -Software (2)
  -Support (1)
  Home (0)

If you pull in descending order, you'll know the max depth from the 
first row, so if it's a matter of using the depth for indenting, just 
use: maxDepth-depth to reverse the depth.

-Dan

On 3/29/2011 3:34 PM, Jason Durham wrote:

 The in example I posted, I'm calculating the depth in the select statement.
 The depth is determined by the order in which the row is returned.  If I
 start from a child, the child is returned first (therefore it's 0).  If I
 start from the parent (top level nav), the parent is 0.   Consider this...

 Typical nav.. (depth is in parenthesis).  The tree is built from the top
 down.

 Home (0)
 -Products (1)
 - -Car (2)
 - -Truck (2)
 -Support (1)
 - -Software (2)
 - - -*Drivers *(3)

 Breadcrumbs...  The tree is built from the bottom up.

 *Drivers *(0)
 -Software (1)
 - -Support (2)
 - - -Home (3)

 The depth is backwards.  The depth is not a fixed column.

 Like I said... the solution hit me.  The entire site's navigation is
 generated with the correct depth onAppStart().  I'll just cache it via a
 temp table.

 Jason Durham


 On Tue, Mar 29, 2011 at 2:14 PM, Dan G. Switzer, IIdswit...@pengoworks.com
 wrote:


 Why bother with cursors or temp tables at all and just sort across Depth
 desc instead of Depth asc?

 -Dan

 On Tue, Mar 29, 2011 at 2:59 PM, Jason Durhamjqdur...@gmail.com  wrote:


 Nevermind... all I could see were nails.  I'll create a temp table for
 the
 regular navigation and use that table for breadcrumbs (the depth is
 accurately created on that query).

 Jason Durham


 On Tue, Mar 29, 2011 at 1:44 PM, Jason Durhamjqdur...@gmail.com
 wrote:

 I apologize if this is an inappropriate place to ask this question.

 I'm using a CTE for a recursive query to assemble navigation.  In the
 CTE,
 I'm creating a column that contains the depth of the navigation.  This
 depth
 is ultimately inserted into the class of an HTML element.   I'm
 refactoring
 how my breadcrumbs are created and want to use a similar method.  The
 catch
 is, breadcrumbs start from the bottom of a recursive tree and work
 their
 way
 up.  This is causing undesired behavior on the depth calculation.  The
 bottom-most element is 0.  It's parent is 1.  It's grandparent is 2
 (and
 so
 forth).  I need to reverse the order of this field.

 I'm currently trying to use a cursor to loop back over the CTE and
 update
 the depth field manually.  However, it appears that I'm I can't access
 the
 data stored in the temporary table (CTE) from with in the cursor.
   Should
 I
 be going about this a different way?

 Here is the SQL...

 DECLARE @THEID INT
 SET @THEID=88;

 DECLARE BC_Cursor CURSOR FOR
 WITH Breadcrumbs(Navigation_ID, Parent_ID, Navigation_Name, Depth) AS
 (
  SELECT Navigation_ID, Parent_ID, Navigation_Name, 0
  FROM Navigation
  WHERE Navigation_ID = @THEID

  UNION ALL

  SELECT n.Navigation_ID, n.Parent_ID, n.Navigation_Name, bc.Depth+1
  FROM Navigation n
  INNER JOIN Breadcrumbs bc
  ON bc.Parent_ID = n.Navigation_ID
 )
 SELECT * FROM Breadcrumbs OPTION (MAXRECURSION 8)
 FOR UPDATE;

 DECLARE @maxRows int;
 SET @maxRows = @@ROWCOUNT;--- Will be used to renumber the depth

 OPEN BC_Cursor;
 FETCH NEXT FROM BC_Cursor;
 WHILE @@FETCH_STATUS = 0
  BEGIN
  FETCH NEXT FROM BC_Cursor;--- This prints each row.  Instead
 of
 outputting them, I need to update and ultimately return the whole
 (virtual)
 table.
  END;
 CLOSE BC_Cursor;

 DEALLOCATE BC_Cursor;


 Thanks in advance.


 Jason Durham







 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343389
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dan G. Switzer, II

One thing to keep in mind, if you do not have a *unique *ApplicationName on
your server, then the variables could be shared w/another application--which
is especially dangerous on shared hosting.

I've seen people roll out an application w/a common ApplicationName like
MainApp and have issues w/their App scope being shared w/another
application that also used a name of MainApp. Same thing happens if the
Application.cfc/cfm doesn't define a ApplicationName.

IMO, the safest thing you can do is name define ever ApplicationName with a
hash of the current directory path:

cfset this.name = hash(getDirectoryFromPath(getCurrentTemplatePath())) /

That way you can use the same code w/every Application.cfc, but your
virtually guaranteed to have a unique ApplicationName.

-Dan

On Mon, Mar 28, 2011 at 2:55 PM, Russ Michaels r...@michaels.me.uk wrote:


 I think I can see one possible cause of your problem Dave.
 You may actually have 2 applications running.

 one on yourdomain.com
 and another on www.yourdomain.com

 So if someone goes to yourdoamin.com and then www.yourdomain.com they will
 NOT be seeing the same application.  So perhaps most people go to
 www.yourdomain.com, but every so often someone visits
 yourdoamin.cominstead, which would restart the application if it was
 outside the timeout
 period.

 To avoid this you need to add a redirect, so that only 1 domain is in use.
 either redirect www.yourdoamin.com to yourdomain.com or vice versa.

 And also change your code to explicit to avoid this problem

 if CGI.SERVER_NAME IS blah.com

 else ... staging
 else ... dev
 else redirect to blah.com


 On Mon, Mar 28, 2011 at 7:46 PM, Dave Watts dwa...@figleaf.com wrote:

 
   To confirm my understanding, are you saying that on a very busy site,
  it's possible that OnApplicationStart might never run again once the app
   has started? (server admin and restarts aside.)
 
  That's exactly correct.
 
   Since the app is running fine for months and then all of a sudden
  switches configs, something else then must trigger a call to
  OnApplicationStart
   but with a screwy environment. (I'm going to add logging to track this
  down but I can't predict when the problem might happen again.)
 
  It's entirely possible that (a) the server is stopping and restarting,
  which will cause all applications to stop, or (b) there's an explicit
  call to onApplicationStart somewhere within your code - this is
  actually pretty common.
 
  Dave Watts, CTO, Fig Leaf Software
  http://www.figleaf.com/
  http://training.figleaf.com/
 
  Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
  GSA Schedule, and provides the highest caliber vendor-authorized
  instruction at our training centers, online, or onsite.
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database Lookup - Possible with CF?

2011-03-14 Thread Dan G. Switzer, II

I also posted already posted an example for Ian showing the jQuery/CF7 
portion of the code:

http://blog.pengoworks.com/index.cfm/2011/3/3/Easy-AJAX-using-ColdFusion-jQuery-and-CFCs

The example does deal w/a struct, but converting data to a struct is 
very straightforward. I know he's seen it--because we had an offlist 
brief discussion.

The only piece of the puzzle he needs to work out is the web service 
part--which may end up being extremely easy, or extremely 
difficult--depending on the web service he's trying to consume. If CF7 
can handle the format natively, then it's very straight forward. 
However, if CF7 throws errors accessing the web service, then he's going 
to have to find other method of consuming the web service.

-Dan

On 3/14/2011 9:20 AM, Dean Lawrence wrote:

 Ian, again you are mixing things up.CFJSON is not what calls the
 webservice. CFJSON is used to encode or decode native ColdFusion
 objects to and from JSON format. So if you if have a query result, you
 would pass that query object to CFJSON and it will encode it into JSON
 format. Vice-versa, you can pass it a JSON string and it can covert it
 back to a native ColdFusion object.

 So with that said, JQuery would make an AJAX call to your ColdFusion
 page, be it a .cfm or .cfc page (doesn't really matter as JQuery
 doesn't care). On that ColdFusion page you would invoke the webservice
 that you are getting your data from and make whatever calls that the
 webservice requires. If what you get back from the webservice is not
 in a JSON format, you would then pass the results to CFJSON to convert
 it to JSON. It is this converted data that you would then return to
 the original AJAX call and now use JQuery to populate your form with
 that data.

 I think your hang-up is on this whole ColdFusion 7 mentality. The use
 of JQuery to make an AJAX call and populate the form is not ColdFusion
 7 specific, as it is a client-side task, it really has nothing to do
 with ColdFusion 7. The only ColdFusion 7 functionality that you really
 need to be concerned about is making the call to your .Net webservice.
 Here is Adobe's LiveDoc page that tells you how to do that.

 http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=part_dev.htm

 As for ColdFusion 7 and JSON, JSON is really only text. Again, you
 don't need anything special to work with it. Projects like CFJSON
 simply make it easier to work with it. But if you look at the source
 code for CFJSON, it is just using plain old ColdFusion to process the
 data. The same holds true for newer version of ColdFusion. The
 built-in tags are just a way to make it easier to work with JSON, but
 are not required. I'm running ColdFusion 9.01 and don't use any of the
 built-in tags to do my AJAX calls as I like to have full control over
 the process. That's just me though.

 Anyway, here is a link to the JSON homepage so that you can get a
 better understanding about what it is.

 http://www.json.org/

 Dean

 On Mon, Mar 14, 2011 at 7:24 AM, Ian Vaughan
 i.vaug...@neath-porttalbot.gov.uk  wrote:

 Thanks found this link
 http://www.monochrome.co.uk/blog/2008/02/01/using-jquery-and-coldfusion-
 7-with-a-little-json-glue which seems ok - the problem I am having in
 understanding is how would I use CFJSON to use the .asmx webservice data
 that I would consume/call with the Coldfusion 7 cfinvoke tag?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342993
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Web Service Over SSL

2011-03-09 Thread Dan G. Switzer, II

Bobby,

No, you still have to restart CF to get the JVM to recognize the cert.

Are you looking for a new for a new SSL provider that has cheap SSL certs?

-Dan

On Wed, Mar 9, 2011 at 11:48 AM, Bobby Hartsfield bo...@acoderslife.comwrote:


 Are you saying it allows you to add certs to the keystore without
 restarting
 CF? I don't see that anywhere.

 If that IS the case, it sure would save me a lot of trouble as well.

 .:.:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com
 http://cf4em.com


 -Original Message-
 From: Marco Antonio C. Santos [mailto:marcoacsan...@gmail.com]
 Sent: Wednesday, March 09, 2011 11:44 AM
 To: cf-talk
 Subject: Re: Web Service Over SSL


 Certman is your friend:

 http://certman.riaforge.org/

 Cheers
 Marco Antonio

 On Wed, Mar 9, 2011 at 11:48 AM, Brian Polackoff bpolack...@gmx.com
 wrote:

 
  Hey everyone. I have run into the age old issue that Coldfusion JRE does
  not
  have included a ssl certificate (from GoDaddy) used on a remote CF system
 I
  have setup. I have read how to import the SSL into the JRE using keytool,
  however it requires restarting CF services which I do not want to have to
  do
  over and over again as I bring on more remote servers using SSL web
  services.
 
  Does anyone know of a SSL provider (verisign, thawt, entrust, etc.) that
  Coldfusion already has included with the JRE that comes with Coldfusion
 out
  of the box?
 
  Thanks!
  Brian
 
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342848
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Riaforge down?

2011-03-06 Thread Dan G. Switzer, II

Bobby,

On Sunday, March 6, 2011, Bobby Hartsfield
 I sent an email to Ray a day or two ago but never heard back and now it is
 just worse.

Raymond has been out of the country. I believe he's back in the States
now, but I suspect he's probably a bit behind in emails.

-Dan

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342791
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Database Lookup - Possible with CF?

2011-03-03 Thread Dan G. Switzer, II

Ian,

I just posted a blog entry about how easy jQuery  CF can handle using 
AJAX to populate a form:

http://blog.pengoworks.com/index.cfm/2011/3/3/Easy-AJAX-using-ColdFusion-jQuery-and-CFCs

-Dan

On 3/3/2011 10:57 AM, Ian Vaughan wrote:

 Hi Dave

 I'm willing to give CF a go, even though here the move is away from CF
 onto .NET and Java (ADF)

 Do you have any step by step tutorials that I could follow that I can
 use to implement the feature below in CF, if they can see what it can do
 it would certainly help its case.

 All I am looking to do is when a user fills in their employee number in
 a form text field, ajax calls CF to run a SQL query to bring back and
 populate the other fields in the form with that employees info.

 Is it really that difficult to achieve the above?  Are there any
 ajax/jquery libraries I could use to integrate in with CF because
 javascript is not be strong point

 -Original Message-
 From: Dave Watts [mailto:dwa...@figleaf.com]
 Sent: 03 March 2011 15:02
 To: cf-talk
 Subject: Re: Database Lookup - Possible with CF?


 So would I be better developing this application in a language that is
 more scaleable/future proof than CF

 You won't be using ASP.NET then, right? Because (a) it's not more
 scalable, and (b) any platform effectively limited to Windows is not
 more future-proof. I mean, I could see your point if you were talking
 about Java, even if I'd quibble on the scalability bit.

 Having worked with some high-scalability clients, I am very confident
 that CF is as scalable as .NET. I've mentioned them on the list
 before, so I'm not going to bother enumerating them now, but I'll be
 happy to provide further details on request.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342725
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DaysInMonth issue

2011-03-01 Thread Dan G. Switzer, II

I suspect the actual issue is that the script is running after midnight in
whatever timezone his servers in.

So, instead of getting 28 for February, he's getting 31 for March.

-Dan

On Tue, Mar 1, 2011 at 11:27 AM, Robert Harrison rob...@austin-williams.com
 wrote:


 Have you tried doing IsDate against your value to see if the value you are
 trying to feed to it is a date and not just a string that seems to look like
 a date?

 Try validating with IsDate and if it return false try rebuilding as a real
 date with CreateDate.


 Robert B. Harrison
 Director of Interactive Services
 Austin  Williams
 125 Kennedy Drive, Suite 100
 Hauppauge NY 11788
 P : 631.231.6600 Ext. 119
 F : 631.434.7022
 http://www.austin-williams.com

 Great advertising can't be either/or.  It must be .

 Plug in to our blog: AW Unplugged
 http://www.austin-williams.com/unplugged



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342655
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Google Charts - QR Code - cfimage

2011-02-09 Thread Dan G. Switzer, II

JD,

In my experience, the image functions generally want an extension for the
input so the image libraries know how to handle the image. Since the URL
doesn't have a .png in the filename, I think that's the problem.

You may need to use CFHTTP to save the image as a PNG on a filesystem and
then read the image off disk.

-Dan

On Wed, Feb 9, 2011 at 1:35 PM, JD Yeiter jdyei...@hotmail.com wrote:


 Quick overview of what I'm trying to do:  I want to dynamically create QR
 Codes and store them as images for later use (so I don't have to constantly
 hit up the google charts api).

 When I try:

 imageNew(
 http://chart.apis.google.com/chart?cht=qrchs=200x200chl=yourMomInMyQR;)

 I get this error:

 The /chart image format is not supported on this operating system.


 Any ideas?


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342059
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How do I get a save/download window using Ajax?

2010-12-27 Thread Dan G. Switzer, II

You can't download files like that via AJAX. What you can do, and what
I've done in the past, is use an iframe to push the download to the
browser.

In the past I've used AJAX to check the server to see if the
downloadable file is ready for download. I do this by creating a
unique download token that gets marked as ready right before I push
the file back in the iframe. Once my AJAX script finds the token is
marked ready I stop the AJAX script and perform my JS code.

-Dan

On Monday, December 27, 2010, marc -- m...@marcbakker.com wrote:

 Hi,

 I have a page with a print button. When I click that button, a pdf is 
 generated by CF and sent to the client using cfdocument, mime-type 
 application/pdf and a header content-disposition so that the pdf is treated 
 as an atachment. That works fine if I don't use Ajax. But I can't get this to 
 work using Ajax.
 I try to do this using this Jquery:

 function printInvoice(){
                 $.ajax({
                         url:/?event=invoice.print,
                         
 data:{invoiceId:$(input[name=invoiceId]).attr(value)},
                         
 success:function(data){location.href=/?event=invoice.list;},
                         async:false,
                         type:get
                 });
                 location.href=/?event=invoice.list;
                 return false;

 }

 As you can see, when the pdf is retrieved the onsuccess callback should 
 refresh the page. This refreshing does work but the pdf is not displayed - I 
 don't get a window asking me if I want to save or view the attachment I get 
 when not using Ajax.

 How can I get this to work?

 Marc

 fwiw - I use ModelGlue 3.1 and CF 9.0.1 on Mac OS X. JQuery 1.4.2

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340282
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: REQUEST.cfdumpinited

2010-11-30 Thread Dan G. Switzer, II

Sean,

Why not just use the format attribute and dump the contents in plain
text--which is a lot more lightweight for mail delivery:

cfdump var=#x# format=text /

-Dan


On Tue, Nov 30, 2010 at 2:23 PM, Sean Henderson shender...@followup.netwrote:


 In CF9, setting REQUEST.cfdumpinited to true prevents CFDUMP from
 displaying at all, where in CF6 it merely prevented the STYLE and SCRIPT
 tags from appearing.
 CF9 workaround? No mention of cfdumpinited in either of these below:

 Home / ColdFusion 9 CFML Reference / Reserved Words and Variables / Custom
 tag variables

 Home / ColdFusion 9 CFML Reference / ColdFusion Tags / Tags d-e / cfdump

 Sean






 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339643
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: jQuery and cfcontent

2010-10-12 Thread Dan G. Switzer, II

On Tuesday, October 12, 2010, Dave Watts dwa...@figleaf.com wrote:

 You can't prompt the user to download a file if you're invoking the
 URL with standard jQuery AJAX calls. You have to basically just fetch
 the URL into a new or blank window.

I'd recommend posting to an iframe. You can even build the iframe
dynamically if you want, it doesn't have to be visible on the page.
I've used this technique in the past with great success.

-Dan

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338107
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfoutput or cfloop? which is the more practical solution

2010-09-27 Thread Dan G. Switzer, II

If you're using MSSQL, you can use my generateDateTable for creating a
dynamic date table which you can use:

http://blog.pengoworks.com/index.cfm/2009/1/8/Dynamically-generating-a-table-of-dates-in-Microsoft-SQL-Part-Deux

While a numbers table is more efficient if you're dealing with 1000s of
rows, this works really well for most use cases.

-Dan

On Sun, Sep 26, 2010 at 10:46 PM, GLM g...@glmdesigns.com wrote:


 Thx Mike,

 I've started my reading early. One of my questions was: how much space
 would
 the numbers table occupy?

 Found that that 2G rows (2,000,000,000) is roughly 8GB in size.

 http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=NumbersTable

 I'll need at the most 365 x 3000 years if the clients wanted one database
 that went from Egyptian pharaohs to American Presidents (yeah right) that
 would be roughly 1,000,000 rows. This expanded table would be roughly 4MBs
 (1/2000 of 8GBs) so I don't particularly have to worry about size.

 Since a numbers table for the US is only about 80,000 rows the numbers
 table would be less than 400K. Not bad at all.

 - Gil

 -Original Message-
 From: Mike Chabot [mailto:mcha...@gmail.com]
 Sent: Sunday, September 26, 2010 8:08 PM
 To: cf-talk
 Subject: Re: cfoutput or cfloop? which is the more practical solution


 I was thinking years, but you could do days as well. It depends on
 what you want to group on in the output.

 To save you some searching, below is SQL to fill a numbers table for
 SQL Server, if you go that route. As I said earlier, the other methods
 work fine also. I tend to prefer doing as much as possible on the
 database server, since databases are optimized for handling data.

 CREATE TABLE [dbo].[numbers](
 [number] [int] NOT NULL,
 CONSTRAINT [PK_numbers] PRIMARY KEY CLUSTERED
 (
 [number] ASC
 )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY
 = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR =
 100) ON [PRIMARY]
 ) ON [PRIMARY]


 declare @counter int
 set @counter = 0
 begin tran
 while @counter  8000
 begin
 set @counter = @counter + 1
 INSERT INTO numbers (number)
 VALUES (@counter)
 print 'The counter is ' + cast(@counter as char)
 end
 commit

 -Mike Chabot

 http://www.linkedin.com/in/chabot/

 On Sun, Sep 26, 2010 at 2:50 PM, GLM g...@glmdesigns.com wrote:
 
  Maybe I don't have a clear concept of a numbers table (I'll be reading up
 on
  them tomorrow.) but wouldn't I need a number to correspond to the units
 in
  question (in this case days.)



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337584
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: struct lookup vs. query of queries

2010-07-13 Thread Dan G. Switzer, II

Depending on the size of the lookup table, I like using a struct to
hold a reference to the row number, that way I quickly lookup
the data in the query.

Lookup = structNew();
Lookup[id] = row;

then you can do:

query.column[Lookup[id]];

-Dan


On Tuesday, July 13, 2010, Michael Dinowitz mdino...@houseoffusion.com wrote:

 I've got a loop which will need to look up a piece of data on each
 iteration. The data is standardized so there is really just one call
 to the database (outside the loop). I can either do a query of queries
 on each iteration or I can turn the query into a structure and do a
 structure lookup (structkeyexists, etc) on each iteration. I'm
 assuming that the struct lookup will be faster/more efficient even
 after having to turn the query into a structure.
 Anyone have an opinion on this?

 Thanks

 --
 Michael Dinowitz
 Lead Author - Adobe Coldfusion Anthology
 http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335337
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Slow cfqueryparam IN clause on SQL Server 2008

2010-06-14 Thread Dan G. Switzer, II

I've seen this behavior with long lists. The solution I've used was to
write a MSSQL UDF that would convert the param'ed value into a table
variable--which strangley resolves the issue.

-Dan

On Monday, June 14, 2010, Matthew Lesko m.le...@verizon.net wrote:

 Wondered if anyone else had experienced this. I have an IN clause query which 
 runs in 500ms if I use cfqueryparam list=true. This same query runs in less 
 than 10ms if I pass the values directly (e.g. 'value1', 'value2', etc...).

 I've Googled around a bit and have the impression it's an issue with how the 
 statement is prepared on the db server, but couldn't find any solutions that 
 allowed for using cfqueryparam.

 Anyone have experience solving this problem?

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334549
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: HTML 5, has anyone done anything more than played with it

2010-06-01 Thread Dan G. Switzer, II

The great thing (or not so great, depending on your view) is that
older browsers will simply ignore the markup they don't understand.
That allows you to gracefully fallback for older legacy browsers.

-Dan

On Tuesday, June 1, 2010, Sean Corfield seancorfi...@gmail.com wrote:

 On Tue, Jun 1, 2010 at 12:10 PM, Scott Stewart
 webmas...@sstwebworks.com wrote:
 I'm starting to dig into HTML 5, and so far, apart from some of the
 CSS3 attributes, I don't see anything that jumps out and says ready
 for prime time. The browser support is spotty at best, let's be real
 does it really matter if Opera supports something? If IE and Firefox
 don't have support for something then it's not mainstream, am I wrong
 here?

 This page has demos of various features with indicators of which
 browsers support what:

 http://html5demos.com/

 IE8 supports some HTML5 stuff already and Microsoft appear to be
 strongly behind HTML5 based on a recent presentation I saw that talked
 about HTML5/CSS3 support in IE8 and IE9. Given how laggardly they've
 been in the past about standards, I was pleasantly surprised by their
 (apparent) stance on this.

 A number of companies are pushing HTML5/CSS3 pretty hard...

 As for production work, it's going to depend on your target audience.
 Some people are still constrained to support IE6, some people are able
 to push the envelope. The support for HTML5/CSS3 in browsers on mobile
 devices will probably be the key issue here.
 --
 Sean A Corfield -- (904) 302-SEAN
 Railo Technologies, Inc. -- http://getrailo.com/
 An Architect's View -- http://corfield.org/

 If you're not annoying somebody, you're not really alive.
 -- Margaret Atwood

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334213
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: MSSQL Where In not working with variables

2010-04-20 Thread Dan G. Switzer, II

Paul,

On Tue, Apr 20, 2010 at 2:31 PM, Paul Alkema paulalkemadesi...@gmail.comwrote:


 Eh, sorry. I've just found the solution to my own problem.



 Just for future reference, this is my solution.



 DECLARE @idList varchar(max)

 DECLARE @sql varchar(max)

 SET @idList = '1,2'

 SET @sql = 'SELECT * FROM table WHERE ID IN (' + @idList + ')'

 EXEC(@sql)


Just watch the context that you're using this in, because depending on how
@idList is being populated, you're definitely open to SQL injection.

Also, the I'd use the sp_executesql over the exec command:
http://www.mssqltips.com/tip.asp?tip=1160

-Dan


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333046
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-14 Thread Dan G. Switzer, II

Brad,

On Tuesday, April 13, 2010, Bradley Stone b...@nb9m.com wrote:

 All:

 Feeding DateDiff() dates which are more than 24 hours apart yields minutes:

 cfoutput
 #DateDiff(n, 2010-04-08 19:41:36.0, 2010-04-12 19:10:34.0)#
 /cfoutput

 Result: 5728

 However, feeding DateDiff() dates which are LESS than 24 hours apart yields 
 nothing:

 cfoutput
 #DateDiff(n, 2010-04-08 19:34:47.0, 2010-04-08 19:35:35.0)#
 /cfoutput

 Result: 0

There's only 13 seconds between those two dates, so zero is the
correct response.

-Dan

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332900
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: storing a cfinput inside of a variable

2010-04-08 Thread Dan G. Switzer, II

Steve,

Is there anyway to use cfset or cfsavecontent to store a complete cfinput
 tag?

 i.e.

 cfset config.formFieldA = cfinput type=text name=fieldname
 value=//

 If I do a view source, I see it the code on my output page, but it won't
 render at all in the browser.

 If I try cfsavecontent it errors because the cfinput isn't in a cfform
 (since the cfinput is in a CFC being called by the form page).

 The reason for this is that this one form field could have different max
 lengths, validations, validation patterns, and messages based on a variety
 of factors.  If I can move the input into a CFC that returns all sorts of
 other partner specific info, it keeps me to having just one space to enter
 config data.


That doesn't work, instead do something like:

cfset fieldA = {
  type=text
  ,  name=fieldname
  , value=
} /

cfinput attributeCollection=#fieldA# /

You can use a structure to define the parameters for the cfinput / tag.

-Dan


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332807
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: select box result to show/hide another select box. jquery

2009-11-12 Thread Dan G. Switzer, II

Paul,

You need to trigger the change method when you initialize your code:

On Thu, Nov 12, 2009 at 11:07 AM, Paul Ihrig pih...@gmail.com wrote:


 script
$(function(){
$(#prt_type).change(function () {
var val = $(this).val();
switch(parseInt(val)){
case 6:
$(#prt_prog_1).show();
break;
case 1: case 2: case 3: case 4: case 5: case 7: case
 8:  case '':
$(#prt_prog_1).hide();
break;
}
});
});
 /script


Change the above code to:

script
   $(function(){
   $(#prt_type).change(function () {
   var val = $(this).val();
   switch(parseInt(val)){
   case 6:
   $(#prt_prog_1).show();
   break;
   case 1: case 2: case 3: case 4: case 5: case 7: case
8:  case '':
   $(#prt_prog_1).hide();
   break;
   }
   }).trigger(change);
   });
/script

That will force jQuery to fire the change event handler, just as if the
browser actually fired the event.

-Dan


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328304
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: select box result to show/hide another select box. jquery

2009-11-12 Thread Dan G. Switzer, II

On Thu, Nov 12, 2009 at 11:08 AM, Paul Ihrig pih...@gmail.com wrote:


 so just to clarify.
 the show hide js works fine on its own, just doesn't check or see the
 default value from the existing data

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328305
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: kill cookie on browser close

2009-11-12 Thread Dan G. Switzer, II

Chad,

Make sure you don't have any instances of IE open--including things that
might use the IE underneath (like an RSS reader, etc.)

-Dan

On Thu, Nov 12, 2009 at 11:39 AM, Chad Gray cg...@careyweb.com wrote:


 Anyone notice that in IE this codes does not appear to work anymore?
  Firefox it works just fine.

 I don't think it is just my browser... I have tried another computer with
 IE8 and it does not kill the session cookie.


 !--- if the user closes their browser, make sure all session variables get
 killed ---
 cfif isdefined(Cookie.CFID) and isdefined(Cookie.CFTOKEN)
cfset cfid_local = cookie.cfid
cfset cftoken_local = cookie.cftoken
cfcookie name=CFID value=#cfid_local#
cfcookie name=CFTOKEN value=#cftoken_local#
 /cfif


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328306
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Rich Text Editor - what really handles cut'n paste from Word?

2008-12-22 Thread Dan G. Switzer, II
Les,

There's one group in particular that is going to cut and paste
*everything* from Word, and even with the cleanup features and stuff in
FCK, this is still problematic for the client.

Yea, I know, Word produces some of the gawd-awful bloated ... uhh, never
mind - it's terrible. So, I'm looking for a new editor for them that
will handle Word better. I don't care what it costs, within reason.

The best product I've seen for dealing with Word is XStandard. The only
gotcha is it's an ActiveX/Plug-in for the browser. Since this is an admin
feature, this probably isn't a big deal, but it does involve installing a
3rd party application.

The really nice thing about XStandard is that you can cut-n-paste Word
documents with embedded images and you can upload the images via a web
service--no need for users to upload images independently and then re-insert
them. They can just paste them right into the canvas.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317077
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CF DATEDIFF Function

2008-11-04 Thread Dan G. Switzer, II
You should be able to do:

fix(tomorrow) - fix(now()) = diff in days

CF stores dates as a float, where the integer is the day value and the
decimal values are represent the time. So, if you just round down and
subtract the two dates you'll get the difference in whole days.

-Dan

-Original Message-
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2008 8:02 AM
To: cf-talk
Subject: RE: CF DATEDIFF Function

Exactly.  An entire day must expire before it can be counted.  To expand
that, an entire time period must expire before it can be counted.
This includes years, months, days, hours, minutes, seconds, etc.

If you want to count today, just add one or use a different time
period as Paul suggests.

Mike

-Original Message-
From: Paul Hastings [mailto:[EMAIL PROTECTED]
Sent: Monday, November 03, 2008 8:39 PM
To: cf-talk
Subject: Re: CF DATEDIFF Function

Azadi Saryev wrote:
 because your server time is different from your computer's time? your

well there's that or that dateDiff returns results for *whole* days (or
whatever). try using hours.



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314806
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Ordered Argument names

2008-09-26 Thread Dan G. Switzer, II
Does anyone know how to make CF provide a list of the names of Arguments in
the order provided and without using cfargument tag?

StructKeyList/StructKeyArray returns an arbitrary order in CF8, and a
random order every time in CF7.

Using Array functions on the Arguments scope results in a random order
every time in CF7 and CF8.


Run this code in CF to see the problem:

cffunction name=doStuff
   cfdump var=#Arguments#/
   cfdump var=#StructKeyList(Arguments)#/
   cfdump var=#StructKeyArray(Arguments)#/
   cfdump var=#ArrayToList(Arguments)#/
/cffunction

cfset doStuff( a:'first' , b:'second' , c:'third' ) /
cfset doStuff( z:'first' , y:'second' , x:'third' ) /
cfset doStuff( a:'first' , b:'second' , x:'third' , y:'fourth' ) /
cfset doStuff( b:'first' , d:'second' , f:'third' ) /

You should be able to loop through the arguments array:

cfset a = arrayNew(1) /
cfloop index=i from=1 to=#arrayLen(arguments)#
cfset arrayAppend(a, arguments[1]) /
/cfloop

cfdump var=#a# /

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313141
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Ordered Argument names

2008-09-26 Thread Dan G. Switzer, II
You should be able to loop through the arguments array:

cfset a = arrayNew(1) /
cfloop index=i from=1 to=#arrayLen(arguments)#
  cfset arrayAppend(a, arguments[1]) /
/cfloop

cfdump var=#a# /

Nope, that gives values not names (assuming 1 - i)

Also, it doesn't come out in the same order each time.

It *should* since arrays are supposed to be ordered, but in my version of
CF the values are switching around each refresh.

Structures have no explicit order--so you can't expect them to come back in
any specific order.

Why do you need the keys to be in order anyway?

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313151
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: The Woes of CFThread -- going out of my mind!

2008-07-10 Thread Dan G. Switzer, II
Ian,

Can anybody point out what is fundamentally wrong with this code.  Such
that it has at least a 50% chance of complete failure resulting in a
non-responsive ColdFusion server that must be restarted.  What gets me
is that sometimes it works completely correct and produces all the
desired files.  The next time, with the exact same code and data, it
fails and hangs the server, but generates no exceptions or errors.  At
least none that I have been able to find.

 [... clip ...]

!--- BUILD REPORT ---
cfreport template=ren.cfr format=pdf
name=vRenewalReport
cfreportparam name=pFirmNo
value=#variables.ResultFirms['firmno'][threadIndex]#
cfreportparam name=pIssueDate
value=#DateFormat(variables.pIssueDate, 'mm/dd/yy')#
cfreportparam name=pRenewalId value=#thread.vRenewalSeq#
/cfreport

cfpdf action=write source=vRenewalReport
destination=#thread.vOutputFilePath# overwrite=yes

 [... clip ...]

I wonder if the problem isn't with cfthread / but actually with heavy
usage of either cfreport / or cfpdf / tags.

Are you creating large reports? It could be a memory issue your running in
to. How much RAM is available to the JVM?

I would try simplifying things. Does it always work if you comment out the
cfreport / and cfpdf / tags? 

If it does, what happens if you comment out the cfreport / tag and just
write a very simply PDF?

I could see how if you're generating some large PDFs, that without enough
RAM it could drive the JVM nuts.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308847
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: The Woes of CFThread -- going out of my mind!

2008-07-10 Thread Dan G. Switzer, II
The memory usage of the PDF report generation is defiantly a problem.
It is what we where trying to address with the usage of the thread tag.
The idea being that by splitting the process into separate threads and
throttle them down would allow the server time to clean up memory used
in previous iterations.

That is a topic for a seperate discussion.  How does cfreport... work
in large iterations.  We found that no matter what we did, the memory
used by the report tag would just climb and climb each iteration unless
we broke up the process into completely separate HTTP requests.

By creating a template that would process a small number of reports per
request and then send a page to the browser with a META refresh to
re-request the page in one second.  This works fine.

While certainly not ideal, what if you split things up like this:

1) You create one template that creates a report based on some kind of
unique key identifier.

2) You create a second template that loops through all the reports you need
to create and call the first template using CFHTTP. 

This should at least sort of emulate the meta refresh technique, but
allows you to automate the process w/out relying on a browser for the meta
refresh.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308861
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: The Woes of CFThread -- going out of my mind!

2008-07-10 Thread Dan G. Switzer, II
Brian Kotek wrote:
 Also, Ian, how many threads are you creating here based on the query
 results? 10? 10,000?

For this process 1,371.  That is my basic question at this time -- What
are the practical limits of the cfthread...

Here is my simplest test case to date.  I seems to show that there is a
limit, but I really don't know where it might be.

cfloop from=1 to=1500 index=i
cfthread action=run name=th_#i# threadID=#i#
cfset thread.foobar = threadID
cfset thread.calc = threadID * randRange(1,10)
/cfthread
/cfloop

cfthread action=join name=#structKeyList(cfThread)# timeout=1/

cfdump var=#cfThread# format=text expand=no

This code will frequently cause hung threads that NEVER end until the
server is restarted.

Threads should be used with caution, because each thread is going to be
taking up memory (although I'm not sure how much memory each thread uses.)
Spawning off threads like this is in rapid fire succession is a good way for
the JVM to run out of memory and once that happens, everything becomes
really unstable.

I'd try to really limit the number of threads your creating. I'd even look
at limiting things to a fixed number of worker threads. Try dividing the
work load between like 5 or 6 threads. Have each thread process it's share
of the work load (i.e. each work load would handle 1/5 of the workload--so
w/500 records, thread one would work on records 1-100, thread 2 would work
on records 101-200, etc.)

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308862
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: The Woes of CFThread -- going out of my mind!

2008-07-10 Thread Dan G. Switzer, II
Ian,

Here is my simplest test case to date.  I seems to show that there is a
limit, but I really don't know where it might be.

cfloop from=1 to=1500 index=i
cfthread action=run name=th_#i# threadID=#i#
cfset thread.foobar = threadID
cfset thread.calc = threadID * randRange(1,10)
/cfthread
/cfloop

cfthread action=join name=#structKeyList(cfThread)# timeout=1/

cfdump var=#cfThread# format=text expand=no

What if you change the above code to:

cfloop from=1 to=300 index=i
cfloop from=1 to=5 index=j
cfthread action=run name=th_#i#
threadID=#(((i-1)*5)+j)#
cfset thread.foobar = threadID
cfset thread.calc = threadID * randRange(1,10)
/cfthread
/cfloop
cfthread action=join name=#structKeyList(cfThread)#/
cfdump var=#cfthread# format=text expand=no/
/cfloop

This should do the exact thing, but it breaks it up to a maximum of 5
threads.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308866
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Time to First Byte

2008-04-08 Thread Dan G. Switzer, II
The TTFB can also be affected if you have a large number of requests that
currently queued--you can see a spike in the TTFB in periods where the
server is queueing lots of requests. This could happen during periods of
Garbage Collection (if you have a lot of JVM memory that needs purging) or
if you just have a bunch of long running tasks (such as file uploads going
on.)

-Dan

-Original Message-
From: Brad Wood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 08, 2008 1:58 PM
To: CF-Talk
Subject: RE: Time to First Byte

SeeFusion gives you two page times.  The time to first byte and the
total page time.  TTFB is the amount of time that elapses before CF
starts sending back data to the browser.  If you are using cfflush this
could begin before the page is finished processing.  Total page time is
the time that elapses before CF sends the LAST byte of information to
the browser.

Ignoring the usage of cfflush, your TTFB is how long it took to process
your page on the CF server.  The total time minus the TTFB is the time
spent transferring the response back to the client.

Generally the latter will be very small unless you
a) are transferring a large amount of content back to the user or
b) experiencing network delays.

Now, for your situation, I am unclear which of these figures is higher.
If the problem is simply that pages are slowing down, then you need to
figure out what they are doing.

Use the JDBC url wrapper with SeeFusion to monitor your database calls.
Un-optimized queries should be your primary suspect.  Make sure all your
data SeeFusion will tell you if a page is running a query and what SQL
is being executed.

Now, when you see pages start slowing down, get a stack trace for the
slow request from SeeFusion and see what it is up to.

Keep in mind that your databases performance can be impacted by DB jobs
and/or clients other than ColdFusion accessing them.

Additionally, enable SeeFusion's db logging and check out the counters
table.  That will tell you if you are having a surge of traffic, when
your average page times jumped as well as heap size etc.

That's about as far as I can get you until you look at some stack
traces.  I doubt the accessing of your .cfm files is what is slowing you
down though.  They are cached locally after their first read anyway when
using trusted cache so the NAS should not even come into play after the
first load of each page.

~Brad

-Original Message-
From: Brian Peddle [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 08, 2008 12:38 PM
To: CF-Talk
Subject: Time to First Byte

I know without deep details this may be hard to answer but looking for
some general thoughts.

We have 4 front end web servers all on Coldfusion 7.  Java 1.4.1.13.
Dell Xeon 4 gigs of Ram, dual quad core  Nothing by CF runs on these
boxes.

All the code lives on NAS on a gigabyte network.

Throughout the day when looking at seefusion we will see short windows
of time, maybe min or 2 where pages that normally load pretty quick with

take 30 seconds for example to execute the TTFB.  Queries are in ms
range but the page just seems to stick.

For some testing I moved all the source code to the local Drive on 1 web

server.  I do notice less pages hanging but still see little blips.
What I see as a big difference is when my app first loads on the NAS it
takes up to 100 seconds, locally 10 seconds or less to load in all the
objects.  Performance overall on the local machine seems faster.  Roght
now the code on the local machine sits on C drive as well so I suspect
if I added some more drives it would perform a little better with having

to compete with the OS.

For caching I have both Trusted cache and Save Class files checked and
max number of cached templates at 2000.  Max is connections is at 24, I
know I could go much higher but this seems to work best.

I would assume overall that the site running locally will perform faster

than over a gig switch.  Maybe fiber would compete here, not sure.

Im trying to figure out why the sporadic high TTFB comes up.  Are there
any other settings, places to look, IIS settings maybe, to try and see
why this is happening... or is it simply a burst in traffic that causes
some concurrency issues?

Thanks in advance.

Brian







~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302975
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Working download for CF801-Extensions-for-Eclipse.zip?

2008-04-06 Thread Dan G. Switzer, II
Judith,

The link he lists for Eclipse is:
 http://download.macromedia.
 com/pub/coldfusion/8/eclipseextensions/CF801-Extensions-for-Eclipse.
 zip

I see that that's the same URL as the one you listed... What I should have
said, Dan, was that I'm having no trouble with the URL. The extensions
download for me without a problem. Maybe it was some kind of temporary
problem and you should try again?

The link started working late Friday night.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302808
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qforms: transferring values from one select to another

2008-04-04 Thread Dan G. Switzer, II
i'm lost. i cannot pass both id and title using the valueList method?

the populate() method is the closest i have got yet. its just that the
values are not included in the form submit.

You only need the value. When the containers are bound, qForms will search
through the option/ tags to find matching values.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302698
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Working download for CF801-Extensions-for-Eclipse.zip?

2008-04-04 Thread Dan G. Switzer, II
Has anyone found a working download for CF801-Extensions-for-Eclipse.zip?

http://download.macromedia.com/pub/coldfusion/8/eclipseextensions/CF801-Exte
nsions-for-Eclipse.zip

The url above is giving me a file not found.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302706
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Working download for CF801-Extensions-for-Eclipse.zip?

2008-04-04 Thread Dan G. Switzer, II
Yes, a lot of their downloads still point to downloads.macromedia.com. You'd
think they'd update those to adobe.com urls.

-Dan

-Original Message-
From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2008 9:45 AM
To: CF-Talk
Subject: Re: Working download for CF801-Extensions-for-Eclipse.zip?

It downloads from macromedia.com? Really?

Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Dan G. Switzer, II wrote:
 Has anyone found a working download for CF801-Extensions-for-Eclipse.zip?

 http://download.macromedia.com/pub/coldfusion/8/eclipseextensions/CF801-
Exte
 nsions-for-Eclipse.zip

 The url above is giving me a file not found.

 -Dan






~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302709
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Working download for CF801-Extensions-for-Eclipse.zip?

2008-04-04 Thread Dan G. Switzer, II
 Has anyone found a working download for CF801-Extensions-for-Eclipse.zip?


About half way down this page:

http://www.adobe.com/support/coldfusion/downloads.html

That's where the link I posted came from.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302726
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qforms: transferring values from one select to another

2008-04-04 Thread Dan G. Switzer, II
Mike,

great!! thanks for that.

the following code works...

objForm = new qForm(related_product_form);
objForm.products_available.makeContainer();
objForm.products_available.dummyContainer = true;
cfoutput
objForm.products_selected.setValue('#valueList(getRelated.product_idfk)#');
/cfoutput

my problem now is that if the user decides to transfer an item back to
products_available (potentially removing focus from the other
products_selected items) then the form submits only what is highlighted in
the products_selected - which now may be nothing?

You need to make products_selected a container too:
objForm.products_selected.makeContainer(products_available);

(You don't want it a dummy container, you want it a real container.) It's
the making it a container part that tells qForms to select all the options
in the select box before submitting to the server.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302772
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Working download for CF801-Extensions-for-Eclipse.zip?

2008-04-04 Thread Dan G. Switzer, II
Paul,

Has anyone found a working download for CF801-Extensions-for-Eclipse.zip?

http://download.macromedia.com/pub/coldfusion/8/eclipseextensions/CF801-
Exte
nsions-for-Eclipse.zip

The url above is giving me a file not found.

-Dan


Must've been a typo in the file name.  Here's the real URL:
http://download.macromedia.com/pub/coldfusion/8/eclipseextensions/cf8_exten
sions_for_eclipse.zip

That's the link for v8. I'm looking for a working link to the v8.01
extensions.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302773
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Flex Ajax Bridge jQuery...

2008-04-03 Thread Dan G. Switzer, II
Andy,

Has anyone on this list done any work with the FABridge code provided by
Adobe for use in working with Flex?

I've got it running great when it's in a plain script block inside the body
tag. But the second I put it inside a jQuery $(document).ready call, it
dies (with no errors). I've tried putting the call in different locations,
I've tried loading in the SWF explicitly, but nothing works. I've provided
a snip of the two codes below. Any help would be greatly appreciated!!

Just remember the whole purpose of the $(document).ready() function is to
fire off when the *DOM* is ready, but it doesn't mean all external images
and SWFs are loaded.

I'd just leave those calls outside of any ready() function, since I assume
they hook into the windows.onload event (which would be the correct event to
wait for to get a loaded SWF.)

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302565
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qforms: transferring values from one select to another

2008-04-03 Thread Dan G. Switzer, II
Mike,

sorry the yahoo mailing list seems to be down for qforms so thought someone
on here may be able to help.

Due to the amount of noise (aka spam) I have to approve first time posters
first. The list isn't down, I just didn't get through to approving your
message until this morning.

have simple form (2 x multiple select containers) that let you select
'related products' for a particular product.

the qforms default setup works great, but what i am trying to do is
populate the 2nd select with any existing related selections. at the
moment, these are not included in the submitted form information (unless i
transfer them back to the first select - then transfer back)???

a snippet of my code is as follows...

First select
select name=products_available size=20 multiple style=width:90%;
onDblClick=objForm.products_available.transferTo('products_selected');
cfoutput query=getProducts group=product_title
  option
value=#getProducts.product_id##getProducts.product_title#/option
/cfoutput
  /select

Second select (where i want any existing selections to appear)
select name=products_selected size=20 multiple style=width:90%;
onDblClick=objForm.products_available.transferFrom('products_selected');
 cfoutput query=getRelated
  option
value=#getRelated.product_idfk##getRelated.product_title#/option
/cfoutput
  /select

my qforms code is the default...
SCRIPT LANGUAGE=JavaScript
   !--//
   // initialize the qForm object
   objForm = new qForm(related_product_form);

   // make the User field a container, this will ensure that the
reset()
   // method will restore the values in the select box, even if they've
   // been removed from the select box
   objForm.products_available.makeContainer();
   // setting the dummyContainer property to false will ensure that
no
values
   // from this container are included with the value
   objForm.products_available.dummyContainer = true;

   // make the Members field a container--every item in the Members
select box
   // will be part of the container, even if the item isn't selected.
   objForm.products_selected.makeContainer();
   //--
/SCRIPT

You want to use the bindTo parameter on the makeContainer() methods to
bind the 2 related select boxes together:

http://www.pengoworks.com/qforms/docs/extension_fields.htm#makeContainer

objForm.products_available.makeContainer(products_selected);
objForm.products_selected.makeContainer(products_available);

I would then use:

objForm.products_selected.setValue(existing,values,here);

To re-populate the list with the saved values. It should take care of moving
the values from one list to the next.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302568
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Flex Ajax Bridge jQuery...

2008-04-03 Thread Dan G. Switzer, II
Andy,

My point was just leave the code the way it was working. I wouldn't try to
trigger it with jQuery at all.

-Dan

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2008 9:33 AM
To: CF-Talk
Subject: RE: Flex Ajax Bridge  jQuery...

This is for an AIR app Dan...would it be alright to switch the
document.ready over to a window.ready?

-Original Message-
From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2008 7:37 AM
To: CF-Talk
Subject: RE: Flex Ajax Bridge  jQuery...

Andy,

Has anyone on this list done any work with the FABridge code provided
by Adobe for use in working with Flex?

I've got it running great when it's in a plain script block inside the
body tag. But the second I put it inside a jQuery $(document).ready
call, it dies (with no errors). I've tried putting the call in
different locations, I've tried loading in the SWF explicitly, but
nothing works. I've provided a snip of the two codes below. Any help would
be greatly appreciated!!

Just remember the whole purpose of the $(document).ready() function is to
fire off when the *DOM* is ready, but it doesn't mean all external images
and SWFs are loaded.

I'd just leave those calls outside of any ready() function, since I assume
they hook into the windows.onload event (which would be the correct event
to
wait for to get a loaded SWF.)

-Dan






~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302597
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qforms: transferring values from one select to another

2008-04-03 Thread Dan G. Switzer, II
Mike,

objForm = new qForm(related_product_form);
objForm.products_available.makeContainer();
objForm.products_available.dummyContainer = true;
objForm.products_available.makeContainer(products_selected);
objForm.products_selected.makeContainer(products_available);

stProductsSelected = new Object();
cfoutput query=getRelated
stProductsSelected[#getRelated.product_idfk#] =
#getRelated.product_title#;
/cfoutput

objForm.products_selected.setValue(stProductsSelected);

now there are no items appearing in the products_selected form? i imagine i
am doing something quite dumb?

Instead of create an object, you just use:

objForm.products_selected.setValue(valueList(getRelated.product_idfk));

The setValue() method takes a comma delimited string (just like you'd see in
ColdFusion when the form is submitted.)

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: TOT - FireFox memory issues

2008-04-02 Thread Dan G. Switzer, II
Gerald,

I have trimmed down my plug-in usage to the bare minimum of Firebug, the
Web
Developer tool bar, delicious and Google tool bar. All of which I use
everyday, all day.

One important note on FF. Just disabling a plug-in is not the same as
uninstalling it. I've seen problems caused by disabled plug-ins. You'd
think that disabling it would prevent it from doing anything, but an
installed plug-in still affects FF.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302531
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: How to obtain just the domain from a URL

2008-03-26 Thread Dan G. Switzer, II
Nate,

Would I use a REGEX to achive this? Or some other method?

Start with something like:
http://www.popularmechanics.com/technology/military_law/4255750.html

End up with:
popularmechanics.com

Example 2

Start: http://blogs.abcnews.com/politicalpunch/2008/03/dnc-official-cl.html
End: blogs.abcnews.com

A while back I wrote a UDF for parsing a URL which will give you all sorts
of information about the URI:

http://blog.pengoworks.com/index.cfm/2006/9/27/CFMX-UDF-Parsing-a-URI-into-a
-struct

This will correctly parse the domain (and many other things) out of any
valid URL, including:

http://usr:[EMAIL PROTECTED]:80/bar/sub/file.gif;p=5?q1=item1q1=item2q2=item
3#nameAnchor

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302091
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Best way to order appearance of database content...

2008-03-13 Thread Dan G. Switzer, II
Rick,

Say, I've got two agents in the db.  First has display-order 10, second has
display-order 20.  A third agent is added who is to be displayed second, so
is given the display-order number 15 in the form.  When the form is
submitted,
the first agent retains number 10, the new second agent's number is rounded
up from 15
to 20, and the agent whose number was 20 now has the number 30.  That way
there
are always values between the agents' display-order numbers to add new
agents.

Make any sense?

Would this be the best way to do this?  Other ways?

There's no reason to use number in multiples of 10. Just store their real
order and do something like:

cfset iNewUserOrder = 3 /

!---// do this before inserting //---
cfquery
update
Employees
set
display-order = display-order + 1
where
display-order = #iNewUserOrder#
/cfquery

Then ever user who's order was 3 or more is shifted up and then you can
actually insert the new user at position 3.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301154
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Bluedragon = open source

2008-03-12 Thread Dan G. Switzer, II
From: Dave Watts [mailto:[EMAIL PROTECTED]

 See, that's exactly what i'm talking about. If another
 company adds a feature *before* Adobe does, then how is it
 not the responsibility of Adobe to maintain compatibility
 when they themselves add the same feature? Should the other
 company in question break backwards compatibility with their
 own code just to match Adobe's implementation? Once again we
 see the position that only Adobe is allowed to innovate in
 this area.

Adobe is not selling a CFML engine. Adobe is selling ColdFusion. Adobe
hasn't standardized CFML, and has no responsibility to any other vendor
selling CFML engines. You can argue that those other vendors likewise have
no responsibility to Adobe, and I'd agree, but if you build a product that
provides compatibility with someone else's product as its chief feature,
the
onus is on you to provide that compatibility.

I've always thought BD would have been better served by using the cfx_
extension for additions they made to the language. That would at least give
developers who want to use BD as their core language the ability to write
custom tags that could be implemented in other versions of CF. It would seem
to address a lot of issues of compatibility...

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301050
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-06 Thread Dan G. Switzer, II
  I know I can do this in Javascript but I'm hesitant to roll my own
  when qForms is already validating the rest of the form (some 15 other
  required fields).  Is there a way to do this in qForms?

  This should do what you want:
  http://www.pengoworks.com/qforms/ext/atLeastOne.htm

  You can use it like:

  oForm.textareaName.validateAtLeastOne(checkboxName);

  That should enforce that at least the textarea is filled in or one of
the
  checkboxes is checked.

I tried this and it does not seem to be working.  I'm not getting any
errors on the JS Error console so I know it's *working*.

I have all of the formfields created, here is the JS call for qForms:

script type=text/javascript
objForm = new qForm(catrequest);

objForm.catalogtype.description =  catalog type;
objForm.fldComments.description =  general comment;
objForm.catalogtype.validateAtLeastOne(fldComments);

objForm.required(txtFirstName,txtLastName,txtCompany,txtEmail,txtAddress,t
xtCity,txtState,txtZip,txtCountry,txtPhone);
objForm.txtFirstName.description =  First Name;
objForm.txtLastName.description =  Last Name;
objForm.txtCompany.description =  Company Name;
objForm.txtEmail.description =  email address;
objForm.txtAddress.description =  mailing address;
objForm.txtCity.description =  City;
objForm.txtState.description =  State (or Province);
objForm.txtZip.description =  Zip or Postal Code;
objForm.txtCountry.description =  country;
objForm.txtPhone.description =  phone number;

objForm.txtFirstName.focus();
/script

Do I need to make any changes to the Form code itself?


Are you loading the validateAtLeastOne() function?

Also, make sure that the textarea doesn't contain any whitespacing. If you
wrote your textarea tags as:

textarea
/textarea

Then you're tag has whitespace, which would cause the validation rule to be
skipped (since it contains a value.)

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300653
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-06 Thread Dan G. Switzer, II
It should be:

// set the path to the qForms directory
qFormAPI.setLibraryPath(/includes/qforms/lib/qforms/);
// this loads all the default libraries
qFormAPI.include(*);

You've also got to include the function that on in the page on:
http://www.pengoworks.com/qforms/ext/atLeastOne.htm

-Dan



-Original Message-
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2008 2:28 PM
To: CF-Talk
Subject: Re: qForms Question

Okay, made some changes to the qForms call -

script type=text/javascript

objForm = new qForm(catrequest);

// set the path to the qForms directory
objForm.setLibraryPath(/includes/qforms/lib/qforms/);
// this loads all the default libraries
objForm.include(*);

objForm.catalogtype.description =  catalog type;
objForm.fldComments.description =  general comment;
objForm.catalogtype.validateAtLeastOne(fldComments);

objForm.required(txtFirstName,txtLastName,txtCompany,txtEmail,txtAddress,t
xtCity,txtState,txtZip,txtCountry,txtPhone);
objForm.txtFirstName.description =  First Name;
objForm.txtLastName.description =  Last Name;
objForm.txtCompany.description =  Company Name;
objForm.txtEmail.description =  email address;
objForm.txtAddress.description =  mailing address;
objForm.txtCity.description =  City;
objForm.txtState.description =  State (or Province);
objForm.txtZip.description =  Zip or Postal Code;
objForm.txtCountry.description =  country;
objForm.txtPhone.description =  phone number;


objForm.txtFirstName.focus();
/script

Now in the JS Error console I get: objForm.setLibraryPath is not a
function

??



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300680
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qForms Question

2008-03-06 Thread Dan G. Switzer, II
  You've also got to include the function that on in the page on:

 http://www.pengoworks.com/qforms/ext/atLeastOne.htm

That code exists in /includes/qforms/lib/qforms/validation_addon.js
 that's why I thought forcing the include would work.

(*scritch*)

The qFormAPI.include(*) only loads the all the core files. You'll have
to manually load the validation_addon.js library.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300684
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Find/Replace for Eclipse

2008-03-05 Thread Dan G. Switzer, II
Aaron,

The built in find tool is the one thing I cannot adjust myself too, it
works
fine on one page although I would really like to find all instances of
something in that page and have a preview pane that I can click on to go
to/from each instance.  Perhaps I am just using it incorrectly, not really
had the time to mess with it, tried the ctrl-f and Search  Search.  The
latter gets close although it will say something like FileName.cfm (9
matches) instead of giving 9 separate links, this is where I figure I am
doing something wrong and there is someway to expand that out.

If you highlight a phrase, you can use CTRL+K and SHIFT+CTRL+K to cycle
through instances of that phrase/word within a document. No need to even
bring up the Find dialog.

Also, when you do the Search feature it will automatically place gutter
markers that you can click on to jump to specific points in the document
(those are the little squares to the right of the editor.) You can also use
the arrow keys to cycle through the instances in the Search View.

-Dan 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300499
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qForms Question

2008-03-05 Thread Dan G. Switzer, II
Hatton,

I've inherited  a form that is using qForms for validation.  The
form includes a series of three checkboxes, all with the same name but
different values,  further down there is a textarea.  The client has
asked for a validation rule that requires either one of the checkboxes
to be checked, the textarea to contain a value or both.  If the user
does not check a box or enter something in the texarea, a validation
message needs to appear.

I know I can do this in Javascript but I'm hesitant to roll my own
when qForms is already validating the rest of the form (some 15 other
required fields).  Is there a way to do this in qForms?

This should do what you want:
http://www.pengoworks.com/qforms/ext/atLeastOne.htm

You can use it like:

oForm.textareaName.validateAtLeastOne(checkboxName);

That should enforce that at least the textarea is filled in or one of the
checkboxes is checked.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300547
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: qForms Question

2008-03-05 Thread Dan G. Switzer, II
Tom,

oForm.textareaName.validateAtLeastOne(checkboxName);


That is extremely cool. I've been using qForms for a long time, but I
didn't
realize you could relate validations across elements that way. Thanks for
the tip.

It's not a perfect solution--since you need to attach the validation to one
of the fields, but that custom method will do the trick for those validate
either a or b type of situations.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300552
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: qForms Question

2008-03-05 Thread Dan G. Switzer, II
Tom,

 It's not a perfect solution--since you need to attach the validation to
 one
 of the fields, but that custom method will do the trick for those
validate
 either a or b type of situations.


Seems pretty good to me. So -- the method you specified will validate that
EITHER  one of the checkboxes is checked OR there is content in the
textarea?

Correct. In a nutshell it's Make sure at least one of these fields has a
value.

That's the sort of thing where I always added a custom validator or at
least
used an Expression. Are there other examples on your site, or elsewhere,
that go into this sort of validation of related fields? I must have missed
them.

Someone paid me to write that extension, but I had the stipulation that I be
allowed to post it on my website. It's the only extension that's not in
the download.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300572
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Relative path when instantiating a CFC?

2008-02-13 Thread Dan G. Switzer, II
I want to use a relative path when instantiating a CFC.  Can this be done
when using createObject()?  Can it be done at all?


There is also a UDF at cflib that allows relative paths. Though it does use
coldfusion.runtime.TemplateProxy. So it might not work in CF8 if access to
internal java components is disabled.

http://cflib.org/udf.cfm?ID=900

The updated version on my blog works with CF6/7/8:

http://blog.pengoworks.com/index.cfm/2003/3/27/UDF-component-for-CFMX

It uses the TemplateProxyFactory for CF7  8. The obviously uses undocument
internals for CF, so there's always the possibility it will break in the
future.

However, it's been working fine for me over 5 years.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298866
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Using cfinput causes form fields to show through?

2008-01-30 Thread Dan G. Switzer, II
William,
I looked into this (see my other post) and the z-index for the input field
gets set to 0, the autosuggestcontainer gets set to 9050 and the shadow to
9049.  The problem lies in that IE6 and z-index don't get along (at all).
IE6 literally resets all z-index to 0 once the page loads.

That's not true at all. IE doesn't reset z-index to 0 once the page loads.
There are elements (such as the select and iframe elements) that actually
reside outside of the context of the browser in IE6 because it used internal
Windows controls--this was fixed in IE7. You can read more about that here:

http://blogs.msdn.com/ie/archive/2006/01/17/514076.aspx

Well there may be a problem on your page with the z-indexing and IE6, IE6
doesn't do anything to natively to reset z-indexes after the page is loaded.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297718
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: POI, Excel and row limitations

2008-01-14 Thread Dan G. Switzer, II
Rick,

I'm using the POI library to produce excel files.. specifically the
library that is included with CF8.  I don't think I installed any
additional class files.

Anyway, when I produce excel files larger than 65536 rows, they get
cut off, and when I open the file in Excel I get File Error:  Data
may have been lost

But Excel seems to open delimited text files of greater than 65536
rows with no problem.

Can excel not handle actual worksheets with  65536 rows?  Or is the
Java POI interface somehow limiting the worksheets it creates to that
number of rows?

You'll need to split the data into multiple Worksheets. Excel has a row
limit of 65536 for a native XLS file for each Worksheet:
http://answers.google.com/answers/threadview?id=6207

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296531
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Viviotech Outage

2008-01-04 Thread Dan G. Switzer, II
They are at least 3-4 hundred miles from northern california.

It does look like Walla Walla is getting hit by bad weather too:
http://www.klewtv.com/news/local/13059437.html

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295902
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Viviotech Outage

2008-01-04 Thread Dan G. Switzer, II
I'm still getting the no connexion as well...

http://weather.cnn.com/weather/forecast.jsp?locCode=ALWzipCode=99362

That's the forcast for Walla Walla

I'm starting to get a little concerned as well.

It's probably not weather related. My guess is there's a physical connection
with their bandwidth--either their lines were cut (which I've seen done by
construction crews) or a problem with their bandwidth provider.)

Could be lots of reasons, but I figure since their phone lines are down too,
it's probably a physical infrastructure problem.

That's just a guess though, I have no relationship to Viviotech at all.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295901
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: mssql pagination

2008-01-03 Thread Dan G. Switzer, II
Jonathon,

Here's a stored procedure you can use in MSSQL 2k for pagination:

http://blog.pengoworks.com/index.cfm/2006/6/19/MSSQL-2k-Stored-Procedure-for
-Pagination

It doesn't use #temp tables and it will only return the pages of data you're
after. I've used it on tables with several millions of records and had great
success with it.

Also, in SQL Server 2005 you can solve this problem with Common Table
Expressions (CTE)

-Dan

-Original Message-
From: Jonathon Stierman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 02, 2008 6:01 PM
To: CF-Talk
Subject: mssql pagination

I can't imagine I'm the first person to try to do something like this, so
hopefully you guys can give me some insight!  I know this isn't strictly
CF-related -- but I'm hoping some of you have tried to do something like
this in the past.

I'm trying to produce a paginated list of records.  The query I'm working
with has about 2 rows, and I'd rather not force the user to sift
through
all those pages in a single page request.  So I'd like to break it up,
maybe
display 50 records per page.  I'd also prefer not to have the full query
sitting in memory every request.  If I'm only displaying rows 50-100, I
only
want rows 50-100 in the query object.  Using cfloop with startrow and
maxrows won't cut it this time.

Apparently this is super easy in MYSQL using the LIMIT (records), (offset)
clause.

Turns in MSSQL makes things difficult.  A couple sites I hit up showed
examples of using of subqueries and the TOP filter, or (ugh) temporary
tables.  I went with the subquery/TOP approach.  For example, ordering by
dateAdded and wanting to show rows 20-30:

SELECT TOP 10 sampleID
FROM Samples
WHERE 0=0
AND sampleID NOT IN (
   SELECT TOP 20 sampleID
   FROM Samples
   ORDER BY Samples.dateAdded
)
ORDER BY Samples.dateAdded

Grab the first 10 records after eliminating the first 20 records, always
sorting by dateAdded.

But I found it worked sporadically.  Pages 1 and 2 worked fine, displaying
the 1-10 and 11-20 records respectively.  But page 3 gave me some strange
results.  It showed records 14-23 or some other mismatch.  Obviously not
what I was looking for!

After some investigation, I found out my subquery was not returning the
right samples to exlude.  What I haven't been able to figure out is *why*
they are not returning the right subset.  As far as I can tell, the SQL
looks good to me.

So my question to you guys is --

1.  Can you see anything wrong with how I've set up my Query?
2.  How have you dealt with pagination in the past?  Is there an easier
route than what I'm taking now?

PS -- I am running on MSSQL Server 2000 (I have heard they offer an OFFSET
clause in 2005, but sadly, I do not have access to that).

If anyone is interested in seeing some sample data of what I'm working on,
I
put up this HTML page:

http://www.vimm.com/developerTools/sampledata.html

You can see in the All Samples section that records 20-30 should be:
[147,
148, 149, 150, 63, 36, 40, 382, 383, 384].
But the Total Wrapper query returns: [146, 147, 148, 149, 150, 63, 382,
383,
384, 440].
What happened to record 40?  It's row #27 in the All Samples query, but
it's
included in the exclude Nested Subquery that should only be pulling the top
20 results.  How does that happen?

Jonathon





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295736
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: CFHTTP and Caching

2007-12-24 Thread Dan G. Switzer, II
Ian,

This is the error I am getting below even though weather_xml has been
defined in the application.cfm page

i.e. CFSET APPLICATION.weather_xml =XMLParse(cfhttp.FileContent)

ERROR IS

Element WEATHER_XML is undefined in APPLICATION.


My application.cfm page is


cfset Application.TimeStamp=#TimeFormat(now(), 'hh:mm:ss')#

CFIF (APPLICATION.TimeStamp EQ ) OR (DateDiff(n,
APPLICATION.TimeStamp, TimeFormat(NOW(), hh:mm:s)) GT 20) CFSET
APPLICATION.TimeStamp = CreateTime(TimeFormat(NOW(), hh),
TimeFormat(NOW(), mm), TimeFormat(NOW(), s))

cfhttp url=http://feeds.bbc.co.uk/weather/feeds/rss/5day/id/3314.xml;
method=GET resolveurl=No/cfhttp
CFSET APPLICATION.weather_xml =XMLParse(cfhttp.FileContent)

/CFIF

The way that logic reads, the Application.TimeStamp will always be less
than 20 the first time the application is loaded--so your CFHTTP tag will
never run.

Change the code to something like:

cfif 
not structKeyExists(Application, TimeStamp) 
or 
(dateDiff(n, Application.TimeStamp, now()) gt 20) 

cfset Application.TimeStamp = now() /

cfhttp

url=http://feeds.bbc.co.uk/weather/feeds/rss/5day/id/3314.xml;
method=GET resolveurl=No/cfhttp
cfset Application.weather_xml = xmlParse(cfhttp.FileContent) /

/cfif

There's no need to convert your Application.TimeStamp variable to any
specific formatting--you can just set it to now().

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295321
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Exclusive locks still producing duplicate values

2007-12-18 Thread Dan G. Switzer, II
Dave,

We have have an issue here that I thought I had solved via locking and
transactions, but it appears that the issue still exists.

Basically, our clients go through an order entry process that produces a
numbered requisition.  The number is based upon a value that is stored in
the database for each client.  Multiple users of the same client can
obviously place orders simultaneously all drawing their base number from
the
same location.  The section of code that actually creates the req number
and
stores the data is run within a serialized transaction that sits within an
exclusive named lock.  If I'm understanding locking correctly, the
exclusive
named lock should prevent any other execution of that same code within the
same application.  The serialized transaction should restrict access to the
tables required to that single transaction, again if I'm understanding it
correctly.

Also, if you're generating this Request number on a page before you
actually submit to database, then a user clicking the submit multiple times
would generate duplicate records with the same request number.

Example: on Page A you generate the request number so you can display it to
the user. Page A allows the user to confirm the creation process. When the
user clicks the submit button, it goes to Page B which actually inserts
the data into the database. If the user clicks the submit button multiple
times it can create multiple requests.

Are you ever storing this request number in any scope (Session, Form, Url,
etc?)

Also, are you absolutely positive your code is returning unique numbers?
You're locking may be working, but if there's an error in the logic you
could still produce duplicate request numbers.

For example, let's say you were creating a number based upon the current
date time stamp:

cfset dtNow = dateFormat(now(), mmdd)  timeFormat(now(), HHmmss)
/

cflock
  !--// insert unique number //--
/cflock

By creating the dtNow number outside of the lock, I'm opening myself up to
duplicate values. 

This is just an example...

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294989
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: memory issues

2007-12-18 Thread Dan G. Switzer, II
Jonathon,

Robi Sen has some excellent information on memory issues like you're
experiencing:

http://www.robisen.com/index.cfm?mode=entryentry=FD4BE2FC-55DC-F2B1-FED0717
CC1C7E0AF

Are you using the default JRE? 

If so, you might consider upgrading to JRE SDK 1.4.2_13--which I believe is
the most recent version that CF officially supports.

Also, prior to CF8 the cffile / implementation for reading files was
notoriously problematic when reading large files (although it should be ok
on files from the 200K to 5MB range.)

Java is just not really good with large strings--it's always been a weakness
of the language.

You might want to consider going straight to Java to read a file
line-by-line (instead of the entire file.) Here's a UDF from CFlib that
shows reading a file by line:

http://www.cflib.org/udf.cfm?id=417enable=1

This might help you reduce the memory needed for each request.

Lastly, make sure you're caching whatever results you can. If you're
constantly parsing the same files over and over, just cache the results once
you've generated them. There's no reason to keep doing expensive CPU
operations if it's unnecessary.

-Dan

-Original Message-
From: Jonathon Stierman [mailto:[EMAIL PROTECTED]
Sent: Monday, December 17, 2007 10:58 PM
To: CF-Talk
Subject: memory issues

An application of mine has recently been acting up -- memory has been
shooting up at a fairly rapid pace this past week, and I'm at my wits end!
Can't seem to find any way to fix it.  Here's the symptoms:

After rebooting the CF service, memory starts out at about 60mb for the
jrun.exe process.  After that all hell breaks loose ;)  It continues to
consume about 4 megs a minute until it plateau's at about 590mb.  At that
point, the server starts delivering 500 null errors, and my
application/exception.log files fill up with java.lang.OutOfMemoryError
messages.

The site gets a couple hits a second, and  those hits are fairly heavy in
processing.  Most involve file-reading and then parsing that file for the
relevant data.

I have downloaded a trial version of FusionReactor and got that set up on
the system.  If I'm reading it right, it looks like every request coming in
is consuming large amounts of memory.  I can understand why they'd take up
lots of memory -- each one has to read a text file that is between 200k and
5 megs, and that seems to correlate with the memory jumps -- but why
wouldn't that memory be released after the request is complete?  It just
keeps piling up.

Is this to be expected from high volumes of file-reading/parsing requests?
What advice can you give for getting some of that memory free and
available?

Server monitoring and tweaking is definitely not my forte -- any help and
knowledge will be much appreciated!

TIA!

Oh -- incase the box info helps.  It's a Windows Server 2003 dedicated
server, running CFMX7 Standard.

Jonathon





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294990
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Exclusive locks still producing duplicate values

2007-12-18 Thread Dan G. Switzer, II
cflock name=#session.st#ProcessLock timeout=20 type=exclusive

I'm taking a bit of a guess here, but I think your name may be the problem.
I'm assuming that by having a session variable in the name, each user will
have a different name for the lock.  Named locks are only locked from
blocks with the same name.  If each user is getting a unique name, then the
block will not be locked between users.  That is my understanding of locks
at least.

If this is the case, you want a single, discreet name for the lock so that
all users use the same named lock and thus can only use the block of code
one at a time, which I believe is your requirement.

The fact that the lock is given a name based upon a session variable is
definitely a problem--that only guarantees that the locked code won't run
for sessions where the variable session.st is identical. I'm guessing that
variable is unique per session.

Also, just because you lock code calling the ReqNumbering.cfc component, the
code in that component is not necessarily locked. That means if
RegNumbering.cfc is called from other places outside of this locked code,
it would run unlocked.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: memory issues

2007-12-18 Thread Dan G. Switzer, II
1.
User logs in and requests a file.

2.
Application reads file, and builds a Query object out of it.  Every line of
the file is saved to the Query.

3.
A SELECT statement is performed on the Query to only get the relevant data
for that user (cached for 30 minutes)

4.
Results of SELECT shown to user

The caching was added to speed up the processing on that page, but I'm
wondering if it's causing my memory issues.  Assuming the Query object is
probably about the same size as the file the user reads, then I'd be
caching
the 200kb-5mb for every user.  Sounds great for CPU/speed performance, but
not so good for memory conservation.  Am I off my rocker, or could this be
the culprit?

A query object of a text file I'm sure would use more memory than just the
text file stored as a string. It also depends on how much of the cached
queries contents you're keeping around (you indicated that your doing a QoQ
and caching those results.)

That caching could definitely be the cause of the problem. I'd recommend
poking around your application and session scopes to see just how much data
you're actually caching.

Check out this post by Steve Brownlee:
http://www.fusioncube.net/?p=66

The section labeled All ColdFusion Sessions shows you how can get to all
the sessions on the server. I believe one of the associated SessionTracker
classes has a method that will actually allow you to determine the memory
being used by a session (but that may only be in CF8.)

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295022
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: memory issues

2007-12-18 Thread Dan G. Switzer, II
Jonathon,

And while it definitely seems to slow down the memory consumption rate, it
still doesn't appear to be freeing up any RAM.  I did some test runs,
loading some of the larger files. I saw the corresponding RAM increase, but
never seeing that memory released.

I plan on converting it all to being database-driven, but I'm still
confused
as to why this memory isn't being released.

Are the Queries being eliminated, but not removed from memory just yet?  Is
there a way to force garbage collection while CF is running so that I could
test this theory?

Just because you're not using the memory, it doesn't mean that Java will
free it up immediately. Since Garbage Collection is an expensive CPU
operation, it tries to do the GC as infrequently as possible by default.

You can think of Java and its Garbage Collection sort of like the Windows
Recycling Bin. Just because you delete a file and put it in the Recycling
Bin, it doesn't actually free up disk space right away. The file is in the
Recycling Bin and still takes up disk space. Windows will eventually remove
the files and reclaim the disk space when it needs to based upon your
Recycling Bin settings. 

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295060
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Server performance problem since upgrading to CF8

2007-12-14 Thread Dan G. Switzer, II
Every since upgrading to CF8 I've been having a frustrating problem.
After
starting CF, it will run for a while (sometimes serveral hours, sometimes
less than an hour) at about 1% - 3% in terms of processor load.  (It's a 2
cpu - 4 core system.)  Then, all of a sudden, the processor load will jump
up to about 25% and stay there until CF is restarted. Pages then start
loading very sluggishly.  This never happened with CF7 and I haven't made
any code changes since upgrading.
Also, the CF code that this server runs is very light.


I have had this EXACT problem!  Have you found a solution?  A fire-
breathing, quad-processor, dual core Dell that just locks up - weird!

Do you have any of CF8's Server Monitoring enabled? It's known to cause
performance issues and should only be used to debug problems; you shouldn't
enable it in normal circumstances.

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294766
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: cfthread nor not? -- any best practice out there?

2007-12-14 Thread Dan G. Switzer, II
I'm using cffeed for a bunch of rss feeds (specifically 4 feeds for now).
For code reuse, I have a component which has a function for passing
parameters including source (as a structure).

One approach (named A):
Not using cfthread, execution seems reasonably fast.
http://24.254.1.94:8000/cf8/smallbiznewsfeed_nothread.cfm?

Another approach (named B):
Using cfhread, execution speed not consistent.
http://24.254.1.94:8000/cf8/smallbiznewsfeed_threads.cfm?

Commonality:
-- both call/invoke the same cfc method  same technique of invocation
-- both use cfwindow to handle display

Differences:
-- as mentioned above, A does not use cfthread while B does
-- with A, four cfwindow are constructed manually for each feed while
cfwindow is inside the feed output loop for the B, so, cfwindow is
dynamically constructed, and so B has a few more lines of code for
dynamically setting x and y value.

Server Infor  Setting:
-- OS= Windows XP; CFserverVersion=8 standard; CF thread default=10

Additional Info:
-- the cfc has about 20 line of code;
-- both A and B has about 100 line of code respectively;
-- read up some blogs on cfthread, however, in this case, it does not seem
to help, and I happen to think my code is not lousy, so, what's up?
-- Exeution time is hiding behind windows :)

I'm not even sure what you're real question is, it seems you're implying
that the cfthread / version is worse performing (which wasn't my
experience hitting the pages a few times. The cfthread / version was
always faster.

Your environment is going to largely dictate what kind of advantages you see
from threading tasks in your code.

Also remember anytime you need to join the threads together, which would be
the case here, your code is still going to have to wait for the slowest
running thread.

That means if you have a feed that on average takes 900ms to return its
results, that's not a bottleneck threading your code will fix. 

The benefit really comes from when you have 4 processes that each takes
900ms to complete. You're going to have to wait at least 2800ms for that
task to finish when run in serial. By threading the processes and running
them in parallel, you'll drastically reduce the wait time since all of those
tasks run at the same time. You could end up reducing the wait time by
2100ms.

You'd really notice the benefits of threading the requests if you start
running into network latency issues or issues with the server returning the
results in timely manors. 

-Dan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294843
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: OT: Eclipse speed issue

2007-12-12 Thread Dan G. Switzer, II
Jake,

Thanks for the suggestion.  I changed my my heap to a min of 128 and a max
of 512 in my eclipse.ini file.  I'm not sure I really see a difference.  I
did, however, notice that Build Automatically was checked in the project
settings.  I unchecked that.  I suspect that recompiling 25,000 lines of
code over and over wasn't ever going to be very fast.  That helps the speed
issue a bit but I might still be missing something.

If any more advanced Eclipse users have any suggestions, I'd love to hear
them.

My guess is it's just having problems parsing a file that big. Generally
most Java classes are no where near that size and my guess is the parsers
for syntax highlight and code hints are just taking a long time.

As I've never worked on a Java class anywhere near that size, I'd recommend
searching for answers on an Eclipse-based mailing list.

I will say I have problems with CFM templates in CFEclipse that are more
than a few 1,000 lines of code, but it seems to be related to CFEclipse
(since I can open the templates in other views without the degradation in
performance.) I'm pretty sure it's the parser in CFEclipse that's having
problems parsing the template. I suspect if I turned off code hinting the
problem would go away, but the problems I've seen could be related to the
color parsing.

Anyway, my guess is it's an issue with the parser for the Java perspective.
There may be a workaround, but you're most likely to find solutions from
people who work with the Java perspective almost exclusively.

-Dan


~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294586
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Encrypting/Decrypting XML

2007-12-05 Thread Dan G. Switzer, II
Scott,

Is there a way to encrypt and decrypt XML on the fly.

I'm building a small cms, and want to store the login information in an XML
file. I need to be able to read

An encrypted file, do the typical login/password check and leave the file
encrypted on the server, to keep it away from prying eyes.

You could just hash the password and then store it in clear text in the XML.


-Dan


~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294249
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Eclipse CFEclipse

2007-12-04 Thread Dan G. Switzer, II
Assuming you're an Eclipse/CFEclipse user, how would
you respond to this question:

Is Ecliple/CFEclipse overkill for an independent developer,
who never has to worry about checking code in or out?

I am having some trouble keeping my development versions of
sites synced with my production versions.  It can get quite
crazy trying to keep up with what change are where.

Which is exactly why you need source control.

-Dan


~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294145
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: AJAX Caching

2007-11-29 Thread Dan G. Switzer, II
Ric,

I am building a little app in CF and using AJAX. (not CFAJAX)

Basically it has 2 types of functions.
The first returns a CF created table to display the data list.
The second returns a CF created list, that I break up in javascript to
populate my form.

I am having an issue that all the data being returned is cached (in the
browser, not server side).
Any ideas on how I can stop it? Is appending a uuid to the query string my
only option?
I am using the no-cache meta tag param but im sure that is just for the
front end html.

How do I also stop the javascript from being cached?
Without turning off caching in the browser.
This part wont be an issue for production, but its annoying in development.

Lots of solutions to this problem, but this method is one of the simplest to
implement:

http://www.ferdychristant.com/blog/archive/DOMM-6R8HL2

And don't forget that Google is your friend with these types of requests. A
simple search for prevent ajax caching brings back lots of solutions.

Also, if you don't want to go the JS route of adding a date stamp to the
url, you can pass back response headers to prevent caching:

http://www.greenash.net.au/posts/thoughts/an-ie-ajax-gotcha-page-caching

(Take a look at the comments for the CF equivalent code.)

-Dan


~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293993
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CF8 and CFmail, sending duplicate emails

2007-11-27 Thread Dan G. Switzer, II
Will,

We recently upgraded our server to CF8.

We have a number of clients who use emailing tools to send out emails to
opt
in lists. One of these clients did a mailout last week to a couple of
lists,
and it would appear that the emails all went at least twice to every member
of the list. The code has run perfectly on CF7 for a couple of years, so
I'm
pretty sure it's not a code issue.

I wouldn't be so quick to dismiss a code problem. I've seen a lot of code in
my time that once worked that stopped working on an upgrade. It could be
the use of a depreciated function or tag, or simply code that worked due to
issues in the CF engine at the time--but which shouldn't have run. 

Also, I believe I remember reading CF8 changed some behavior of nested
cfoutput/cfloop tags in CF8, but I can't recall exactly what I read.

Finally, I will say don't overlook the obvious. If a user clicks on a
link/button multiple times, unless your script explicitly prevents the
behavior, the server will process the request multiple times. This is the
most common cause of duplicates that I've seen.

-Dan


~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293863
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Updating to Eclipse 3.3...

2007-11-27 Thread Dan G. Switzer, II
 from 3.2 to 3.3; I think you have to simpy install 3.3. Unfortunately, I
 don't know how to preserve or import settings.

File, Export, General, Settings.

My personal experience is it's just easier to rebuild. I've tried the export
settings, but it's caused me problems in the past.

I think the problem stems from the fact that so many plug-ins are completely
re-written for different versions of Eclipse.

The good news is you should be able to go to File  Import  Existing
Projects into Workspace and it should import your project into your new
build (although things like the local history won't be imported.)

From there it's just a matter of installing the plug-ins you want. Maybe
it's because I only use a handful of plug-ins (CFEclipse, Aptana, FileSync,
Flex and the various Adobe Eclipse plug-ins,) but it usually only takes me
30 minutes or so to get all my plug-ins restored.

Also, I definitely think v3.3 is worth upgrading to. Performance for me has
been much, much better.

-Dan


~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293864
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Updating to Eclipse 3.3...

2007-11-27 Thread Dan G. Switzer, II
Andy,

What settings are you talking about?

Is there a single file, or a folder?

Do I have to reinstall all my plugins as well?

I'd recommend just extracting Eclipse v3.3 into a new folder and then
re-installing the plug-ins (as I stated in another thread.)

I think in the long run it'll make life for you smoother. Re-installing the
plug-ins shouldn't take long. 

-Dan


~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293871
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


  1   2   3   4   5   6   7   >