RE: CF-Smarty
Well, I made up my mind, it will be a template parser, generating the cfml code instantly. This has more advantages then the post parsing engine. Micha Schopman Software Engineer Modern Media, Databankweg 12 M, 3821 ALAmersfoort Tel 033-4535377, Fax 033-4535388 KvK Amersfoort 39081679, Rabo 39.48.05.380 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
cfx JRun closed connection
hi - i created a simple CFX tag to resize images since i couldnt find a tag out there ... if anyone has one (java, not c++) we don't have to try to resolve this post :) the tag works cuz i can go and view the resized image, however, the page that runs the script always displays: Server Error The server encountered an internal error and was unable to complete your request. JRun closed connection. i turned off debug after reviewin MM site but still no help. any suggestions? this is only running on my lap top so maybe i just dont have enough memory. my specs: CFMX on Win2k server P3 256RAM, 2G free disk space ya, not the best machine, but its what i got thx joe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
test
test [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Using Struts with CF
On Tuesday 24 Aug 2004 18:18 pm, Marco Antonio C. Santos wrote: Anybody here develops CF apps with Struts MVC pattern? What's your impressions? I looked at it (in Java). It basicaly looked massivly over complicated for the sort of job it was intended to do (form processing). -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [EMAIL PROTECTED] BlueFinger Limited Underwood Business Park Wookey Hole Road, WELLS. BA5 1AF Tel: +44 (0)1749 834900 Fax: +44 (0)1749 834901 web: www.bluefinger.com Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay, BRISTOL. BS1 6EG. *** This E-mail contains confidential information for the addressee only. If you are not the intended recipient, please notify us immediately. You should not use, disclose, distribute or copy this communication if received in error. No binding contract will result from this e-mail until such time as a written document is signed on behalf of the company. BlueFinger Limited cannot accept responsibility for the completeness or accuracy of this message as it has been transmitted over public networks.*** [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: categories, subcategories and sub-subcategories in a database
When building hierarchal tables I always recommend having both a parent, left sibling and left-most child pointers.This makes it easy to traverse the hierarchy in all directions. Andy -Original Message- From: Nando [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 10:25 PM To: CF-Talk Subject: Re: categories, subcategories and sub-subcategories in a database Hmmm, now what are you going to do when you change your mind about where something should be categorizied and want to move it? Or when you want to add more categories, or rearrange the categories, or shift a script from one category to another category (or list them in multiple categories!)? I think there's a better solution than hardcoding category levels into a variety of tables. Maybe it starts here somewhere. One table called Category. Each category has a PK, a parentid, a label for the category name, and maybe a level field to help you out when displaying the tree, the deeper the level, the higher the value, 1, 2, 3, 4 ... simple. When adding a category under a parent, increment the level by 1 from the parent and place the parent's PK as the parentID for that field. Simple then there's a Script table, with a PK, an foreign key, idCategory, and a longVarChar or a memo or whatever to store the script in. That'll do for a one to one relationship between category and script. Then your only challange is to figure out how to display your categories in hierarchies. RepeatString() might help you there. Or some div class=level#level# tags, if you get the idea. Well, ok, that might be your first challenge. :) But my suggestion is to abstract the concept category a little more completely. And the searches ... i don't see a problem with simply searching on the category name ... maybe from a dropdown. Or displaying a tree structure of all categories and a mouse click gets you there. If you want it useful, i'd simplify the user interface. And if you'd rather just HAVE a program to organize your code snippets in a heirarchical fashion, google for Treepad and go at it. :) The Lite version is free and that's what i use. (JICTH) Nando [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: for all you gmail users
For the genral laugh of it all, I added gmail as a folder as mentioned in this thread but as soon as I go to another folder and come back I get On Fri, 20 Aug 2004 13:50:30 -0400, Adam Haskell [EMAIL PROTECTED] wrote: As an aside if you really hate Outlook, try Lotus Notes for a while Try pegasus for and email client and even lotus will seem nice. Adam H On Fri, 20 Aug 2004 12:40:25 -0400, Jim Davis [EMAIL PROTECTED] wrote: Well - I'm an Outlook fan, but I'm not sure I agree with that. I consider it Microsoft's fault simply because they built stronger security into the product but SHIPPED it with little to now security enabled. Dumbasses making everybody hate my favorite email client.;^) As an aside if you really hate Outlook, try Lotus Notes for a while (something I'm being forced to do at work) - you'll have a whole new appreciation of Outlook in just a little while.;^) Jim Davis _ From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:55 AM To: CF-Talk Subject: RE: for all you gmail users I am not sure about loving outlook (oh fount of all virus intrusions!) That's the USER's FAULT! _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: for all you gmail users
...cut off for one and for another I get Unable to Display this folder any ideas anyone? I am using outlook 2002 Thanks in advance MD On Wed, 25 Aug 2004 14:20:18 +0200, Mark Drew [EMAIL PROTECTED] wrote: For the genral laugh of it all, I added gmail as a folder as mentioned in this thread but as soon as I go to another folder and come back I get On Fri, 20 Aug 2004 13:50:30 -0400, Adam Haskell [EMAIL PROTECTED] wrote: As an aside if you really hate Outlook, try Lotus Notes for a while Try pegasus for and email client and even lotus will seem nice. Adam H On Fri, 20 Aug 2004 12:40:25 -0400, Jim Davis [EMAIL PROTECTED] wrote: Well - I'm an Outlook fan, but I'm not sure I agree with that. I consider it Microsoft's fault simply because they built stronger security into the product but SHIPPED it with little to now security enabled. Dumbasses making everybody hate my favorite email client.;^) As an aside if you really hate Outlook, try Lotus Notes for a while (something I'm being forced to do at work) - you'll have a whole new appreciation of Outlook in just a little while.;^) Jim Davis _ From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 10:55 AM To: CF-Talk Subject: RE: for all you gmail users I am not sure about loving outlook (oh fount of all virus intrusions!) That's the USER's FAULT! _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Using Struts with CF
Java looks like that for most things I have to deal with :D On Wed, 25 Aug 2004 11:58:18 +0100, Thomas Chiverton [EMAIL PROTECTED] wrote: On Tuesday 24 Aug 2004 18:18 pm, Marco Antonio C. Santos wrote: Anybody here develops CF apps with Struts MVC pattern? What's your impressions? I looked at it (in Java). It basicaly looked massivly over complicated for the sort of job it was intended to do (form processing). -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44(0)1749 834997 email: [EMAIL PROTECTED] BlueFinger Limited Underwood Business Park Wookey Hole Road, WELLS. BA5 1AF Tel: +44 (0)1749 834900 Fax: +44 (0)1749 834901 web: www.bluefinger.com Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay, BRISTOL. BS1 6EG. *** This E-mail contains confidential information for the addressee only. If you are not the intended recipient, please notify us immediately. You should not use, disclose, distribute or copy this communication if received in error. No binding contract will result from this e-mail until such time as a written document is signed on behalf of the company. BlueFinger Limited cannot accept responsibility for the completeness or accuracy of this message as it has been transmitted over public networks.*** [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Login a User Problem - code not in email body....couldn't post message with it...
So, just for giggles change the following: cfparam name=session.allowin default=0 AND cfset session.allowin = True to cfset session.allowin = 1 AND cfif session.allowin neq true to cfif not session.allowin I always like to stick with good ole 1s and 0s when making these sort of comparisons. It eliminates a lot of possible mistakes like needing to trim the variables... Just give it a shot and see if it helps you to track down the issue. --Ferg _ From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 11:59 PM To: CF-Talk Subject: Login a User Problem - code not in email bodycouldn't post message with it... This *has* to be something with the Cold Fusion Admin on this particular server, but I'm at a loss. I'm using the same code (grabbed from somewhere...) on a number of sites (not on the server in question) and it's working fine. However, on this ONE Server - running CFMX... I'm using a typical login page at the site root level. What's happening is that the recordset finds the user - the code runs on the processing page, and I get the alert saying that the user is logged in. Then, as soon as the code hits the self.location=idx_admin.cfm; block on line 8 of the processing page and it tries to redirect, I'm kicked right back out to the login page with the not authorized message in the Application.cfm file. So, it seems to be loggin someone in, and then logging them right back out again. Ideas? Code is here in a text file. http://www.columbiacityjazz.com/loginproblem.txt I've tried posting this message several times with the code in the body and it refuses to post... _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Looping problem
I have a CF page written that gets called by the scheduler once every 15 minutes to look for e-mail in a POP mailbox, and if it meets criteria, distribute it to the list members.I've tested it out with no problems, and 3 list members had used it fine until yesterday afternoon.One list member sent a message to it, and instead of it going to each of the 26 recipients one time - it went to each of the 26 recipients 26 times - oops! Is there anything here in the code here that seems like it could cause this stuck in a loop problem?I'm thinking about revising it so that the message is inserted into a database first and not held by CFX_POP3.Then, if the message meets the criteria, select it back out and send it to the recipients and flag it as a sent message so it doesn't get sent again. I'm using the CFX_POP3 tag to check the mail: CFX_POP3 SERVER=mail.server.name PORT=110 USERNAME=loginname PASSWORD=password ACTION=""> NAME=bnimailapp !--- if there are messages do something --- cfif CFX_POP3.MessageCount GT 0 cfset delCount = 0 cfset mailCount = 0 cfloop query=bnimailapp !--- looks for BNI in the subject line, or if it came from montcocc.org --- cfif FindNoCase(BNI,bnimailapp.Subject,1) OR FindNoCase(montcocc,bnimailapp.From,1) !--- ok - msg is good --- cfif bnimailapp.html is not !--- check to see if content is HTML --- !--- get the recipients --- cfquery name=selActive datasource=#Session.DSN# SELECT tblBni.Email FROM tblBni WHERE tblBni.active /cfquery !--- send out the message as HTML since HTML was present in the original email --- cfloop query=selActive cfmail to=#trim(selActive.Email)# from=#trim(bnimailapp.from)# subject=#trim(bnimailapp.Subject)# type=HTML #bnimailapp.html# /cfmail /cfloop !--- END HTML e-mail --- cfelse!--- No HTML content - proceed as plain text --- cfquery name=selActive datasource=#Session.DSN#!--- get the recipients --- SELECT tblBni.Email FROM tblBni WHERE tblBni.active /cfquery cfloop query=selActive cfmailquery=selActive to=#trim(selActive.Email)# from=#trim(bnimailapp.from)# subject=#trim(bnimailapp.Subject)# #bnimailapp.body# /cfmail /cfloop /cfif cfset mailCount = mailCount +1!--- used for logging to --- cfquery name=updMailLog datasource=#Session.DSN#!--- log date, sender, subject and recipients --- INSERT into tblMailLog (m_date, m_from, m_subject, m_recipients) VALUES (now(),'#bnimailapp.from#','#left(bnimailapp.subject,253)#',#selActive.Recor dCount#) /cfquery !--- no delete the message from the server --- CFX_POP3 SERVER=mail.server.name PORT=110 USERNAME=username PASSWORD=password ACTION=""> UID=#bnimailapp.UID# cfelse!--- message is bad and did not have BNI in subject line or come from montcocc.org --- !--- create a log entry but with 0 recipients since we did not relay this mail to the list --- cfquery name=updMailLog datasource=#Session.DSN#!--- log date, sender, subject and recipients --- INSERT into tblMailLog (m_date, m_from, m_subject, m_recipients) VALUES (#CreateODBCDateTime(Now())#,'#bnimailapp.from#','SPAM-#left(bnimailapp.subj ect,253)#',0) /cfquery !--- delete the bad message --- CFX_POP3 SERVER=mail.server.name PORT=110 USERNAME=username PASSWORD=password ACTION=""> UID=#bnimailapp.UID# cfset delCount = delCount +1 /cfif /cfloop /cfif !--- close main condition of if messages are present --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
CSV to Query
Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! Much apreciated -- Mark Drew mailto:[EMAIL PROTECTED] blog:http://cybersonic.blogspot.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Login a User Problem - code not in email body....couldn't post message with it...
Ken Ferguson wrote: So, just for giggles change the following: cfparam name=session.allowin default=0 AND cfset session.allowin = True to cfset session.allowin = 1 AND cfif session.allowin neq true to cfif not session.allowin After really pulling my hair out on this - it seems to be related back to the old problem of setting cookies or session variables on the same page with a cflocation. I moved my processing code to the top of the index page that the security is protecting - thusly eliminating any type of redirect or cflocation is the login is successful. It works. I thought setting cookies/sessions was no longer an issue in MX? Gonna run some test and see what the heck happens here.. -- Les Mizzell --- A vanta as mr relyar! Nai eleni siluvar antalyannar! --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Code in Email body prevents posting?
Morning, Just curious, but what specifically could I put into the body of an email to this list that would cause it not to post? Tried a number of times to post a recent problem with less than 30 lines of code - and it refused to go through until I removed the code and placed it in an external file... Code included all the stuff from 1. application.cfm (about 12 lines) 2. a login processing page that set sessions/cookies (about 15 lines) The FAQ doesn't seem to mention anything that could be a problem... Ideas? -- Les Mizzell --- A vanta as mr relyar! Nai eleni siluvar antalyannar! --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Code in Email body prevents posting?
It might be that your posting in HTML format and your mail program is not sending the required text only portion as well. The list strips out the HTML portion and if no text portion exists, the post is considered having no content and bounced. Did you get an error email? Morning, Just curious, but what specifically could I put into the body of an email to this list that would cause it not to post? Tried a number of times to post a recent problem with less than 30 lines of code - and it refused to go through until I removed the code and placed it in an external file... Code included all the stuff from 1. application.cfm (about 12 lines) 2. a login processing page that set sessions/cookies (about 15 lines) The FAQ doesn't seem to mention anything that could be a problem... Ideas? -- Les Mizzell --- A vanta as mr relyar! Nai eleni siluvar antalyannar! --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
I don't know if there's anything on cflib.org, but if you have access to DRK3, the DFA API does this (and a ton more). ~Simon Simon Horwith CTO, eTRILOGY ltd. Member of Team Macromedia Macromedia Certified Master Instructor Blog - http://www.horwith.com Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! Much apreciated -- Mark Drew mailto:[EMAIL PROTECTED] blog:http://cybersonic.blogspot.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
Have a look at cfhttp HTH Dick On Aug 25, 2004, at 5:56 AM, Mark Drew wrote: Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! Much apreciated -- Mark Drew mailto:[EMAIL PROTECTED] blog:http://cybersonic.blogspot.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Login a User Problem - code not in email body....couldn't post message with it...
On line 10, it would make more sense to do: cfif not session.allowin If you're going to use Boolean values, you might as well go all the way. Line 11 will never evaluate true, since you're using listlast with / as a delimiter, and testing against a string with the same delimiter. cfif ListLast(CGI.SCRIPT_NAME, /) EQ ../admin_login.cfm You probably want ListLast(CGI.SCRIPT_NAME, /) IS admin_login.cfm. Or, combine them. 11. cfset Request.Page = ListLast(CGI.SCRIPT_NAME, /) / 12. cfif ListFindNoCase(admin_login.cfm,admin_login_process.cfm, Request.Page) I'm guessing the failure in your redirect is because session.allowIn = True is not matching with the true in your condition... did you try what Kevin suggested and try 1 and 0 instead?Or at the very least make sure the case matches... Joe -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 12:59 AM To: CF-Talk Subject: Login a User Problem - code not in email bodycouldn't post message with it... This *has* to be something with the Cold Fusion Admin on this particular server, but I'm at a loss. I'm using the same code (grabbed from somewhere...) on a number of sites (not on the server in question) and it's working fine. However, on this ONE Server - running CFMX... I'm using a typical login page at the site root level. What's happening is that the recordset finds the user - the code runs on the processing page, and I get the alert saying that the user is logged in. Then, as soon as the code hits the self.location=idx_admin.cfm; block on line 8 of the processing page and it tries to redirect, I'm kicked right back out to the login page with the not authorized message in the Application.cfm file. So, it seems to be loggin someone in, and then logging them right back out again. Ideas? Code is here in a text file. http://www.columbiacityjazz.com/loginproblem.txt I've tried posting this message several times with the code in the body and it refuses to post... _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: .cfmail to .eml
The parameter is ATTACHMENTS (with an s). HTH, HOwie - Original Message - From: Andy Jarrett To: CF-Talk Sent: Tuesday, August 24, 2004 6:46 PM Subject: Re: .cfmail to .eml Howie, thanks for all your help so far, your new DLL did the trick. One more issue though (sorry about this), it doesnt seem to be attaching documents. When i run the following code it creates the file but its minial size (about 4.00kb) cfx_imsmail createmailfileonly=yes spooldir=D:\WWW\wwwroot\scribble\newmail\ attachment=D:\WWW\wwwroot\scribble\test.zip header_to=[EMAIL PROTECTED] header_from=[EMAIL PROTECTED] header_subject=Test email body=test I've read the pdf guide and cant see anything im missing? Any help would be much appreciated. Cheers again, Andy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
I have looked at this.. there is one small problem one of the columns is a date so I am not sure how dbtype= query handles it but the results seem a bit odd cfhttp url="" name=info method=get textqualifier= cfquery name=qryOrders dbtype=query SELECT * FROM info WHERE orderdate cfqueryparam cfsqltype=cf_sql_date value=#DateFormat(Now(), dd/mm/)# /cfquery On Wed, 25 Aug 2004 06:35:57 -0700, Dick Applebaum [EMAIL PROTECTED] wrote: Have a look at cfhttp HTH Dick On Aug 25, 2004, at 5:56 AM, Mark Drew wrote: Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! Much apreciated -- Mark Drew mailto:[EMAIL PROTECTED] blog:http://cybersonic.blogspot.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Code in Email body prevents posting?
Michael Dinowitz wrote: It might be that your posting in HTML format and your mail program is not sending the required text only portion as well. The list strips out the HTML portion and if no text portion exists, the post is considered having no content and bounced. Did you get an error email? I only sent text email. Never got an error/bounce back either... -- Les Mizzell --- A vanta as mr relyar! Nai eleni siluvar antalyannar! --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
Can we see a few lines of your CSV file? Dick On Aug 25, 2004, at 7:03 AM, Mark Drew wrote: I have looked at this.. there is one small problem one of the columns is a date so I am not sure how dbtype= query handles it but the results seem a bit odd cfhttp url="" name=info method=get textqualifier= cfquery name=qryOrders dbtype=query SELECT * FROM info WHERE orderdate cfqueryparam cfsqltype=cf_sql_date value=#DateFormat(Now(), dd/mm/)# /cfquery On Wed, 25 Aug 2004 06:35:57 -0700, Dick Applebaum [EMAIL PROTECTED] wrote: Have a look at cfhttp HTH Dick On Aug 25, 2004, at 5:56 AM, Mark Drew wrote: Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Strange Oracle Error
Check your logs. I think we've found that we often get these following another error that's tying up Oracle. To all you oracle guru's out there, can any of you shed some light for me? A client sent me this error, they could not get a screen shot of the error so I am not 100% positive that this is worded correctly as I have never seen this error before? Oracle Error Code=0 Timeout while obtaining Oracle statement lock. ...identifier of (CFQuery) occupying doc position (401:5) to (401:97). This error is on a page that performs many queries and can be slow at times.The code has been running good until recently.There have been no changes, other that the database growing in size. Thanks, David [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! I use a Java library (ExcelCSVParser) from www.Ostermiller.com. You can find some other great utils there too. This is the code I use to parse a CSV file... it creates an array not a query though. !--- Convert CVS file to matrix(java.lang.String[][]) for easier manipulation --- cflock timeout=10 throwontimeout=Yes name=ImportTasks type=EXCLUSIVE cfscript f = createObject( java, java.io.FileInputStream ); f.init(#REQUEST.DOCUMENT_DIRECTORY#\#File.ServerFile#); parser = createObject( java, com.Ostermiller.util.ExcelCSVParser ); parser.init( f ); csvArr = parser.getAllValues(); parser.close(); f.close(); /cfscript /cflock -- Marc [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: for all you gmail users
On Wed, 25 Aug 2004 14:21:03 +0200, Mark Drew [EMAIL PROTECTED] wrote: cut off for one and for another I get Unable to Display this folder any ideas anyone? I am using outlook 2002 On my Tablet PC, I get that too (Outlook 2003, XP Pro SP2) At work, (Outlook 2003, XP Pro SP1) I can load the site initially, but when I go back to it I get a message about requiring cookies. I click the try again links that gmail provides, and that works. I can't find anywhere to change the security level of pages... I added gmail to the trusted sites list but that had no effect on either machine. Wierd! -- Kay Smoljak http://kay.smoljak.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
The file is something like Part,PartDesc,OrderRef,Qty,orderdate XX,A descriptoin of an Item,OrderRefno222,1,14/05/2004 15:20 you get the idea It is the date that kills me! MD On Wed, 25 Aug 2004 10:20:29 -0400, Marc Campeau [EMAIL PROTECTED] wrote: Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! I use a Java library (ExcelCSVParser) from www.Ostermiller.com. You can find some other great utils there too. This is the code I use to parse a CSV file... it creates an array not a query though. !--- Convert CVS file to matrix(java.lang.String[][]) for easier manipulation --- cflock timeout=10 throwontimeout=Yes name=ImportTasks type=EXCLUSIVE cfscript f = createObject( java, java.io.FileInputStream ); f.init(#REQUEST.DOCUMENT_DIRECTORY#\#File.ServerFile#); parser = createObject( java, com.Ostermiller.util.ExcelCSVParser ); parser.init( f ); csvArr = parser.getAllValues(); parser.close(); f.close(); /cfscript /cflock -- Marc [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Connecting to remote database
A client has asked us to pull data from a database (Sybase Adaptive Server Enterprise) that is hosted on their internal server and post the data to their web site. A little background information When the user log into the site they are presented with a page that needs to display some information from this Sybase db. The data in this database doesn't change hourly. My thought was to connect via an odbc connection nightly and dump the data into our sql server database. The problem with the odbc connections is the speed. Does anyone have other ideas ? Thanks /kurt [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Kill a Session when User Leaves
If I set this when a user successfully logs in: cfset session.user_id = someVALUE What's the best practice way for killing this when the user closes his browser or leaves the secured area? -- Les Mizzell --- A vanta as mr relyar! Nai eleni siluvar antalyannar! --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: for all you gmail users
On my Tablet PC, I get that too (Outlook 2003, XP Pro SP2) At work, (Outlook 2003, XP Pro SP1) I can load the site initially, but when I go back to it I get a message about requiring cookies. I click the try again links that gmail provides, and that works. I can't find anywhere to change the security level of pages... I added gmail to the trusted sites list but that had no effect on either machine. By default, Outlook 2003 treats all content as Restricted Zone content, I think, so adding something to Trusted Sites won't affect it. Unfortunately, I don't have a solution for you, as I wouldn't recommend weakening Outlook 2003's default security configuration. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Kill a Session when User Leaves
With cfif IsDefined(Cookie.CFID) AND IsDefined(Cookie.CFTOKEN) cfset localCFID = Cookie.CFID cfset localCFTOKEN = Cookie.CFTOKEN cfcookie name=CFID value=#localCFID# cfcookie name=CFTOKEN value=#localCFTOKEN# /cfif Micha Schopman Software Engineer Modern Media, Databankweg 12 M, 3821 ALAmersfoort Tel 033-4535377, Fax 033-4535388 KvK Amersfoort 39081679, Rabo 39.48.05.380 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Kill a Session when User Leaves
If I set this when a user successfully logs in: cfset session.user_id = someVALUE What's the best practice way for killing this when the user closes his browser or leaves the secured area? You can disconnect a user's session data from that user's browser by making the session identification cookies into session cookies. Session cookies are destroyed when the browser is closed. If you enable J2EE Sessions within the CF Administrator, this will be the default behavior. If you're using CFID and CFTOKEN cookies, you'll have to do this yourself: cfapplication setclientcookies=no ... cfif not IsDefined(Cookie.CFID) cfcookie name=CFID value=#Session.CFID# cfcookie name=CFTOKEN value=#Session.CFTOKEN# /cfif The preceding code would go into Application.cfm. The omission of an EXPIRES attribute in the CFCOOKIE tag makes the cookie last only until the browser is closed. It's also worth noting that this doesn't actually delete the session variables, it just breaks the connection between them and the user to whom they belonged. As for killing session variables when a user goes to a page outside the site, that would be a little harder. I'm not sure why you'd want to do that anyway. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Kill a Session when User Leaves
With cfif IsDefined(Cookie.CFID) AND IsDefined(Cookie.CFTOKEN) cfset localCFID = Cookie.CFID cfset localCFTOKEN = Cookie.CFTOKEN cfcookie name=CFID value=#localCFID# cfcookie name=CFTOKEN value=#localCFTOKEN# /cfif It's worth noting that this will rewrite the cookies on every page request, which is unnecessary and marginally more expensive. Instead, you can just write the cookies once by not having CF set them, and setting them yourself. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: for all you gmail users
On Wed, 25 Aug 2004 10:50:10 -0400, Dave Watts [EMAIL PROTECTED] wrote: By default, Outlook 2003 treats all content as Restricted Zone content, I think, so adding something to Trusted Sites won't affect it. Unfortunately, I don't have a solution for you, as I wouldn't recommend weakening Outlook 2003's default security configuration. I figured it was something like that. Clicking try again once very couple of hours isn't exactly going to kill me :) -- Kay Smoljak http://kay.smoljak.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
SOT: ASX/WVX files in Firefox
Hey all Anyone know what is wrong with this picture that FF would just show the text, but IE would render it fine? ASX version=3 Entry Ref href="" / /Entry /ASX I don't think it's my FF, as I can render the sample about 3/4 down on this page: http://cita.rehab.uiuc.edu/mediaplayer/asx-overview.htm But, since my code looks like their simple code example, I'm not sure what I'm doing wrong -- Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
GetProfileSections() for CF5?
I thought CF5 had this.. any idea if there is a workaround or UDF to read a standard format ini file? regards -- Mark Drew mailto:[EMAIL PROTECTED] blog:http://cybersonic.blogspot.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Strange Oracle Error
I've seen that error when I've done soemthing in the DB and did not commit the changes. On Wed, 25 Aug 2004 09:20:37 -0500, Deanna Schneider [EMAIL PROTECTED] wrote: Check your logs. I think we've found that we often get these following another error that's tying up Oracle. To all you oracle guru's out there, can any of you shed some light for me? A client sent me this error, they could not get a screen shot of the error so I am not 100% positive that this is worded correctly as I have never seen this error before? Oracle Error Code=0 Timeout while obtaining Oracle statement lock. ...identifier of (CFQuery) occupying doc position (401:5) to (401:97). This error is on a page that performs many queries and can be slow at times.The code has been running good until recently.There have been no changes, other that the database growing in size. Thanks, David [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
get file
Hi, I have files on our server and I want people (once they're logged in) to download a file without knowing hte path of the file.. Right now I was doing a popup with the file (a PDF) and it was alright.. but now that many anti-virus or google toolbar are blocking pop up file, I need another solution.. Do you have an idea? Thanks Pat [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: get file
You can use cfcontent to serve the file - it does not even need to be inside the web root. -Mark -Original Message- From: CFDEV [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 10:29 AM To: CF-Talk Subject: get file Hi, I have files on our server and I want people (once they're logged in) to download a file without knowing hte path of the file.. Right now I was doing a popup with the file (a PDF) and it was alright.. but now that many anti-virus or google toolbar are blocking pop up file, I need another solution.. Do you have an idea? Thanks Pat [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: get file
checkout cfcontent, depends how you reference your files you can have them all somewhere that isnt web accessable and reference them like index.cfm?file=mypdf.pfd MD On Wed, 25 Aug 2004 11:28:31 -0400, CFDEV [EMAIL PROTECTED] wrote: Hi, I have files on our server and I want people (once they're logged in) to download a file without knowing hte path of the file.. Right now I was doing a popup with the file (a PDF) and it was alright.. but now that many anti-virus or google toolbar are blocking pop up file, I need another solution.. Do you have an idea? Thanks Pat [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: get file
Hi Pat, The most common way to do it is to use CFHeader / CFContent in combination to get the file from a non-web-accessible directory, looking up the actual path based on an identifier passed in the URL. If you search the list archives or Google, there should be plenty of examples out there. Cheers, Joe - Original Message - From: CFDEV [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 11:28:31 -0400 Subject: get file To: CF-Talk [EMAIL PROTECTED] Hi, I have files on our server and I want people (once they're logged in) to download a file without knowing hte path of the file.. Right now I was doing a popup with the file (a PDF) and it was alright.. but now that many anti-virus or google toolbar are blocking pop up file, I need another solution.. Do you have an idea? Thanks Pat [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: get file
ok but since it'n in pdf what type do i use in cfcontent? and is it gonna stop the rest of the page? Pat _ From: Mark Drew [mailto:[EMAIL PROTECTED] Sent: August 25, 2004 11:35 To: CF-Talk Subject: Re: get file checkout cfcontent, depends how you reference your files you can have them all somewhere that isnt web accessable and reference them like index.cfm?file=mypdf.pfd MD On Wed, 25 Aug 2004 11:28:31 -0400, CFDEV [EMAIL PROTECTED] wrote: Hi, I have files on our server and I want people (once they're logged in) to download a file without knowing hte path of the file.. Right now I was doing a popup with the file (a PDF) and it was alright.. but now that many anti-virus or google toolbar are blocking pop up file, I need another solution.. Do you have an idea? Thanks Pat _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: get file
Unless you want the users system to try and open the file in the associated program, don't use a specific type... Here is an example... cfheader name=Content-Disposition value=attachment; filename=#DOCUMENT_NAME#.#DOCUMENT_EXTENSION# cfcontent file=#variables['strDoc']# type=application/x-unknown deletefile=No / HTH, Mike ok but since it'n in pdf what type do i use in cfcontent? and is it gonna stop the rest of the page? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
Here's a second vote for ostermiller's CSV parser.It's java, so it requires a touch of Java knowlesge, but it's very easy to use, as Marc's demo illustrates, and quite fast. cheers, barneyb On Wed, 25 Aug 2004 10:20:29 -0400, Marc Campeau [EMAIL PROTECTED] wrote: Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! I use a Java library (ExcelCSVParser) from www.Ostermiller.com. You can find some other great utils there too. This is the code I use to parse a CSV file... it creates an array not a query though. !--- Convert CVS file to matrix(java.lang.String[][]) for easier manipulation --- cflock timeout=10 throwontimeout=Yes name=ImportTasks type=EXCLUSIVE cfscript f = createObject( java, java.io.FileInputStream ); f.init(#REQUEST.DOCUMENT_DIRECTORY#\#File.ServerFile#); parser = createObject( java, com.Ostermiller.util.ExcelCSVParser ); parser.init( f ); csvArr = parser.getAllValues(); parser.close(); f.close(); /cfscript /cflock -- -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Simultaneous File download limiting system
If serv-u can't, Pureftpd can do this: http://www.pureftpd.org/ It looks like a nice FTP server however it is *nix based and we are (dare I say it) A windows house. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716 tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net -Original Message- From: Jordan Michaels [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 6:43 PM To: CF-Talk Subject: Re: Simultaneous File download limiting system If serv-u can't, Pureftpd can do this: http://www.pureftpd.org/ ::snipped from their home page:: - A maximum concurrent connection from the same IP address can be enforced to avoid bandwidth starvation and denial-of-service attacks. I've personally used pure-ftpd for many many projects and I love it. Hope this helps, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Dennis Powers wrote: Hi, We are attempting to create a file download system that will limit the user to two simultaneous file transfers.We have a project where we have a file browser web page in the web site that reads from a database and when the user wishes to download a file they click the icon and we direct them to our ftp site with a redirection to a link like so: ftp://ftp.oursite.com/filename.zip . The files are fairly large 6-25megs each so we didn't want to burden the CF engine sending them inline with cfcontent.We are using CF 5.x and Serv-U 4.x as the FTP server. We have bandwidth limiting on the FTP server so when a user opens multiple download sessions the transfer rates drop.We are trying to write either a server side (CF) or client side (_javascript_) script to detect that they are already downloading two files and when one of the files finishes the third file they queued will start. Within CF I can determine when a download starts but can't find a way to determine when it is actually finished. I was wondering of anyone knows of a way to get the file completion status from Serv-U maybe with a plugin or add-on utility, short of parsing the logs? Alternately being a _javascript_ novice I am unsure if a client slide solution can be written where the _javascript_ in the browser detects the two open download windows and prevents them downloading another until one of the windows is finished.It doesn't have to be foolproof to the advanced users like a server side solution would be. It just needs to be functional for most users. Any assistance is greatly appreciated. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716 tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Date format issues
I agree with Paul and see no reason not to use LSParseDateTime.Macromedia (and Allaire) are American companies.In the future, I don't see them changing the standard (I use that very loosely) way in which CF stores dates (which is the U.S. format).If they did, backwards compatibility would with CF apps build for older versions wouldn't work.Anyways, CF datetime object are always MM/DD/ and that is how it's done.Luckily for you, CF has BIFs that can display those dates in different formats for you. I think you'd be better off parsing all of your dates into the CF format of DD/MM/ and then out putting them in the format you prefer or need.You could make a couple of UDFs or CFC to do your datetime functions so you.This way you can change the way you wish to format something or another in only one place.I won't go into that any more. Also, in the future, you might be interested in a TimeZone conversion CFC to do time conversions that CF doesn't support natively (with the help of Java objects).Things like this always us the standard date format. That's my two cents, .Peter MaePub [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Webmail Clients
I need to replace Uebiuma (What ever) PHP Client and I want a good robust Cold Fusion one. I am looking at WebMail Pro (Surprisingly in expensive) are there any others? Rick Eidson Partner CTO ArcRiver Technology, LLC ASP, PHP, PERL, Cold Fusion Hosting Kansas City http://www.arcriver.com/ http://www.arcriver.com/ Kansas City Musicians http://www.kcjukebox.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Cfhttp problems
Hi there, I'm having problems using CFHTTP in ColdFusion 4.5 I want to send an XML request containing a postcode sector off to a web server which is then supposed to spit XML back at me with x and y coordinates for that postcode sector. Sounds simple? Well it's not working for me! All I get is a Connection Failure. I know this should work because I've used a form to do something similar. Also, someone else managed to get this bit of code to work on more recent versions of ColdFusion. Does anyone know how I can get this to work in CF 4.5? Here is my code... h1Postcode test/h1 cfset test=?xml version='1.0' encoding='UTF-8'? gazetteer-service xmlns='http://www.alexandria.ucsb.edu/gazetteer' version='1.1' query-request gazetteer-query name-query operator='equals' text='YO31 8'/ /gazetteer-query report-formatstandard/report-format srsEPSG:4277/srs /query-request /gazetteer-service cfhttp method=post url=""> et/ cfhttpparam type=FormField name=request value=#test# /cfhttp cfoutput#CFHTTP.FileContent#/cfoutput Cheers, Jen _ Jenny Mitcham Curatorial Assistant Archaeology Data Service Room 211 The King's Manor York YO1 7EP UK phone +44 (0)1904-433967 fax+44(0)1904-433939 http://ads.ahds.ac.uk/catalogue/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Simultaneous File download limiting system
Hi Dennis, Hahaha. That's quite alright. Windows has the ability to be useful sometimes. The point is, I doubt you're the only one who ever wanted that kind of functionality in an FTP server. If serv-u won't do it, then there are almost certainly other FTP servers out there that can. No need to re-invent the wheel using CF when it's already done in the FTP server itself - which, really, is where that kind of functionality SHOULD be. What if I just went around your CF application and hit your FTP server directly? Then you'd be right back where you started. HTH, Jordan Dennis Powers wrote: If serv-u can't, Pureftpd can do this: http://www.pureftpd.org/ It looks like a nice FTP server however it is *nix based and we are (dare I say it) A windows house. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716 tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net -Original Message- From: Jordan Michaels [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 6:43 PM To: CF-Talk Subject: Re: Simultaneous File download limiting system If serv-u can't, Pureftpd can do this: http://www.pureftpd.org/ ::snipped from their home page:: - A maximum concurrent connection from the same IP address can be enforced to avoid bandwidth starvation and denial-of-service attacks. I've personally used pure-ftpd for many many projects and I love it. Hope this helps, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Dennis Powers wrote: Hi, We are attempting to create a file download system that will limit the user to two simultaneous file transfers.We have a project where we have a file browser web page in the web site that reads from a database and when the user wishes to download a file they click the icon and we direct them to our ftp site with a redirection to a link like so: ftp://ftp.oursite.com/filename.zip . The files are fairly large 6-25megs each so we didn't want to burden the CF engine sending them inline with cfcontent.We are using CF 5.x and Serv-U 4.x as the FTP server. We have bandwidth limiting on the FTP server so when a user opens multiple download sessions the transfer rates drop.We are trying to write either a server side (CF) or client side (_javascript_) script to detect that they are already downloading two files and when one of the files finishes the third file they queued will start. Within CF I can determine when a download starts but can't find a way to determine when it is actually finished. I was wondering of anyone knows of a way to get the file completion status from Serv-U maybe with a plugin or add-on utility, short of parsing the logs? Alternately being a _javascript_ novice I am unsure if a client slide solution can be written where the _javascript_ in the browser detects the two open download windows and prevents them downloading another until one of the windows is finished.It doesn't have to be foolproof to the advanced users like a server side solution would be. It just needs to be functional for most users. Any assistance is greatly appreciated. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716 tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ [EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Strange Oracle Error
I have too but this is all through coldfusion and sp's should I have to commit or close any connections when executing via CF5.0? Thanks, David -Original message- From: Greg Morphis [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 11:25:56 -0400 To: CF-Talk [EMAIL PROTECTED] Subject: Re: Strange Oracle Error I've seen that error when I've done soemthing in the DB and did not commit the changes. On Wed, 25 Aug 2004 09:20:37 -0500, Deanna Schneider [EMAIL PROTECTED] wrote: Check your logs. I think we've found that we often get these following another error that's tying up Oracle. To all you oracle guru's out there, can any of you shed some light for me? A client sent me this error, they could not get a screen shot of the error so I am not 100% positive that this is worded correctly as I have never seen this error before? Oracle Error Code=0 Timeout while obtaining Oracle statement lock. ...identifier of (CFQuery) occupying doc position (401:5) to (401:97). This error is on a page that performs many queries and can be slow at times.The code has been running good until recently.There have been no changes, other that the database growing in size. Thanks, David [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Simultaneous File download limiting system
Hi Dennis, Hahaha. That's quite alright. Windows has the ability to be useful sometimes. The point is, I doubt you're the only one who ever wanted that kind of functionality in an FTP server. If serv-u won't do it, then there are almost certainly other FTP servers out there that can. No need to re-invent the wheel using CF when it's already done in the FTP server itself - which, really, is where that kind of functionality SHOULD be. What if I just went around your CF application and hit your FTP server directly? Then you'd be right back where you started. HTH, Jordan Dennis Powers wrote: If serv-u can't, Pureftpd can do this: http://www.pureftpd.org/ It looks like a nice FTP server however it is *nix based and we are (dare I say it) A windows house. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716 tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ [EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Looping problem
What do the query bnimailapp look like? Jim Louis [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
MSDE datasource
Hi MSDE is an free(true!!) DBMS based in SQL Server... 1Giga space, 10 max connections how to use with CFMX? It's possible? Thanx [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RegEx - is it possible to strip all HTML except certain tags?
I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
RE doesn't have that kind of negation operator, in any implementation. I usually do something like this (untested): str = REreplaceNoCase(str, (/?)(b|i|strong|p), #chr(5)#\1\2, all); str = REreplaceNoCase(str,/?[^]*,,all); str = replace(str, chr(5), , all); Wrap it up in a UDF that takes the list of allowed tags as a parameter, and you can use it all over the place. cheers, barneyb On Wed, 25 Aug 2004 09:51:52 -0700, Cassidy Symons [EMAIL PROTECTED] wrote: I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Neither, actually.Try S. Isaac Dealey's StripTags UDF from http://www.cflib.org. IIRC, it does exactly what you want.:-) --Ben [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
I wrote a cfc to do things like this a while back...I'll see if I can send it to you shortly. I wrote it for adding smiley face code and securing HTML in a forum so it takes a list of accepted tags and removes the rest. I know this doesn't help you a lot now, but if I can find a good snippet of the code for you, I will get it to you. Mike - Original Message - From: Cassidy Symons [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 09:51:52 -0700 Subject: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
Oops, forgot to send this! Dick That looks like a date time field. I never thought much about it, but I don't think that cfhttp can determine that the field is a datetime -- I think it simply creates a charfield. So, you can't do a QofQ on a datetime value as only text comparisons are valid. A possible solution is to: 1) loop through the query 2) convert each text representation of date time into a valid datetime object 3) perform your comparison 4) build a new query with a row for each match HTH Dick The file is something like Part,PartDesc,OrderRef,Qty,orderdate XX,A descriptoin of an Item,OrderRefno222,1,14/05/2004 15:20 you get the idea It is the date that kills me! MD [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Thanks! Giving it a quick spin it looks like it's probably going to be the simplest way to accomplish what I want. Barney Boisvert wrote: RE doesn't have that kind of negation operator, in any implementation. I usually do something like this (untested): str = REreplaceNoCase(str, (/?)(b|i|strong|p), #chr(5)#\1\2, all); str = REreplaceNoCase(str,/?[^]*,,all); str = replace(str, chr(5), , all); Wrap it up in a UDF that takes the list of allowed tags as a parameter, and you can use it all over the place. cheers, barneyb [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Here you go...So you know, in regex: x?!y matches x only if it is not followed by y x?=y matches x only if it is followed by y These are referred to as lookahead expressions The attached file has that function I had mentioned. Hope this helps you, Mike On Wed, 25 Aug 2004 12:08:37 -0500, Mike Kelp [EMAIL PROTECTED] wrote: I wrote a cfc to do things like this a while back...I'll see if I can send it to you shortly. I wrote it for adding smiley face code and securing HTML in a forum so it takes a list of accepted tags and removes the rest. I know this doesn't help you a lot now, but if I can find a good snippet of the code for you, I will get it to you. Mike - Original Message - From: Cassidy Symons [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 09:51:52 -0700 Subject: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: CSV to Query
Not to forget querySim: there's the original tag which you can get from http://www.halhelms.com/index.cfm?fuseaction=code.detail or the UDF version from http://www.cflib.org/udf.cfm?ID=255 Both do pretty much the same thing - take some formatted text and return a recordset. As to which to use, its much of a muchness - I think the UDF is slightly faster until the amount of data being passed in reaches a certain size, after which performance deteriorates faster than the tag, but I haven't looked at either for years, so that would have been testing on CF5 Cheers Bert From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: 25 August 2004 17:14 To: CF-Talk Subject: Re: CSV to Query Here's a second vote for ostermiller's CSV parser.It's java, so it requires a touch of Java knowlesge, but it's very easy to use, as Marc's demo illustrates, and quite fast. cheers, barneyb On Wed, 25 Aug 2004 10:20:29 -0400, Marc Campeau [EMAIL PROTECTED] wrote: Anybody have a UDF for this? I need it sharpish, I can write it myself but if someone else has done this.. whooho! I use a Java library (ExcelCSVParser) from www.Ostermiller.com. You can find some other great utils there too. This is the code I use to parse a CSV file... it creates an array not a query though. !--- Convert CVS file to matrix(java.lang.String[][]) for easier manipulation --- cflock timeout=10 throwontimeout=Yes name=ImportTasks type=EXCLUSIVE cfscript f = createObject( java, java.io.FileInputStream ); f.init(#REQUEST.DOCUMENT_DIRECTORY#\#File.ServerFile#); parser = createObject( java, com.Ostermiller.util.ExcelCSVParser ); parser.init( f ); csvArr = parser.getAllValues(); parser.close(); f.close(); /cfscript /cflock -- -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Neither, actually.Try S. Isaac Dealey's StripTags UDF from http://www.cflib.org. IIRC, it does exactly what you want.:-) --Ben Unless of course what you want is actually a pastrami on rye. :) cfset myString = stripTags(allow,b,i,u,strong,p,form.mystring) http://www.cflib.org/udf.cfm?ID=774 s. isaac dealey954.927.5117 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.sys-con.com/story/?storyid=44477DE=1 http://www.sys-con.com/story/?storyid=45569DE=1 http://www.fusiontap.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
You'll have to send it directly to him - the list doesn't maintain attachments. Here you go...So you know, in regex: x?!y matches x only if it is not followed by y x?=y matches x only if it is followed by y These are referred to as lookahead expressions The attached file has that function I had mentioned. Hope this helps you, Mike On Wed, 25 Aug 2004 12:08:37 -0500, Mike Kelp [EMAIL PROTECTED] wrote: I wrote a cfc to do things like this a while back...I'll see if I can send it to you shortly. I wrote it for adding smiley face code and securing HTML in a forum so it takes a list of accepted tags and removes the rest. I know this doesn't help you a lot now, but if I can find a good snippet of the code for you, I will get it to you. Mike - Original Message - From: Cassidy Symons [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 09:51:52 -0700 Subject: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^ ]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
CF5 doesn't support lookahead.It's got a fairly weak engine.:-( --Ben Mike Kelp wrote: Here you go...So you know, in regex: x?!y matches x only if it is not followed by y x?=y matches x only if it is followed by y These are referred to as lookahead expressions The attached file has that function I had mentioned. Hope this helps you, Mike On Wed, 25 Aug 2004 12:08:37 -0500, Mike Kelp [EMAIL PROTECTED] wrote: I wrote a cfc to do things like this a while back...I'll see if I can send it to you shortly. I wrote it for adding smiley face code and securing HTML in a forum so it takes a list of accepted tags and removes the rest. I know this doesn't help you a lot now, but if I can find a good snippet of the code for you, I will get it to you. Mike - Original Message - From: Cassidy Symons [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 09:51:52 -0700 Subject: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
No lookahead in CF5.I've got a regex that does stuff like this for me in CFMX, tho. -joe - Original Message - From: S. Isaac Dealey [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 13:24:56 -0400 Subject: Re: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] You'll have to send it directly to him - the list doesn't maintain attachments. Here you go...So you know, in regex: x?!y matches x only if it is not followed by y x?=y matches x only if it is followed by y These are referred to as lookahead expressions The attached file has that function I had mentioned. Hope this helps you, Mike On Wed, 25 Aug 2004 12:08:37 -0500, Mike Kelp [EMAIL PROTECTED] wrote: I wrote a cfc to do things like this a while back...I'll see if I can send it to you shortly. I wrote it for adding smiley face code and securing HTML in a forum so it takes a list of accepted tags and removes the rest. I know this doesn't help you a lot now, but if I can find a good snippet of the code for you, I will get it to you. Mike - Original Message - From: Cassidy Symons [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 09:51:52 -0700 Subject: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^ ]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Ahhh, didn't catch the CF5...thanks for mentioning that. Ahh well, here's the regex I was using if its useful or anyone wants to critique it... cfset Result = REReplaceNoCase(txtData,(?!/{0,1}(#Arguments.ltAllow#)(\s[^]*?|))[^]*?,,ALL) Where #Arguments.ltAllow# is a '|' (pipe) delimited list of tags to allow (Ex: a|b|li|i|br) - Original Message - From: Ben Doom [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 13:25:10 -0400 Subject: Re: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] CF5 doesn't support lookahead.It's got a fairly weak engine.:-( --Ben Mike Kelp wrote: Here you go...So you know, in regex: x?!y matches x only if it is not followed by y x?=y matches x only if it is followed by y These are referred to as lookahead expressions The attached file has that function I had mentioned. Hope this helps you, Mike On Wed, 25 Aug 2004 12:08:37 -0500, Mike Kelp [EMAIL PROTECTED] wrote: I wrote a cfc to do things like this a while back...I'll see if I can send it to you shortly. I wrote it for adding smiley face code and securing HTML in a forum so it takes a list of accepted tags and removes the rest. I know this doesn't help you a lot now, but if I can find a good snippet of the code for you, I will get it to you. Mike - Original Message - From: Cassidy Symons [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 09:51:52 -0700 Subject: RegEx - is it possible to strip all HTML except certain tags? To: CF-Talk [EMAIL PROTECTED] I've been testing this out and can't find a way to strip all HTML except certain tags...is there any sort of 'not' modifier in RegEx in CF5, so I could do something like: cfset mytext = '#REReplaceNoCase(mytext,/?(NOT{b,i,strong,p,etc...}[^]*,,all)#' Which would leave in tags that aren't really harmful. Obviously if need be I can just replace those tags with some sort of code (that hopefully doesn't happen to appear elsewhere in the text), run the RegEx function to strip all other HTML, then switch the codes back to HTML, but that seems like a rather inelegant way of going about it, not to mention slow if this is being done to several text fields on the same page. Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Thanks. Cassidy [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Ahh well, here's the regex I was using if its useful or anyone wants to critique it... cfset Result = REReplaceNoCase(txtData,(?!/{0,1}(#Arguments.ltAllow#)(\s[^]*?|))[^]*?,,ALL) Off the top of my head, it looks like it requires 2 closing brackets. --Ben [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Web Services
I am having trouble with sending an xml doc to the user of my web service. That user being me I am getting this error message: Could not perform web service invocation getUsers because java.lang.ClassCastException: java.lang.String I transform a query to xml and the xml to a string. I have done this before with success but am now having trouble. The code below is the function in the CFC. As you can see I am making this a facade to my other CFCs. I am pretty sure that this should work but it isn't. t.output.result = query, queryToXML outputs a valid xml object - - - - - START CODE - - - - - - cffunction name=getUsers access=remote output=false returntype=string hint=This Function outputs a structure of thee variables; result (the resulting query), pass (boolean value telling you if the query was succesfully run), message (the error message from the server if query failed.) cfargument name=showinactive type=boolean required=false default=false hint=show the inactive accounts? cfset var t = structnew()!--- temporary variables --- cfset var o = structnew()!--- output variables --- cfscript // get results t.output = createobject(component,uau.com.users).getUsers(arguments.showinactive); o.result = createobject(component,uau.com.utility).queryToXML(t.output.result,users,user); o.final = tostring(o.result); /cfscript cfreturn o.final /cffunction - - - - - END CODE - - - - - - -- -- Ian Sheridan http://www.savagevines.com -- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Web Services
I am having trouble with sending an xml doc to the user of my web service. That user being me I am getting this error message: Could not perform web service invocation getUsers because java.lang.ClassCastException: java.lang.String I transform a query to xml and the xml to a string. I have done this before with success but am now having trouble. The code below is the function in the CFC. As you can see I am making this a facade to my other CFCs. I am pretty sure that this should work but it isn't. t.output.result = query, queryToXML outputs a valid xml object I had to attach the CODE to a txt file. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Connecting to remote database
Kurt How much raw data are we talking about? Why not use the Sybase jdbc driver or Macromedia's jdbc driver for Sybase? You could do a query of the remote Sybase db and cache it on your CF server. Depending on what is used on the internal server (do they have CFMX) to update the Sybase db, it could trigger a cache refresh on your server. Doing it this way you avoid duplication synchronization of the db copy. If you must replicate the db, you prolly can use the Sybase and SQL-Server functions provided for this purpose. Depending on what is running on the internal system, you could write a program to provide the data to a web service running on your system.I would use a thinArray to eliiminate the XML overhead. HTH Dick On Aug 25, 2004, at 7:36 AM, Kurt Knazek wrote: A client has asked us to pull data from a database (Sybase Adaptive Server Enterprise) that is hosted on their internal server and post the data to their web site. A little background information When the user log into the site they are presented with a page that needs to display some information from this Sybase db. The data in this database doesn't change hourly. My thought was to connect via an odbc connection nightly and dump the data into our sql server database. The problem with the odbc connections is the speed. Does anyone have other ideas ? Thanks /kurt [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Simultaneous File download limiting system
I doubt you're the only one who ever wanted that kind of functionality in an FTP server. Actually Serv-U will do it and I have used in on many occasion however what I am trying to do is have it fail gracefully. When someone clicks the link to download a file we use a URL of ftp://ftp.somedomain.com/filename.zip so the browser is performing the FTP transfer. With simultaneously FTP limits in place once the user hits their predefined limit (2) and tries to simultaneously download the next file (3) the browser just gives a file not found error or some M$ pretty error page. What I want to do is detect that the connection limit has been reached and redirect them to a page that tells them to wait for the files to finish downloading. Then using a meta refresh let that page queue the aborted (3rd) file request. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716 tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Web Services
I am having trouble with sending an xml doc to the user of my web service. That user being me I am getting this error message: Could not perform web service invocation getUsers because java.lang.ClassCastException: java.lang.String I transform a query to xml and the xml to a string. I have done this before with success but am now having trouble. The code below is the function in the CFC. As you can see I am making this a facade to my other CFCs. I am pretty sure that this should work but it isn't. t.output.result = query, queryToXML outputs a valid xml object I had to place the CODE in a txt file, here is the link. http://www.savagevines.com/stage/getUsers.txt -- -- Ian Sheridan http://www.savagevines.com -- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
looping through checkboxes
I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now quot;Center on Agingquot;, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
Kill the evaluate and reference the form or url scope as a struct: cfif structKeyExists(form,departments[i]) ...do crap... /cfif Daniel Kessler wrote: I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now quot;Center on Agingquot;, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
OT: Oh brother
sorry about the repeated posts. I just started using Gmail and it was not showing up so... repeat oops -- -- Ian Sheridan http://www.savagevines.com -- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
Assuming that your form has a checkbox named aging, try this syntax instead: cfif structkeyexists(form, aging) cfset the_dept = form.aging /cfif I didn't attempt to replicate your entire logic, however so tweak as needed. -P I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now Center on Aging, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
I'm not sure I exactly follow you, but if you name the checkboxes the same with different values, the checked boxes will appear to CF as form.checkbox - which will be a comma separated list of the checked values. For example, input type=checkbox name=choice value=1 input type=checkbox name=choice value=2 input type=checkbox name=choice value=3 If this form is submitted with the first and third boxes checked, CF will have a variable called form.choice with a value of 1,3 Is that what you were after or something more complex? Matt - Original Message - From: Daniel Kessler [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 14:58:17 -0400 Subject: looping through checkboxes To: CF-Talk [EMAIL PROTECTED] I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now quot;Center on Agingquot;, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
Daniel, This may help: cfset the_dept = cfloop list=aging,fmst,knes,dean,pch,studserv index=ii cfif structKeyExists(form, ii) cfset listAppend(the_dept, form[ii], |) /cfif /cfloop -joe - Original Message - From: Daniel Kessler [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 14:58:17 -0400 Subject: looping through checkboxes To: CF-Talk [EMAIL PROTECTED] I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now quot;Center on Agingquot;, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Alagad Image CFC
I've had a couple users of the component report this problem.I'm working on resolving it ASAP. The problem stems from the JPEG specification which allows the red and either green or blue channel to be swapped.In the case of the Image Component when it reads one of these images the channels are not ending up in the correct location.This problem seems to be quite rare. However, as I said, I'm working on a fix to it. Doug Hughes On Tue, 24 Aug 2004 11:15:02 -0400, Eric Jones [EMAIL PROTECTED] wrote: Here's the code. those of you who want to see sample images email me and I'll send them directly to you. !--- This instantiates the component, thereby creating an object for us to work with. --- cfset myImage = CreateObject(Component, CustomTags.corev2.imageComponent.Image) / cfset thisFile = #thisImageID#.#form.filetype# !--- Get the extension of the file we are uploading and the name of the file --- cfset fileName = #listFirst(thisFile, .)# cfset fileExtention = #listLast(thisFile, .)# !--- Test to make sure this is an ok file. IE it's an image file. --- !--- The getReadableFormats() function returns a list of ok formats to use. --- cfif #ListFindNoCase(#myImage.getReadableFormats()#, #fileExtention#, ,)# !--- read the source image --- cfset myImage.readImage(#APPLICATION.installpath#\uploads\100011_product\#thisFil e#) / !--- resize the image to a specific width and height --- cfparam name=URL.scaleToSize default=25 cfset myImage.scalePercent(#URL.scaleToSize#,#URL.scaleToSize#) / !--- output the image in it's original format with the new _thumbs added to the name. --- cfset myImage.writeImage(#APPLICATION.installpath#\uploads\100011_product\#fileNa me#_thumb.#fileExtention#, #fileExtention#) / /cfif ERJ -Original Message- From: Joe Rinehart [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 11:11 AM To: CF-Talk Subject: Re: Alagad Image CFC Eric, Can you post your code? -joe - Original Message - From: Eric Jones [EMAIL PROTECTED] Date: Tue, 24 Aug 2004 11:00:47 -0400 Subject: Alagad Image CFC To: CF-Talk [EMAIL PROTECTED] Anyone using the alagad image CFC and having problems with it putting a red tint on resized images? ERJ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
Drop the evaluate.evaluate(bob) is the value contained within bob, not the literal string bob. --Ben Daniel Kessler wrote: I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now quot;Center on Agingquot;, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Window close and logout
All, I've been using this standard code to logout a user when they close the browser window for a while now: cfif IsDefined(Cookie.CFID) AND IsDefined(Cookie.CFTOKEN) cfcookie name=CFID value=#Session.CFID# cfcookie name=CFTOKEN value=#Session.CFTOKEN# cfset cfid_local = Cookie.CFID cfset cftoken_local = Cookie.CFTOKEN /cfif It's worked like a champ, but recently I've had reports that the two cookie lines cause an error to kick back. Since I've seen this very same block of code published elsewhere, I'm wondering if perhaps it's the code, or using this code with SQL Server (my access installs are fine, but the error reporting seems to only come from SQL Server users). The people reporting the errors say that if you comment out the two CFCOOKIE lines, there's no problems. Any ideas? Thanks, Jake [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Farcry x SpeckCMS: The best CMS is....
Do you have the answer? Two great CMS... Only one choice... Thanx [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: cfx JRun closed connection
Joe, Why don't you give my Image Component a try: http://www.alagad.com/index.cfm/name-aic/ This will resize images and much much more. Doug -- Doug Hughes (Check out my Image Manipulation CFC at http://www.alagad.com) On Wed, 25 Aug 2004 03:19:10 -0400, joe velez [EMAIL PROTECTED] wrote: hi - i created a simple CFX tag to resize images since i couldnt find a tag out there ... if anyone has one (java, not c++) we don't have to try to resolve this post :) the tag works cuz i can go and view the resized image, however, the page that runs the script always displays: Server Error The server encountered an internal error and was unable to complete your request. JRun closed connection. i turned off debug after reviewin MM site but still no help. any suggestions? this is only running on my lap top so maybe i just dont have enough memory. my specs: CFMX on Win2k server P3 256RAM, 2G free disk space ya, not the best machine, but its what i got thx joe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Farcry x SpeckCMS: The best CMS is....
Do you have the answer? Two great CMS... Only one choice... Heh, never heard of Speck and haven't had a chance to test out FarCry. Hatton [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
wow, all good answers, thanks! Matt, I'm curious.What happens if the value has a comma in it? I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now Center on Aging, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Looping problem
What do the query bnimailapp look like? Jim Louis it's the CFX_POP3 function - this gets the messages from the mail server - sender, to, subject, body, UID etc. CFX_POP3 SERVER=mail.server.name PORT=110 USERNAME=loginname PASSWORD=password ACTION="" NAME=bnimailapp [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: looping through checkboxes
I'm pretty sure it will show up right in the value - so you need to be careful with the values you set for those. Matt From: daniel kessler [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 15:24:58 -0400 Subject: Re: looping through checkboxes To: CF-Talk [EMAIL PROTECTED] wow, all good answers, thanks! Matt, I'm curious.What happens if the value has a comma in it? I'm trying to do a cfloop to go through a set of checkboxes by an array of their names and if they're define, then take their value and make an appended string.If a variable is missing, it dies on the isDefined and also did so with parameterExists with this error Parameter 1 of function IsDefined, which is now Center on Aging, must be a syntactically valid variable name. The value that it complains about is the checkboxes value but I was trying to get the variable name in there through the evaluation. Here's the code: cfset the_dept = cfset departments = listToArray(aging,fmst,knes,dean,pch,studserv) cfloop index=ii from=1 to=6 cfif isDefined(evaluate(departments[ii])) cfset the_dept = #the_dept#|#tmp_dept# /cfif /cfloop -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
A Quick Question - Javascript
Hello everyone, Using _javascript_, I want to display numbers from 1 to 5 such that numbers are ordered randomly on each page refresh and none of the number is repeated. e.g first refresh 1,3,4,2,5 second refesh 2,3,5,1,2 etc etc Any help is appreciated. Thanks [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: cfx JRun closed connection
I'll back you 100% on that Doug! Definately worth the $50, or my case, winning it in my local user group raffle :-) Andy Doug Hughes wrote: Joe, Why don't you give my Image Component a try: http://www.alagad.com/index.cfm/name-aic/ This will resize images and much much more. Doug -- [EMAIL PROTECTED] www.creative-restraint.co.uk [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Kill a Session when User Leaves
If I set this when a user successfully logs in: cfset session.user_id = someVALUE What's the best practice way for killing this when the user closes his browser or leaves the secured area? You can disconnect a user's session data from that user's browser by making the session identification cookies into session cookies. Session cookies are destroyed when the browser is closed. If you enable J2EE Sessions within the CF Administrator, this will be the default behavior. If you're using CFID and CFTOKEN cookies, you'll have to do this yourself: cfapplication setclientcookies=no ... cfif not IsDefined(Cookie.CFID) cfcookie name=CFID value=#Session.CFID# cfcookie name=CFTOKEN value=#Session.CFTOKEN# /cfif The preceding code would go into Application.cfm. The omission of an EXPIRES attribute in the CFCOOKIE tag makes the cookie last only until the browser is closed. It's also worth noting that this doesn't actually delete the session variables, it just breaks the connection between them and the user to whom they belonged. Interestingly, I just posted about this very code: http://www.houseoffusion.com/cf_lists/messages.cfm/threadid=34869forumid=4 I'm hearing reports that some of the people who install my app that includes this (only a few) are getting a CF error. Ideas? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: A Quick Question - Javascript
Hello everyone, Using _javascript_, I want to display numbers from 1 to 5 such that numbers are ordered randomly on each page refresh and none of the number is repeated. e.g first refresh 1,3,4,2,5 second refesh 2,3,5,1,2 etc etc Any help is appreciated. Thanks How about something like this? script language=_javascript_ function writeNumbers() { var usedList = ; var myList = ; while (usedList.length 5) { var tempInt = Math.round(Math.random()*4) + 1; if (usedList.indexOf(tempInt) == -1) { usedList = usedList + tempInt; myList = myList + tempInt + ,; } } document.write(myList); } /script You can make some changes as to put your commas in, etc. - Jason [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Doubling of single quotes in query when using a CF function
I've got a simple UPDATE query operating in CF5 on an Access 2000 db via ODBC.If a CF function call is used within the query statement for a string value, then any single quotes get doubled.Without the function call this doesn't happen. UPDATE mytable SET somefield = '#StripHTML(form.somefield)#' WHERE ... vs. UPDATE mytable SET somefield = '#form.somefield#' WHERE ... Explanation? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: RegEx - is it possible to strip all HTML except certain tags?
Can ColdFusion's RegEx functions accomplish this, or am I going to have to figure out a workaround? Neither, actually.Try S. Isaac Dealey's StripTags UDF from http://www.cflib.org. IIRC, it does exactly what you want.:-) I noticed just yesterday that I had a problem using this UDF. If the tag to be striped is at the beginning of the block of text, no problem. But if the tag is in the middle of the text, it's missed completely. Is that the UDF or is that something I'm doing? Thanks Jake [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: A Quick Question - Javascript
?xml version=1.0 encoding=iso-8859-1? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml head titleUntitled/title meta http-equiv=Content-Type content=text/html;charset=iso-8859-1 / /head body script type=text/_javascript_ var numArray = new Array(1,2,3,4,5); var position; var randList = ; while (numArray.length) { position = getRandomNum(0, numArray.length); temp = numArray.splice(position,1); randList += temp; if (numArray.length) randList += , // add comma } function getRandomNum(lbound, ubound) { return (Math.floor(Math.random() * (ubound - lbound)) + lbound); } document.write(randList: + randList); /script /body /html -- Charlie Griefer Marta was watching the football game with me when she said, You know, most of these sports are based on the idea of one group protecting its territory from invasion by another group. Yeah, I said, trying not to laugh. Girls are funny. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Farcry x SpeckCMS: The best CMS is....
Haven't heard of Speck - tried to install Farcry on CrystalTech.com servers and gave up... -Original Message- From: Marco Antonio C. Santos [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 2:14 PM To: CF-Talk Subject: Farcry x SpeckCMS: The best CMS is Do you have the answer? Two great CMS... Only one choice... Thanx _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Doubling of single quotes in query when using a CF function
- Original Message - From: Jim McAtee [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 2:03 PM Subject: Doubling of single quotes in query when using a CF function I've got a simple UPDATE query operating in CF5 on an Access 2000 db via ODBC.If a CF function call is used within the query statement for a string value, then any single quotes get doubled.Without the function call this doesn't happen. UPDATE mytable SET somefield = '#StripHTML(form.somefield)#' WHERE ... vs. UPDATE mytable SET somefield = '#form.somefield#' WHERE ... Explanation? >From some more testing, I just found that this only happens when a UDF is used within the SQL statement.It doesn't happen with native CF functions.For instance, the following will not double the single quotes: UPDATE mytable SET somefield = '#Trim(form.somefield)#' WHERE ... And it's definitely not happening within the UDF itself. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Doubling of single quotes in query when using a CF function
Try: cfqueryparam value=#form.somefield# cfsqltype=cf_sql_varchar maxlength=#max# / and replace #max# with the maximum size of the field.If its a text or cblob field then just remove the maxlength string altogether. -- Damien McKenna - Web Developer - [EMAIL PROTECTED] The Limu Company - http://www.thelimucompany.com/ - 407-804-1014 Nothing endures but change. - Heraclitus [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Calculating Sales Tax within the US
Hello, I'm from Vancouver Canada eh, and my client is in Texas. They are selling an online service (ASP model) withinthe US. Is there any resources or web services that help calculate tax in the US? Brook [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Scripting to add a mapping to CF Administrator
Does anyone know of a script that will write a mapping to the CF Administrator, without the user having to open the administrator manually? Possible?Too insecure for MM to have allowed? -P [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: Calculating Sales Tax within the US
Hey Brook, I'm right next door to you in Victoria ;-) Sales tax in the US is a PITAit all depends how far you want to go, but there are up to 5 levels that I am aware of: -Federal -State -District -County -City Sure makes for a fun time trying to charge the appropriate tax. That said, in Canada I beleieve the appropriate tax can be determined by where the servers are located. HTH Cheers Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com - Original Message - From: Brook Davies To: CF-Talk Sent: Wednesday, August 25, 2004 1:32 PM Subject: Calculating Sales Tax within the US Hello, I'm from Vancouver Canada eh, and my client is in Texas. They are selling an online service (ASP model) withinthe US. Is there any resources or web services that help calculate tax in the US? Brook [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: A Quick Question - Javascript
Thanks Charlie that worked perfectly - Original Message - From: Charlie Griefer [EMAIL PROTECTED] Date: Wed, 25 Aug 2004 13:14:14 -0700 Subject: Re: A Quick Question - _javascript_ To: CF-Talk [EMAIL PROTECTED] ?xml version=1.0 encoding=iso-8859-1? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml head titleUntitled/title meta http-equiv=Content-Type content=text/html;charset=iso-8859-1 / /head body script type=text/_javascript_ var numArray = new Array(1,2,3,4,5); var position; var randList = ; while (numArray.length) { position = getRandomNum(0, numArray.length); temp = numArray.splice(position,1); randList += temp; if (numArray.length) randList += , // add comma } function getRandomNum(lbound, ubound) { return (Math.floor(Math.random() * (ubound - lbound)) + lbound); } document.write(randList: + randList); /script /body /html -- Charlie Griefer Marta was watching the football game with me when she said, You know, most of these sports are based on the idea of one group protecting its territory from invasion by another group. Yeah, I said, trying not to laugh. Girls are funny. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Scripting to add a mapping to CF Administrator
cfset factory = createObject('java','coldfusion.server.ServiceFactory') cfset mappings = factory.runtimeService.getMappings() >From there you can add and remove mappings as you please. e.g. Add a mapping: cfset mappings[/test] = C:\somedirectory Remove a mapping: cfset structDelete(mappings,/test) This is undocumented, unsupported, may change in future releases etc. Spike Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patricia Lee Sent: Wednesday, August 25, 2004 1:46 PM To: CF-Talk Subject: Scripting to add a mapping to CF Administrator Does anyone know of a script that will write a mapping to the CF Administrator, without the user having to open the administrator manually? Possible?Too insecure for MM to have allowed? -P [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]