coldfusion-8

When should I use Scope Locking (Application, Server, etc…) vs named locking in ColdFusion?

主宰稳场 提交于 2019-12-10 12:37:22
问题 When is it appropriate to use <cflock scope="application"> or it's ilk as opposed to <cflock name="foo">? Specifically, I'm interested in using CFLock to protect shared objects in the application, session, or server scopes, but I'm also interested in finding out about different uses of locking in ColdFusion. 回答1: You should use when reading and writing from things that can change in the application scope. For example: <cfquery name="application.myData"> select * from myTable </cfquery> You

Creating QR Code with Coldfusion

元气小坏坏 提交于 2019-12-09 16:04:12
问题 Has anyone gotten the "Open Source QR Code Library" to work with ColdFusion? I need to generate QR Codes in ColdFusion. I also found this tutorial on how to generate it using Zxing. But the tutorial is not clear on how to configure the files, e.g. what needs to be in which dir... Any help and alternatives are welcomed, thanks. 回答1: Zxing uses two (2) jars: core.jar and javase.jar . The easiest way to install them is to place both jars anywhere in the CF classpath (example: C:\ColdFusion8

How can I clean HTML tags out of a ColdFusion string?

情到浓时终转凉″ 提交于 2019-12-09 09:06:55
问题 I am looking for a quick way to parse HTML tags out of a ColdFusion string. We are pulling in an RSS feed, that could potentially have anything in it. We are then doing some manipulation of the information and then spitting it back out to another place. Currently we are doing this with a regular expression. Is there a better way to do this? <cfloop from="1" to="#ArrayLen(myFeed.item)#" index="i"> <cfset myFeed.item[i].description.value = REReplaceNoCase(myFeed.item[i].description.value, '<(.|

Date format and SQL Query clarification

╄→гoц情女王★ 提交于 2019-12-08 13:24:49
问题 Please consider the following piece of code ( In the context of my previous thread Playing around with date range in ColdFusion 8). <cfparam name="Form.startdate" default="#dateformat(now()-5, 'mm/dd/yyyy')#"> <cfparam name="Form.enddate" default="#dateformat(now()-1, 'mm/dd/yyyy')#"> <cfparam name="Form.selectdate" default="#dateformat(now(), 'mm/dd/yyyy')#"> <cfinput type="dateField" name="startdate" label="Start Date" width="100" value="#Form.startdate#"> <cfinput type="dateField" name=

Coldfusion: Dealing with Null values in Date Field

牧云@^-^@ 提交于 2019-12-08 05:50:34
问题 I've got this form with all kinds of employee certifications, I need to input a date. Sometimes this date will be months in the future other times the date will be undefined, null. Whenever I try to pass a null value to my CFC, I always get an error that looks like: The CPRADULTEXP argument passed to the addEmployee function is not of type date. My Form code: <!--- If null, set a default if not, set the default to database default ---> <cfif not isDefined("certificationsList.cprAdultExp")>

ColdFusion: session variables not sticking in website migrated from CF 8 to CF 10

心不动则不痛 提交于 2019-12-08 03:27:44
问题 I manage a ColdFusion-based website that recently migrated from CF 8 to CF 10. The site requires users to log in and keeps certain values in session variables, which are used throughout the site for verification, etc. Since the migration to CF 10, I have been having a lot of trouble with sessions not "sticking" from page to page, particularly after the login process. I had not been using cookies to keep track of values on the client side prior to the migration, nor do I use addtoken="yes" for

How can I scale an image with ColdFusion without losing resolution?

强颜欢笑 提交于 2019-12-08 01:08:34
问题 Server Config: Windows Server 2003 IIS 6 ColdFusion 8 Standard Edition Java Version 6 Update 18 I have a ColdFusion application that allows users to upload images that will be added to an existing PDF. When the images are added to the PDF, they have to fit within a minimum/maximum height and width, so the uploaded image needs to be scaled to fit. For instance, let's say the minimum height and width for a given image is 100x100, and the maximum height and width is 200x200, and the user uploads

Coldfusion: Dealing with Null values in Date Field

ぐ巨炮叔叔 提交于 2019-12-07 17:59:24
I've got this form with all kinds of employee certifications, I need to input a date. Sometimes this date will be months in the future other times the date will be undefined, null. Whenever I try to pass a null value to my CFC, I always get an error that looks like: The CPRADULTEXP argument passed to the addEmployee function is not of type date. My Form code: <!--- If null, set a default if not, set the default to database default ---> <cfif not isDefined("certificationsList.cprAdultExp")> <cfinput type="datefield" required="no" name="cprAdultExp" value="" > <cfelse> <cfinput type="datefield"

Using BETWEEN on a varchar field not a numeric field?

我是研究僧i 提交于 2019-12-07 12:53:53
问题 I am using ColdFusion 8 and SQL Server 2008 R2. I am trying to query a column of values to get rows with a value within a range. The column SHOULD be numeric, but it's not. It's setup as a varchar (by someone else). There are 100,000+ rows of data. Here's a FAKE sample of the data: ID COLUMN 1 1 2 1.2 3 0.9 4 5 5 -6 My query looks like this: select column from table where column between 1 and 2 This query won't run because the where statement's column is a varchar, and I get a conversion

CF8 and AES decrypting MySQL AES: encodings are not same

本秂侑毒 提交于 2019-12-07 11:05:22
问题 This has become more of an exercise in what am I doing wrong than mission critical, but I'd still like to see what (simple probably) mistake I'm making. I'm using mysql (5.1.x) AES_ENCRYPT to encrypt a string. I'm using CF's generateSecretKey('AES') to make a key (I've tried it at defaul and 128 and 256 bit lengths). So let's say my code looks like this: <cfset key = 'qLHVTZL9zF81kiTnNnK0Vg=='/> <cfset strToEncrypt = '4111111111111111'/> <cfquery name="i" datasource="#dsn#"> INSERT INTO table