小编Lei*_*igh的帖子

Coldfusion加密和解密

我在使用cf9加密和解密功能时遇到问题.具体来说,我使用的代码需要能够使用AES/ECB/PKCS5Padding 256加密.我正在尝试使用以下代码将数据发布到第三方银行:

<cfparam name="theKey" default="someStaticKey">
<cfset strName = leaddetail.leadlast&','&leaddetail.leadfirst />
    <cfset stFields = {requesttype = "eftaddonetimecompletetransaction"
            ,clientid = "XXXXXX"
            ,urltoredirect = "#RedirectURl#"
            ,customerid = "#leaddetail.leadid#"
            ,isdebitcardonly = "No"
            ,customername = "#strName#"
            ,customeraddress1 = "#form.billingaddress#"
            ,customercity = "#form.billingcity#"
            ,customerstate = "#form.billingstate#"
            ,customerzip = "#form.billingzip#"
            ,cardbillingaddr1 = "#form.billingaddress#"
            ,cardbillingcity = "#form.billingcity#"
            ,cardbillingstate = "#form.billingstate#"
            ,cardbillingzip = "#form.billingzip#"
            ,accounttype = "CC"
            ,name_on_card = "#form.leadname#"
            ,accountnumber = "#form.ccacctnum#"
            ,expmonth = "#Left(form.ccexpdate,2)#"
            ,expyear = "#Right(form.ccexpdate,2)#"
            ,cvvcode = "#form.ccv2#"
            ,amount = "#NumberFormat(esigninfo.esignpayamt,'9999.99')#"
            ,startdate = "#DateFormat(Now(),'YYYY-MM-DD')#"
            ,transactiontypecode …
Run Code Online (Sandbox Code Playgroud)

encryption coldfusion cryptography coldfusion-9

0
推荐指数
1
解决办法
1285
查看次数

存储过程中的ColdFusion 10错误

在.CFC文件中,在CF函数内和CFargument标记中.

    <cfscript>
        var sp=new storedproc();
        sp.setDatasource(variables.datasource);
        sp.setProcedure("storedProcedure_INSERT");
        sp.addParam(cfsqltype="cf_sql_integer",type="in",value=arguments.one);
        sp.addParam(cfsqltype="cf_sql_integer",type="in",value=arguments.two);
        sp.addParam(cfsqltype="cf_sql_integer",type="in",value=arguments.three);
        sp.addParam(cfsqltype="cf_sql_integer",type="in",value=arguments.four);
        sp.addProcResult(name="results",resultset=1);
        //writeDump(sp);break;  //This dump is reached
        var spObj=sp.execute(); //blows up here; this is never reached
        writeDump(spObj);break; //This is never reached, either.
        var spResults=spObj.getProcResultSets().results;
Run Code Online (Sandbox Code Playgroud)

任何能告诉我为什么sp.execute()爆炸消息的人都会发出闪亮的光芒

"Cannot find results key in structure.

The specified key, results, does not exist in the structure."
Run Code Online (Sandbox Code Playgroud)

我曾经多次使用这个伪代码,过去可能会使用它,而且从来没有这样做过.我已连接到MSSQL Server 2012数据库,CF Admin中的所有内容都是板球,其他SP正常运行.堆栈跟踪甚至根本不包含任何MY代码o_O

错误发生在C:/ColdFusion10/cfusion/CustomTags/com/adobe/coldfusion/base.cfc:cline 491来自C:/ColdFusion10/cfusion/CustomTags/com/adobe/coldfusion/storedproc.cfc:line 142来自//hq-devfs/development$/websites/myProject/cfc/mySOAPWSDLs.cfc:line 123

如果我再尝试粘贴,那么SO就会爆炸.谷歌......没有帮助._.

sql-server coldfusion stored-procedures sql-server-2012 coldfusion-10

0
推荐指数
1
解决办法
754
查看次数

ColdFusion日期前的日期

我好像在这里有一个脑屁.我试图在今天的日期之前显示14天或更长时间内输入数据库的所有用户.出于某种原因,我要么得到所有人,要么得到所有人,而不是我需要的人.这就是我所拥有的.请告诉我哪里出错了.谢谢!

<CFSET TodaysDate = #DateFormat (Now(), "mm-dd-yyyy")#>
<CFSET CheckDate = #DateFormat(TodaysDate-14,"mm-dd-yyyy")#>

<cfquery name="getUser" datasource="DNS_Test">
    select *
    from   Login
    where  DateEntered <= #CheckDate#
</cfquery>


<cfoutput> 
<cfloop QUERY="getUser">
   #getUser.LastName#, #getUser.FirstName# <br>
<cfloop>
</cfoutput>
Run Code Online (Sandbox Code Playgroud)

coldfusion

0
推荐指数
1
解决办法
529
查看次数

将字符串转换为整数数组,将字符串st ="1 2 3 4 5"转换为ar = [1,2,3,4,5]

我正在读一个字符串,作为整行数字,用空格分隔,即ie 1 2 3 4 5.我想将它们转换为整数数组,以便我可以操纵它们.但是这段代码不起作用.它说不兼容的类型.

String str = br.readLine();
int[] array = new int[4];
StringTokenizer tok = new StringTokenizer(str," ", true);
boolean expectDelim = false;
int i = 0;

while (tok.hasMoreTokens()) {
    String token = tok.nextToken();
    ar[i] = Integer.parseInt(token);
    i++;
}
Run Code Online (Sandbox Code Playgroud)

java arrays string parseint stringtokenizer

0
推荐指数
1
解决办法
993
查看次数

cfselect绑定和jquery事件冲突

我使用<cfselect>的bind属性绑定加载状态列表.该绑定与另一个<cfselect>加载相关城市的绑定相关联.这两个工作正常.

现在我需要添加第三个选择列表.当第一个cfselect更改时,我想将两者的值传递cfselect给jQuery,以加载第三个列表.第三个列表是一个普通的HTML <select>.这基本上是一个旧的继承代码所以我知道两件事的混合是一个坏主意.

所以这是正在发生的事情.第一次打电话没问题.它传递正确cityid.下次我改变状态时,它的状态通过cfselect改变,但是它传递旧的cityid而不是新的.这会为第三个下拉列表创建一个问题,该问题不会加载结果.

所以基本上结构是这样的:

  • 首先cfselect绑定加载状态
  • 第二个cfselect绑定基于stateid传递加载城市
  • 第三个select从前两个cfselect获取州和城市值以加载邮政编码

现在jQuery代码:

$(document).on('change',function() {
   var a = $("#cfselect1").val();
   /* 
      The next line seems to be a problem area. It always fetches 
      the old cityid. Maybe due to the ext js bind is loading 
      later than jquery being first
   */
   var b = $("#cfselect2").val(); 
   $ajax({ajax code here})
}); 
Run Code Online (Sandbox Code Playgroud)

我希望我提出一个明确的问题.

javascript coldfusion jquery

0
推荐指数
1
解决办法
181
查看次数

ColdFusion和MySql日期格式

我正在使用表单将日期添加到我的MySQL数据库中.该列的数据类型为datetime,列名为_date.

要输出我的数据,我使用此代码:

<cfoutput>
    <cfquery name="vehiclelogDate" datasource="#datasource#">
        select ID, '_date'
        from   vehicle_log
        where  vehicle_id = <cfqueryparam value="#url.id#">
        order by _date ASC
    </cfquery>

    <cfset fist_year = DATEPART("yyyy",'#vehiclelogDate._date#')>

    #first_year#
</cfoutput>
Run Code Online (Sandbox Code Playgroud)

当我这样做时,我收到错误:值_date无法转换为日期.

我最近从Access测试数据库转换为MYSQL,现在出现了这个错误.

有人可以帮忙吗?

mysql coldfusion

0
推荐指数
1
解决办法
71
查看次数

SQL CFoutput帮助,而不是在打开网页时处理

我目前正在学习SQL.在我的CFM页面上,我已经从教授给我们的指示中输入了所有信息.我甚至与其他学生相比,试图找出问题所在,但他们的页面看起来像我的.请帮我弄清楚我做错了什么.谢谢.

这是网页链接http://pretendcompany.com/jaedenemployees.html

错误:

第66行第32栏的72777A不是有效的标识符名称.CFML编译器正在处理:CFOUTPUT标记的主体,从第62行第3列开始.

码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="author" content="YOUR NAME HERE" />

<title>USU MIS 2100</title>

<style type="text/css" media="all">
td {
align:center;
width:955;
border:none;
text-align:center;  
vertical-align:top;
height:40px;
}


table.center{
    margin:auto;
}
h1{
font-size:26px;
color:#001F3E;  

}
h2{
font-size:20px; 
color:#ffffff;
}
img{ text-align:center;
}
td.photo{
margin:auto;    

}
</style>


</head>

<body>
<table class="center">
  <tr>
    <td  ><img src="images/header2_usu.jpg" width="755" height="265" alt="usu" /></td>
  </tr>
  <tr>
    <td style="height:900;background-color:#D7D9D9;padding-top:50px;">

    Employees by Department …
Run Code Online (Sandbox Code Playgroud)

sql coldfusion ms-access

0
推荐指数
1
解决办法
68
查看次数

在Bluemix中启用的CF CLI功能

CF CLI提供了许多云代工厂功能,Bluemix平台决定不允许这样做.

CF_STAGING_TIMEOUT - 上传大型战争文件时对Bluemix没有任何影响.cf set配额 - 不适用于Bluemix.删除组织 - Bluemix文档说必须通过支持票证完成.

有没有任何文档,哪些功能在Bluemix上不起作用?

command-line-interface ibm-cloud

0
推荐指数
1
解决办法
139
查看次数

在coldfusion中搜索我的搜索表单的SQL搜索

我为我的应用程序创建了一个搜索表单.我现在想要通过从productID,ProductName,ProductCostFrom,ProductCostTO一次从1个或多个输入中获取输入来搜索数据库.我正在使用以下查询进行搜索.如果我在输入中给出成本范围,它工作安静,但如果我只搜索"ProID"或"ProName"或两者,则会出现语法错误.

<cfquery name="myquery" datasource="cfdb2">
    Select *  
    from   ProEntry 
    where  (
              Procost BETWEEN #Form.Procost# AND #Form.ProCostTo#
           ) 
    OR     (
            Proid='#form.Proid#' OR 
            Proname='#form.Proname#'
           ) 
</cfquery>
Run Code Online (Sandbox Code Playgroud)

mysql sql-server coldfusion

0
推荐指数
1
解决办法
100
查看次数

检查Youtube ID是否对ColdFusion有效

我想检查YouTube链接/ ID是否有效.它应该通过if/else语句给我一个答案.

我试过这个:

<cfset variables.key = "my_key_value_here">
<cfset variables.headers = "https://www.youtube.com/oembed?format=json&url=http://www.youtube.com/watch?v=#variables.key#">

<cfif (IsArray(#variables.headers#) ? ReMatch('(http:\/\/)(?:www\.)?youtu(?:be\.com\/(?:watch\?|user\/|v\/|embed\/)\S+|\.be\/\S+)',#variables.headers#) : false)>
     Correct Id!
<cfelse>
   There is no video with that Id!
</cfif>
Run Code Online (Sandbox Code Playgroud)

示例中的ID是正确的,应输出:"正确的ID!" 但它始终显示else语句.

谢谢你的帮忙!

youtube coldfusion if-statement

0
推荐指数
2
解决办法
191
查看次数