coldfusion

jQuery ajax seems to alter SVG data sent to coldfusion server

社会主义新天地 提交于 2019-12-18 09:22:50
问题 I'm using $.ajax() to send a string to a coldfusion server where it is stored in a table. When I later query and try to use that data I get an error; "null Enclosed Exception: Invalid byte 2 of 3-byte UTF-8 sequence". First I grab the SVG from the DOM and send it to an action page. It should just be a string, right? var lclSVG = $('#myDiv')[0].innerHTML; // SVG Code (XML?) $.ajax({ url: "myAction.cfm", type: "POST", data: ({myInfo: lclSVG}), }); On the myAction.cfm page I update the data into

Data row limits on cfspreadsheet

这一生的挚爱 提交于 2019-12-18 09:03:45
问题 I am loading about 20,000 rows into a <cfspreadsheet> . It throws an error: When I limit the number of rows to 15,000, I don't get an error. Is there a hard limit on the number of rows <cfspreadsheet> supports? 回答1: This sounds similiar to the issue I had here: How do I fix SpreadSheetAddRows function crashing when adding a large query?. If you have CF10 then you might be in luck 'cause that should be fixed now (as of Update 10 at least). 来源: https://stackoverflow.com/questions/19214735/data

ColdFusion (9) mysteriously removes characters 'D' and 'F' after numbers when exporting to Microsoft Excel (2007)

时间秒杀一切 提交于 2019-12-18 08:34:26
问题 Here's some code snippets for an example: theSheet = SpreadsheetNew("Rates","True"); SpreadsheetAddRow(theSheet,"4A,4B,4C,4D,4E,4F,4G,4H,4I,4J"); SpreadsheetAddRow(theSheet,"4K,4L,4M,4N,4O,4P,4Q,4R,4S,4T"); SpreadsheetAddRow(theSheet,"4U,4V,4W,4X,4Y,4Z,4D4,4F4"); and <cfheader name="content-disposition" value="attachment; filename=#GetTickCount()#.xlsx"> <CFHEADER NAME="Expires" VALUE="#now()#"> <cfcontent type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" variable="

View cfhttp request

江枫思渺然 提交于 2019-12-18 08:25:57
问题 I would like to view the actual http request that gets sent via my cfhttp tag. What is the best tool to capture this? Specially, I want to see exactly what headers and content are being sent. 回答1: To expand on what Edward has said and to answer your question about how you can view a request on ColdFusion; Create a page that simply dumps everything out from GetHttpRequestData(). Have a look at the livedocs on getHttpRequestData() for more information. 回答2: Use Charles http proxy. Add the

Getting complex object error when trying to output query values

本秂侑毒 提交于 2019-12-18 08:19:39
问题 My goal is to just output the column data specified in the "fieldList". Getting the following error: Complex object types cannot be converted to simple values. The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values. The most likely cause of the error is that

ListGetAt Issues when parsing CSV file

断了今生、忘了曾经 提交于 2019-12-18 07:19:57
问题 I have a script that is reading CSV files from clients and is splitting the values into variables that will later on enter the database. This is the error I am getting when a CSV comes in with less columns than the required minimum. In function ListGetAt(list, index [, delimiters]), the value of index, 11, is not a valid as the first argument (this list has 10 elements). Valid indexes are in the range 1 through the number of elements in the list. Expression Invalid list index 11. This is a

COLDFUSION: cfdocument and forcing a pagebreak

戏子无情 提交于 2019-12-18 05:54:45
问题 I am creating a dynamic PDF in ColdFusion and having an issue with "pagebreak". The page in question could have 1 record, or up to 60+ records. Each record is displayed in 2 rows of a table. Some of the returned records are being split between pages (first row is at the end of page one, the second row is the top row of the next). A sample record in displayed HTML: <tr> <td>Title</td><td>Price</td> <td colspan="2">Description</td> </tr> Per client request, I am trying to display =< 9 records

Coldfusion 10 DateFormat Issue

孤者浪人 提交于 2019-12-18 05:14:16
问题 I am using the DateFormat function to convert dates to this format: yyyy-mm-dd . This is the original format of the date: dd-mm-yyyy . Below is a snippet of the code: <cfset newdate = #DateFormat(Trim(mydate), "yyyy-mm-dd")# /> The problem is that I get different results for different dates. For example: If my original date is: 15-05-2013 ( dd-mm-yyyy ) The result is: 2013-05-15 ( yyyy-mm-dd ) However, if I change the input and: The original date is: 01-05-2013 ( dd-mm-yyyy ) The result is:

How to sort an array of structs in ColdFusion

不问归期 提交于 2019-12-18 04:31:28
问题 I have an array of structs in ColdFusion. I'd like to sort this array based on one of the attributes in the structs. How can I achieve this? I've found the StructSort function, but it takes a structure and I have an array. If this is not possible purely in ColdFusion, is it possible in Java somehow (maybe using Arrays.sort(Object[], Comparator) )? 回答1: As usual, CFLib.org has exactly what you want. http://cflib.org/udf/ArrayOfStructsSort /** * Sorts an array of structures based on a key in

Parse & Compare Data using Coldfusion & MySQL

旧街凉风 提交于 2019-12-17 21:36:01
问题 First, I'll explain what I need to do, then how I think I can achieve it. My current plan seems very inefficient in theory, so my question is whether there is a better way of accomplishing it. I have 2 Tables - lets call them 'Products' and 'Products_Temp', both are identical. I need to download a large number of files (XML or XLS) which contain product details (stock, pricing etc) from suppliers. These are then parsed into the Products_Temp table. Right now, I plan to use CF Scheduled Tasks