This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset aItemsToDeleteTemp = [{"id"="apples"},{"id"="oranges"},{"id"="bananas"},{"id"="pears"},{"id"="kiwi"},{"id"=["peach"]}] /> | |
<cfset aItemsInDB = [{"id"="apples"},{"id"="oranges"},{"id"="bananas"},{"id"="peach"}] /> | |
<!--- Find the difference ---> | |
<cfset aItemsToDeleteTemp.removeAll(aItemsInDB) /> | |
<!--- Convert the remaining array of structs to a simple array ---> | |
<cfset aItemsToDelete = [] /> | |
<cfset aLen = arrayLen(aItemsToDeleteTemp) /> | |
<cfloop from="1" to="#aLen#" index="r"> | |
<cfif isArray(aItemsToDeleteTemp[r]["id"]) is true> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- instantiate cfsolrlib ---> | |
<cfset application.fapi.getContentType("configSolrServer").setupSolrLibrary() /> | |
<cfset tickBegin = getTickCount() /> | |
<cfset oSolrProContentType = application.fapi.getContentType("solrProContentType") /> | |
<cfset stContentType.contentType = "TYPENAME" /> | |
<cfset batchSize = 2000 /> | |
<cflog application="true" file="aaa_farcrySolrPro" type="information" text="A_1. procTime: #getTickCount()-tickBegin# Date: #dateFormat(now(),"yyyy-mm-dd")# #timeFormat(now(),"hh:mm:ss")#" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
var aOptions = [ | |
'--load-error-handling "ignore"', | |
'--margin-top "20mm"', | |
'--margin-bottom "15mm"', | |
'--page-size "Letter"', | |
'--header-html "#uriWithoutFile#/header_all.cfm"', | |
'--header-spacing "5"', | |
'--footer-html "#uriWithoutFile#/footer_all.cfm"', | |
'--footer-spacing "3"', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
aData = [3,1,"","",3,4,"",""]; | |
aData = arrayFilter(aData, function(item) { | |
return item != ""; | |
}); | |
writeOutput(arrayToList(aData)); | |
</cfscript> |