coldfusion

How can I combining the following RegExs into one expression?

蓝咒 提交于 2019-12-12 01:35:30
问题 I'm using the following RegEx to strip HTML tags from a string <[^>]*> This does not get rid of blank lines, however. I found this other RegEx that successfully removes any blank lines: [#Chr(13)##Chr(10)#]+ I tried to combine both as such: ReReplaceNoCase(arguments.string, "(<[^>]*>)([#Chr(13)##Chr(10)#]+)", "", "ALL") But this does not work. I'm using ColdFusion to do this, which should explain the # signs. I thought the () were used to group operators in RegEx, but it does not seem to work

I want to use WMI or Java in ColdFusion on Windows to get performance data

对着背影说爱祢 提交于 2019-12-12 01:33:04
问题 I am rolling my own simple web-based perfmon, I am not happy with some of the data I can get like cpu usage, which i use via a sql query. I am able to get memory usage just fine...I will attach a screenshot, so you can see what I currently have for my main/home/dashboard page. I am currently using webcharts3d, which i am loving being able to use ajax, update the chart, and i have a dynamically updating dashboard. Yes of course I have to get only a few performance counter's so in my desire to

How do I match a string that does not contain X with ColdFusion regular expressions?

泪湿孤枕 提交于 2019-12-12 01:32:53
问题 I asked this question earlier, but it got a negative vote, so I'm rewording it. I have: <cfset myExpression = "X"> #REFind(myExpression,myString)# I need to change myExpression so that it returns a value other than zero if there is NOT an X in myString, and a 0 if there is an X in myString. 回答1: <cfset string = "abc" /> <cfoutput>#refind( "^[^X]+$" , string )#</cfoutput> // 1 <cfset string = "abcX" /> <cfoutput>#refind( "^[^X]+$" , string )#</cfoutput> // 0 回答2: please check the following

Passing array of query results to jQuery Autocomplete source attribute

99封情书 提交于 2019-12-12 01:29:15
问题 I'm struck up with an issue when tried to pass the query results to the jquery autocomplete's source attribute... <cfloop query="MyQuery"> <cfset head=#ValueList(MyQuery.pname,",")#> <cfset head1=#listtoarray(head)#> </cfloop> Here I want to send the head1 array to the jquery code, Jquery autocomplete code goes as follows.. <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.3.js"></script> <script src=

Decrypt AES from Coldfusion to PHP

烂漫一生 提交于 2019-12-12 01:18:01
问题 I encrypted a string in ColdFusion using: <cfset strEnc=ToBase64(Encrypt("some text","123", "AES","Base64"))> I can decrypt the string in ColdFusion using: <cfset strDec=ToString(Decrypt(ToBinary(strEnc), "123", "AES","Base64"))> But I am unable to decrypt strEnc in PHP. I have found some decrypt functions in PHP. But they require an iv parameter. Can anyone help me? 回答1: The native methods offered by each language will vary in terms of expected arguments, parameters and encryptions methods.

JQuery Validate Remote Return Structure Issue

我是研究僧i 提交于 2019-12-12 01:10:19
问题 Reference is made to prior question here: How do I use jquery validate remote validation to set and return form field values to the form action page? I am using JQuery Validate to perform remote form validation in our Coldfusion Application. As remote validation errors are caught and prepared for user notification, we are building a return structure which contains not only the validation error, but a group of form fields for use in the form action page. As the remote validation error

Updating multiple rows from a cfquery recordset

梦想的初衷 提交于 2019-12-11 23:27:20
问题 Is there a way to update multiple rows of data when the data coming in is from the result of a CFQuery? Currently this run <cfquery> multiple times. Is there a way to do it in one uqery operation? <cfloop query=loc.fixItems> <cfset loc.count++> <cfset var categoryName = loc.fixItems.categoryName> <cfquery> update items set code = <cfqueryparam value="#code#"> where id = <cfqueryparam value="#itemId#"> </cfquery> </cfloop> This can run multiple times and put a heavy load on the server. 回答1:

Coldfusion Ordering rows according to a value in a txt

回眸只為那壹抹淺笑 提交于 2019-12-11 22:57:49
问题 I have a txt file and would like to order all the rows according to a value in each row. What is the best and fastest possible way to achieve this? Below is the code that I use to compile my txt documents: <!---CSV FILE---> <cffile action="read" file="C:/ColdFusion10/cfusion/wwwroot/kelly2/debitorders.csv" variable="csvfile"> <cfoutput> <!---LOOP THROUGH CSV FILE---> <cfloop index="index" list="#csvfile#" delimiters="#chr(10)##chr(13)#"> <!---SET VALUES---> <cfset accountholder = "#listgetAt(

ColdFusion 9, Tomcat 7, Apache and vhosts

拟墨画扇 提交于 2019-12-11 22:42:58
问题 I've successfully managed to install CF9 (war) in Tomcat 7, linking the two via Apache vhosts. I'm using ajp to proxy .cfm requests, and other rewrite urls to Tomcat 7 with Apache serving the rest of the content. However, each vhost needs its own copy of the ColdFusion WEB-INF in the vhost root. This works fine, but it has the side affect of each cf site having a unique instance of CF. The mappings, DSNs and all other settings are custom and not shared between the CF sites. I'd really like to

Inserting Information into a Junction Table ColdFusion

心已入冬 提交于 2019-12-11 21:28:03
问题 On a Blog post page I add Title, Body, and UserID (Foreign Key from Authors Table) into my BlogPost Table: <!--- Query to Insert Blog ---> <cfquery Result="blogEntry" datasource="prpblog"> INSERT INTO BlogPosts (Title, BlogBody, UserID) VALUES ( <cfqueryparam value='#Form.Title#' cfsqltype="cf_sql_varchar"/>, <cfqueryparam value='#Form.BlogBody#' cfsqltype="cf_sql_varchar"/>, <cfqueryparam value='#Form.SelectAuthor#' cfsqltype="cf_sql_numeric"/> ) </cfquery> Then I want to add which tags the