coldfusion

ColdFusion CFC CORS and AJAX posts

一世执手 提交于 2019-12-23 07:57:16
问题 I'm trying to get a form posted to a remote server. The general idea, for now, is that the HTML will run locally and will post to a remote server via AJAX. So there's a form, the JS and the CFC it's posting to. Below is the JS $(document).ready(function () { $("#submit").click(function(){ var setName = $("input[name='setName']").val(); var setNumber = $("input[name='setNumber']").val(); var setTheme = $("input[name='setTheme']").val(); var retailPrice = $("input[name='retailPrice']").val();

ffmpeg - Can I draw an audio channel as an image?

狂风中的少年 提交于 2019-12-23 07:40:06
问题 I'm wondering if it's possible to draw an audio channel of a video or audio file as an image using ffmpeg, or if there's another tool that would do it on Win2k8 x64. I'm doing this as part of an encoding process after a user uploads a video or audio file. I'm using ColdFusion 10 to handle the upload and calling cfexecute to run ffmpeg. I need the image to look something like this (without the horizontal lines): 回答1: You can do this programmatically very easily. Study the basics of FFmpeg. I

How do I test to see if a variable exists in a ColdFusion struct?

半世苍凉 提交于 2019-12-23 07:34:34
问题 I would like to test: <cfif Exists(MyStruct["mittens"])> </cfif> If the "mittens" key doesn't exist in MyStruct, what will it return? 0, or ""?? What should replace Exists function? UPDATE I tried, <cfif IsDefined(MyStruct.mittens)> Which also throws the error Element Mittens is undefined in MyStruct. 回答1: To test for key existence, I recommend: <cfif StructKeyExists(MyStruct, "mittens")> <!--- or ---> <cfset key = "mittens"> <cfif StructKeyExists(MyStruct, key)> Behind the scenes this calls

How do I test to see if a variable exists in a ColdFusion struct?

Deadly 提交于 2019-12-23 07:34:23
问题 I would like to test: <cfif Exists(MyStruct["mittens"])> </cfif> If the "mittens" key doesn't exist in MyStruct, what will it return? 0, or ""?? What should replace Exists function? UPDATE I tried, <cfif IsDefined(MyStruct.mittens)> Which also throws the error Element Mittens is undefined in MyStruct. 回答1: To test for key existence, I recommend: <cfif StructKeyExists(MyStruct, "mittens")> <!--- or ---> <cfset key = "mittens"> <cfif StructKeyExists(MyStruct, key)> Behind the scenes this calls

When should I use # in ColdFusion?

偶尔善良 提交于 2019-12-23 06:57:02
问题 This has been one of the biggest obstacles in teaching new people ColdFusion. When to use # is ambiguous at best. Since using them doesn't often create a problem it seems that most people gravitate to using them too much. So, what are the basic rules? 回答1: I think it may be easier to say where NOT to use #. The only place is in cfif statements, and cfset statements where you are not using a variable to build a string in quotes. You would need to use the # sign in almost all other cases.

ColdFusion SOAP response with attachments

不问归期 提交于 2019-12-23 06:45:07
问题 I am using Coldfusion9 to interact with a 3rd party SOAP service with which I need to both send and receive SOAP with attachments. I am having no issue in receiving the SOAP which may or may not have binary attachments by using ToString() around the HTTP content to convert the SOAP Body into a usable string, however the service requires that I send my response back using attachments as well which is where I am coming undone. I've just never done this in ColdFusion and i'm not exactly sure how

ColdFusion SOAP response with attachments

北城余情 提交于 2019-12-23 06:45:06
问题 I am using Coldfusion9 to interact with a 3rd party SOAP service with which I need to both send and receive SOAP with attachments. I am having no issue in receiving the SOAP which may or may not have binary attachments by using ToString() around the HTTP content to convert the SOAP Body into a usable string, however the service requires that I send my response back using attachments as well which is where I am coming undone. I've just never done this in ColdFusion and i'm not exactly sure how

ColdFusion - converting HTML webpage to Word or PDF document

扶醉桌前 提交于 2019-12-23 05:47:06
问题 I have a webpage, where user has a possible to Print this page OR to save it on his/her computer. How may I save it as a Word or PDF document? Thanks. 回答1: For the MS Word requirement, most versions of Office can interpret basic html/xml. So you might consider the old cfcontent hack as a simpler alternative to POI. (The Word package is not quite as mature as the spreadsheet package.) Basically you generate html, but use cfheader/cfcontent to tell the browser the content is really a Word

CFPDF create variable from a BLOB

拜拜、爱过 提交于 2019-12-23 05:16:41
问题 In ColdFusion 9 we have pdf data stored in a blob in the database. How do I get that into a cfpdf variable? It seems like all options require a filename. Is there a way to do it without writing a file? 回答1: CFPDF and CFDOCUMENT are for creating and modifying a PDF dynamically. As you already have the PDF in a blob in your database you simply need the CF page to send it back as part of the response using CFCONTENT . Assuming you are using some type of ID to reference which PDF you want to

How to compare values from struct and array in ColdFusion?

自作多情 提交于 2019-12-23 05:13:06
问题 I have situation where I have to compare values from structure and array. My structure is created and populated with values from query. Array is created and populated with values from .csv file. Now I need to loop through each of them, compare specific values and then if they match move those values in the list. I will have to use that list later to update/insert records in two different tables. Here is my code for structure: <cfquery name="getRecords" datasource="test"> Select s.ID, f.OLDID,