coldfusion

Coldfusion, help creating a download all button that will zip all the CSV files that are created from a query

a 夏天 提交于 2019-12-25 01:55:52
问题 Right now I have a query that will give me results that are broken down into 2000 rows of results. For example if the query is run and there are 16000 results it will break this down into 2000 results per CSV file that the user can download, so there would be 8 download buttons. When the user press the download button it creates a CSV file. I currently use this in coldfusion to generate the CSV <cflock name="SFSchoolList" timeout="20" type="exclusive"> <cfheader name="Content-Disposition"

Can you Convert Stripe Java Code into CFscript

眉间皱痕 提交于 2019-12-25 01:44:17
问题 The code below is how to impletment stripe payment API, I was wondering if I just convert it to CFscript and call my normal variable will it work? // Set your secret key: remember to change this to your live secret key in production // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe.apiKey = "sk_test_aHhoYVOnsayNSIleB1ETUCSq00vUOS9YVQ"; Map<String, Object> params = new HashMap<String, Object>(); ArrayList<String> paymentMethodTypes = new ArrayList<>();

Listcontains usage with opposite condition

为君一笑 提交于 2019-12-25 01:23:05
问题 Is there a opposite operator option for the Listcontains function in coldfusion? I need to check to make a sure a value does not exist in a string but combine this with another operator. Sort of like this: <cfif checkstring EQ 1 and does not contain listcontains(idcheck,"id1") > 回答1: <cfif checkstring eq 1 and not listcontains( idcheck, 'id1' )> or in cfscript if ( checkstring == 1 && !listcontains( idcheck, 'id1' ) ) 回答2: I would probably prefer using NOT , as Charlie showed. But since

twitter4J, jquery, coldfusion integration

こ雲淡風輕ζ 提交于 2019-12-24 20:23:18
问题 I'm using Twitter4j and attempting to obtain and store user's Twitter access tokens to database for later tweeting. I want to do it entirely with jQuery and ajax, silently. I have a cfc with the basic functions necessary. e.g. tHe following jquery calls a cfc function which generates the requestURL and pops open a Twitter auth window. $(".cbLinkTwitter").live("click", function(e) { $.getJSON(cfcRoot + "/twitter.cfc?method=getRequestURL&returnformat=json, {"user_id":user_id}, function(res,code

Checking for key existence in structure

戏子无情 提交于 2019-12-24 17:26:14
问题 I have a variable named #cfData# which contains an array of structures. As it's clear from the image, for 1st structure array there are 6 keys and for 2nd, only two keys,viz date and open. If I run a common loop, to go through each and every key, I will get an error at second array element. So the following only works when all the keys are present in the structure: <cfset blockedtotal = 0 /> <cfset bouncetotal = 0 /> <cfset blocked = 0/> <cfset datetotal = 0 /> <cfloop array = #cfData# index

cflogin in cfscript

我是研究僧i 提交于 2019-12-24 17:12:25
问题 I'm trying to learn the new cfscript syntax, as well as use cflogin. I'm guessing I can't mix cf tags in cfscript, and I don't see a script equivalent to cflogin, cflogout, cfloginuser. Should I call a component that is written in the CF8 syntax in order to use cflogin? public void function onRequest(required string Page) output="true" { if (StructKeyExists(url,"logout")) { <cflogout> } <cflogin> local.qryUsr = new Components.Usr.Login(form); if (local.qryUsr.Recordcount) { <cfloginuser name=

Coldfusion IIS Rewrite

谁都会走 提交于 2019-12-24 17:11:10
问题 I'm trying to map a URL like this: www.domain.com/some-page.cfm?coid=1 to be more user-friendly like this: www.domain.com/some-page/company-name or www.domain.com/company-name I've tried over and over using URL Rewrite in IIS and can't for the life of me get it to work. Any help would be appreciated! 回答1: I think you may actually want to do the opposite... use IIS to map /abc.htm requests to /?id=abc , right? (For the rule you are requesting, I recommend writing that using ColdFusion.) Here's

CF SQL Creating a Table with different results

老子叫甜甜 提交于 2019-12-24 16:09:15
问题 I am trying to create a table using coldfusion and sql. The table I am trying to create looks like this: <cfquery datasource="#application.dsn#" name="someprocessTable"> SELECT * FROM checklists </cfquery> <table id="Checklist_Stats"> <thead> <th><b>Associate Name</b></th> <th><b>Location</b></th> <th><b>Checklists Generated by Associate</b></th> <th><b>Checklists Generated by Selected Location(s)</b></th> <th><b>Associate Percentage of Location Total</b></th> </thead> <tbody> <cfoutput query

ColdFusion Client Storage

旧巷老猫 提交于 2019-12-24 15:27:02
问题 In a high load application, is it better to put the client storage in the Registry or in a database? I am concerned that my high load will cause more database connections for client storage information and slow everything down. FYI: We use ColdFusion on Linux Thoughts? 回答1: If you store client variables in the registry (IMHO), you will have more of a performance impact with a high load. When Coldfusion stores the client variables in the DataBase, they are read at the beginning of the page

SQL Query breaking for some reason

二次信任 提交于 2019-12-24 14:13:51
问题 Please consider the following Image: When I ran the following query in coldfusion: <cfquery datasource="mydb" name="qCoulmnInsert"> INSERT INTO simplexresults.contactresults_email_account_summary_devices (open_desktop_int, open_other_int, open_phone_int, open_tablet_int, open_webmail_int, <!--- FOR Unique Open ---> unique_webMail_int, unique_tablet_int, unique_other_int, unique_phone_int, unique_desktop_int, <!--- FOR DATES ---> startdate_dt, enddate_dt, date_dt) VALUES <!--- loop through