ColdFusion is a commercial rapid web application development platform invented by Jeremy and JJ Allaire in 1995 and is now an Adobe product. The main programming language for ColdFusion is CFML. Use this tag for code that targets the ColdFusion platform, and also add the "cfml" tag if applicable.

learn more… | top users | synonyms

3
votes
2answers
127 views

Filtering the attributes for a custom tag

I have function that takes all of the attributes passed to a custom tag, and returns a select subset. I am try to convert the current function, which does not use closures ...
0
votes
1answer
64 views

ListFind test conditions

I am considering ...
1
vote
0answers
46 views

Inserting non-empty form values into database

I have a form that I submit and returns me about 500 rows. Before inserting into table I check the strings are not null, this means it loops all the strings. Is there a better way that it doesnt have ...
3
votes
0answers
50 views

Bundling CSS to speed up page loads

My goal is to make web page loading faster by bundling all the CSS files together. The web browser will then only have to load only CSS files. This will only run when the application is starting. ...
2
votes
1answer
120 views

Submitting form using dynamic variable with query

I have a form that I submit with these variables: category_time, date_month, date_year, and ...
1
vote
1answer
57 views

Updating a .txt file

I'm outputting the results of a query to file.txt in JSON. The file is updated every time I click on 'submit'(form) and depending on the variables it updates the query. Right now the table only has ...
2
votes
0answers
29 views

CF/jQ server-side session struct to replace hidden inputs

I have inherited a legacy ColdFusion app with gobs of <input type="hidden"> fields, and a user finally may have used F12/Inspect Element to submit a ...
2
votes
1answer
28 views

Dump of ColdFusion cache

I am trying to give show a UI friendly dump of the cache status ...
3
votes
1answer
68 views

Generating JSON from a query

I am trying to generate JSON from a query. All this seems to be too much grinding it out. ...
0
votes
1answer
87 views

Using Stored Procedures in ColdFusion / Lucee

This is how I write all my database interactions now in Lucee: ...
4
votes
3answers
101 views

Optimizing name highlighting

I have created a set of functions, that when given a struct of structs full of names, it will highlight those names that appear in a body of HTML based text. Is this the best method of doing this? ...
2
votes
3answers
216 views

How to best set default values? [closed]

I recently got into a discussion about the best way to set a couple of default values. I created two sample blocks that would have the same results. The "isDefined" function is specifically for ...
3
votes
1answer
379 views

Insert an SQL Server Table rows into a Bigquery table in one bloc

I want to insert all rows of an SQL server Table into a Bigquery Table having the same schema. The streaming insert row by row is very slow: to insert 1000 rows ...
1
vote
0answers
246 views

Insert all SQL Server table rows in a Google BigQuery Table

I am coding in Coldfusion. I want to know the best way (best performance and reaction time) to insert all rows of an SQL table into a Google Bigquery Table. Actually I am looping over a query result ...
7
votes
1answer
19k views

Better way to fetch JSON data from a server from iOS app

I have successfully coded a network request to fetch JSON data from our server. The remote function is written in ColdFusion. However, the code is quite lengthy and involved. I also noticed in the API ...
4
votes
0answers
82 views

Calculating player ratings

Below I have two players that win or lose and their score fluctuates using the Elo function. I have adapted this code from something closer to my language which is ActionScript. I found the functions ...
10
votes
1answer
129 views

Structuring a master page

I have a small Coldfusion section of our site that all uses similar JavaScript and CSS files and page design. The code is currently repeated for each file, and I'd like to factor it out and set ...
2
votes
2answers
188 views

Best practice on CFML logic embedded in cfquery [closed]

I am trying to remove <cfif> from inside of a <cfquery>. For example: ...
0
votes
2answers
71 views

Setting a default date, but not time [closed]

I have a cfc that I want to set a date without time portion. I am using this.startDate = LSDateFormat(now()); but I have also considered ...
1
vote
1answer
208 views

Converting List to Array when list has quotes and embedded comma

This function converts List to Array when list has quotes and embedded comma ...
2
votes
1answer
349 views

Storing arbitrary form data in SQL as an XML blob

I am currently storing form data in an XML format ...
2
votes
1answer
437 views

reading Excel (93-97) sheet with more than 65536 rows using cfspreadsheet

I have a process that reads multiple sheets from an Excel file, then inserts the data into a database table. However, I am experiencing some memory issues when one of the sheets contains more than ...
0
votes
1answer
186 views

How to store and access translated language text pieces?

We are working to translate our site into different languages. Currently, we pull 80% of a page from a database that is already translated. We drop in a language id and output the appropriate content. ...
4
votes
2answers
201 views

CFML implementation of Array.reduce()

G'day Just before I submit this to CFLib, it'd be great to get feedback: ...
0
votes
1answer
79 views

Running a master query and a query of queries

The following is code I'm running to FIRST, SECOND, THIRD and so on until SEVENTH with a master query and a query of query. As it's clear that I'm using the master query for each of FIRSTCONN, ...
6
votes
1answer
135 views

replaceWithCallback() UDF

As explained in my blog article… I was looking up the docs for Javascript's String replace() function the other day (because, no, I could not remember the vagaries of its syntax!). And whilst ...
0
votes
1answer
151 views

Bitwise Logic optimization

I should be able to figure this out on my own, but I can't seem to wrap my head around how to optimize this set of logic for interpreting the existence of URL parameters. Below is my code: ...
2
votes
2answers
117 views

Looking for code quality suggestions with my open source CFML database project

I just posted a small open source CFML project on github.com, https://github.com/jetendo/db-dot-cfc db.cfc is a standalone CFC with 472 lines of code. UPDATE: the code on github has changed a lot ...
2
votes
1answer
104 views
3
votes
1answer
198 views

Setting a page number from the URL, with fallbacks

I have the following code, but it somehow looks a bit redundant. As I am new to ColdFusion, I am not sure how to optimize it. Can someone suggest an alternative? ...
2
votes
3answers
7k views

Regex to get all image links

I have some pretty basic Regex that scans the output of a HTML file (the whole document source) and attempts to extract all of the absolute links that look like images. Whether they are actually ...
1
vote
2answers
288 views

Loading site configuration from ini file

I load in static setting via an ini file. Ini file have the benefits of NOT being server by most web servers by default. easier to edit than XML even simplier than JSON Setting get loaded in ...
1
vote
4answers
4k views

A couple of basic string parsing functions

I have an app that does a fair bit of text-parsing based on free-form user inputs. In this, I run searches on the whole string, and then on the last value of the string separate from the rest of the ...
2
votes
3answers
683 views

Simple Function To Turn Array Of Objects To Array Of Key Value Pairs

I have an application that has a lot of very complex objects that in most cases I only need to access an id value and a name value from. I'd like to reduce the overhead of serializing these large ...
5
votes
2answers
324 views

Should I treat direct CFC Calls differently than Page Requests?

Should I leave in <cfif reFindNoCase( "\.cfc$" , targetPage ) eq 0> or not? I'm using ColdFusion 8. Direct CFC calls are flushed when the method returns. ...
4
votes
1answer
1k views

Uploading multiple files for faculty nomination system

I created a few forms for faculty members to nominate colleagues for awards. Many of the nominations require documentation to be submitted in order to validate the nomination. I created one form then ...