首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Getting Started

    > Examples <cfloop from="1" to="10" step="2" index="i"> <cfoutput>

  • #i#
  • </cfoutput> </cfloop> break <cfbreak> Loop for List <cfset test="aaa,bbb,ccc,ddd"> <cfloop list="#test#" index index 参数就可以了 另一种可以获取到 index 的循环模式: <cfset list="Partner,Response Date,Response Status" /> <cfloop from ="1" to="#listLen(list)#" index="i"> <cfoutput> listGetAt(list, i) </cfoutput> </cfloop> Query "> </cfloop> Example 从 cc_TEST 表中搜索前十个数据, 放到 TEST 的 <cfQuery> 之中 几个需要注意的地方: 循环里面直接使用对应的列名就可以 在 <cfloop

78760编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Basic - cfset

    names3=#names#+3 /> <cfset names4=#names#+#names# /> 这里 names2 会被认为是 3+3 的字符串 而 names3 和 names4 实际上是 6 <cfloop from="1" to="10" index="i"> <cfloop from="1" to="10" index="j"> <cfoutput> #i+j# </cfoutput > </cfloop> </cfloop> 这段代码会输出总和 但是注意如果将输出行改为 #i#+#j# 那么就会输出很多 X+X 这种格式的东西 声明局部变量 只需要添加一个 var 关键字,

    1.1K60编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Basic - cfquery

    CC_TEST"> select top(10) [CONTACTID] from ltbContact; </cfquery> 使用方法 CF: 一般搜索结果会有很多行, 因此只需要使用循环输出 <cfloop ][index]); arrayAppend(sumArray, val(QuerySuperSet[arguments.ColumnName][index])); } } 按列顺序输出 cfloop query with group 仅在 CF11 之后版本有效 注意最后一层我们是按照 Loc 输出,loc 还是要出现在 loop 的 group 里面 必须使用已经排序好的 Query <cfloop query="sites" group="orgname"> <optgroup label="#sites.orgname#"></optgroup> <cfloop group="suborg #" orgId="#sites.org#">#sites.location#</option> </cfloop> </optgroup> </cfloop> </cfloop

    61620编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion-命令速查与日常使用-CheatSheet Pt 1

    table table-bordered table-condensed table-datasubset"> <cfloop index="i" array="#arData.data.xmlchildren[1].xmlchildren#"> #i.xmlname# </cfloop > <cfloop index="i" array="#arData.data.xmlchildren#"> <cfloop index="j" array="#i.xmlchildren#"> #j.xmltext# </cfloop> </cfloop> 首先要求 XML 代码最外层必须被一个 root tag 包围, 否则会报以下错误: The markup in the

    1.1K40编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion-命令速查与日常使用-CheatSheet Pt 2

    sbiztemplist = ""> <cfset arrSearch = structfindvalue(structConcerns.IncidentsDetail,subbusiness,"all")> <cfloop sbiztemplist = listAppend(sbiztemplist,arrSearch[arr].owner.Orgname,"|")> </cfif> </cfif> </cfloop Example <cfset list="Partner,Response Date,Response Status" /> <cfloop from="1" to="#listLen(list)#" index="i"> <cfoutput> listGetAt(list, i) </cfoutput> </cfloop> Array 在 cfscript 中以 data=[0,0,0,0,0

    59420编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Errors & Troubleshooting

    Struct cannot be used as an array 格式转换错误 可能是将 struct 放到了 cfloop 的 array 参数中因此报错 ColdFusion - Error:

    64350编辑于 2022-09-21
  • 来自专栏陈满iOS

    iOS开发·RunLoop源码与用法完全解析(输入源,定时源,观察者,线程间通信,端口间通信,NSPort,NSMessagePort,NSMachPort,NSPortMessage)

    kCFRunLoopAllActivities, YES, 0, &myRunLoopObserver, &context); if (observer){ CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop]; CFRunLoopAddObserver(cfLoop, observer, kCFRunLoopDefaultMode); kCFRunLoopAllActivities, YES, 0, &myRunLoopObserver, &context); if (observer){ CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop]; CFRunLoopAddObserver(cfLoop, observer, kCFRunLoopDefaultMode); = [myRunLoop getCFRunLoop]; CFRunLoopAddObserver(cfLoop, observer, kCFRunLoopDefaultMode);

    3K20发布于 2018-09-10
  • 来自专栏MelonTeam专栏

    一个创建自定义事件源的例子

    kCFRunLoopAllActivities, YES, 0, &myRunLoopObserver, &context); if (observer) { CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop]; CFRunLoopAddObserver(cfLoop, observer, kCFRunLoopDefaultMode);

    2.6K100发布于 2018-01-04
  • 来自专栏FreeBuf

    挖洞经验 | 发现Lucee 0day漏洞RCE掉三个苹果公司网站

    <cfloop array="#finds#" index="str"> <cfset str = rereplace(listRest(str, '.'), '.$', '') /> [..snip currAction] = 1 /> <cfelse> <cfset searchresults[str][currAction]++ /> </cfif> </cfif> </cfloop

    1.2K10发布于 2021-03-09
  • 来自专栏Helloted

    Runloop(1):基础

    kCFRunLoopAllActivities, YES, 0, &myRunLoopObserver, &context); if (observer) { CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop]; CFRunLoopAddObserver(cfLoop, observer, kCFRunLoopDefaultMode);

    51720编辑于 2022-06-07
  • 来自专栏云原生布道专栏

    【IOS开发高级系列】Runloop专题

    kCFRunLoopBeforeTimers, YES, 0, &myRunLoopObserver, &context);    if (observer) {        CFRunLoopRef cfLoop = [myRunLoop getCFRunLoop];         CFRunLoopAddObserver(cfLoop, observer, kCFRunLoopDefaultMode);     

    91420编辑于 2023-10-16
  • 领券