cfml

How to parse & read from .txt file (NOAA Weather)

橙三吉。 提交于 2019-12-08 06:20:33
问题 I am trying to parse and read from a .txt file, from the NOAA Weather site. How can I search the file to find certain text and insert it into the database? I'm trying to search for Greenville and pull the conditions and temp. Then push that into my database, along with other cities? Any code that you are willing to share would be appreciated. Code: <cffile action="read" file="#expandPath("./NWS Raleigh Durham.txt")#" variable="myFile">" <cfdump var="#myfile#"> Content: National Weather

How to implement the OWASP ESAPI validator with groups of validation attempts in ColdFusion?

旧城冷巷雨未停 提交于 2019-12-07 12:16:30
问题 I have been playing around with the OWASP ESAPI utilities that are included with ColdFusion 9. ColdFusion's Builtin Enterprise Security API. The encoder utilities are pretty straight forward and I believe I have them working fine. My problem is with the validator utilities. I can get them to work singly . That is, if I call the validator.getValidInput() method with "invalid" data it will throw an error that I can catch. However, when I try to call the validator method in batch I get a null

Verify mail server connection programmatically in ColdFusion

主宰稳场 提交于 2019-12-07 03:08:03
问题 I'm using custom SMTP servers and would like to verify the connection when user enters his own server credentials. Exactly the same type of check as Adobe CF and Railo allow to do when adding mail server. Sure, this does not guarantee that delivery will be working, but at least to check that entered server/username/pass are valid. I can see one tricky way: try to send the email with cfmail and check the mail log. But I believe that it can be done with more elegant. Is there any Java library

How does one convert from a Java resultset to ColdFusion query in Railo?

北战南征 提交于 2019-12-07 01:01:01
问题 The following works fine in CFMX 7 and CF8, and I'd assume CF9 as well: <!--- 'conn' is a JDBC connection ---> <cfset stat = conn.createStatement() /> <cfset rs = stat.executeQuery(trim(arguments.sql)) /> <!--- convert this Java resultset to a CF query recordset ---> <cfset queryTable = CreateObject("java", "coldfusion.sql.QueryTable")> <cfset queryTable.init(rs) > <cfset query = queryTable.FirstTable() /> This creates a statement using a JDBC driver, executes a query against it, putting it

What Notable Differences are there between Railo, Open Bluedragon, and Adobe Coldfusion?

馋奶兔 提交于 2019-12-06 20:17:10
问题 An attempt to capture notable differences between implementations: Adobe ColdFusion Railo Open Bluedragon (I'm aware of Smith, but don't believe it's still active). Include CFML and platform differences - syntax, feature, and extensibility. Note, this is not something I've not seen anywhere else, but maybe I'm just not searching correctly. So links to that end would count too. Update Here's my definition of notable in this context: something that simplifies solving a difficult problem. For

Creating a Google reCAPTCHA 'secure token' in ColdFusion

ⅰ亾dé卋堺 提交于 2019-12-06 09:22:17
问题 Google allows you to create a 'secure token' for reCAPTCHA which means you can use the same key/secret across multiple domains. No need to create key/secrets for every domain you look after. Here's their docs, as you can see it has no insight on how the token is encrypted other than an example in Java. My question is how would this be written in ColdFusion. I've had a crack at it for 4 hours, but just can't get it to work. Other examples I've reviewed: An example in PHP: An example in .NET

Verify mail server connection programmatically in ColdFusion

拈花ヽ惹草 提交于 2019-12-05 07:45:53
I'm using custom SMTP servers and would like to verify the connection when user enters his own server credentials. Exactly the same type of check as Adobe CF and Railo allow to do when adding mail server. Sure, this does not guarantee that delivery will be working, but at least to check that entered server/username/pass are valid. I can see one tricky way: try to send the email with cfmail and check the mail log. But I believe that it can be done with more elegant. Is there any Java library available with standard ACF/Railo distro to help me? How would I use them? Examples are highly

How does one convert from a Java resultset to ColdFusion query in Railo?

与世无争的帅哥 提交于 2019-12-05 04:23:29
The following works fine in CFMX 7 and CF8, and I'd assume CF9 as well: <!--- 'conn' is a JDBC connection ---> <cfset stat = conn.createStatement() /> <cfset rs = stat.executeQuery(trim(arguments.sql)) /> <!--- convert this Java resultset to a CF query recordset ---> <cfset queryTable = CreateObject("java", "coldfusion.sql.QueryTable")> <cfset queryTable.init(rs) > <cfset query = queryTable.FirstTable() /> This creates a statement using a JDBC driver, executes a query against it, putting it into a java resultset, and then coldfusion.sql.QueryTable is instantiated, passed the Java resulset

What Notable Differences are there between Railo, Open Bluedragon, and Adobe Coldfusion?

耗尽温柔 提交于 2019-12-05 01:36:20
An attempt to capture notable differences between implementations: Adobe ColdFusion Railo Open Bluedragon (I'm aware of Smith , but don't believe it's still active). Include CFML and platform differences - syntax, feature, and extensibility. Note, this is not something I've not seen anywhere else, but maybe I'm just not searching correctly. So links to that end would count too. Update Here's my definition of notable in this context: something that simplifies solving a difficult problem. For example, Railo offers the <cfvideo> tag, which transcodes video - a non trivial task. Something I would

Upload Files To Google Drive Using ColdFusion

余生颓废 提交于 2019-12-04 22:22:09
*NEW UPDATED FOR BETTER SECOND PART - NOW GETS TO "308 Resume Incomplete", even though file should be just one upload! I am using the foundation of cfgoogle from Ray Camden. But Google has deprecated the code for document uploads. The new standard is Resumable Media Uploads . I have this part working (up to and including the "Initiating a resumable upload request") in the above referenced Google document. Calling Page: <cfset application.cfc.Google = createObject('component','#path_cf_cfc#Google') /> <cfset application.cfc.GoogleDocs = createObject('component','#path_cf_cfc#GoogleDocs') />