Replace line breaks with HTML breaks
Replace(check1.comments, chr(13) & chr(10), "<br>","ALL")
12390 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Replace(check1.comments, chr(13) & chr(10), "<br>","ALL")
<!--- build the wordsURL before getting the data ---> <cfset year = DateFormat(Now(),"YYYY")> <cfset month = DateFormat(Now(),"MM")> <cfset day = DateFormat(Now(),"DD")> <cfset hour = TimeFormat(Now(),"HH")> <cfset wordsURL = "http://tenbyten.org/Data/#year#/#month#/#day#/#hour#/words.txt"> <!--- connect to the url ---> <cfhttp method="get" url="#wordsURL#" timeout="60"></cfhttp> <cfset wordlist = cfhttp.FileContent> <!--- write the data into a text file ---> <cffile action="write" file="#ExpandPath('words.txt')#" output="#ToString(wordlist)#">
<cfhttp method="get" url="http://path/to/words.txt" timeout="60"></cfhttp> <cfset wordlist = cfhttp.FileContent> <ul><li> <cfloop list="#wordlist#" delimiters="#chr(13)##chr(10)#" index="word"> <cfoutput> <a href="http://news.google.com/news?q=#word#" target="_blank">#word#</a> </cfoutput> </cfloop> </li></ul>
<!--- The list with want to clean up ---> <cfset lst = "a,list,with,a,few,duplicates"> <!--- Use a struct to build a set of the list elements ---> <cfset set = StructNew()> <cfloop index="elem" list="#lst#"> <cfset set[elem] = ""> </cfloop> <!--- Convert the set back to a list ---> <cfset lst = StructKeyList(set)>
<cfdirectory action="LIST" directory="d:\www\docs\" name="dirlist"> <cfloop query="dirlist"> <cfset outSize = dirlist.size / 1000> <a href="docs/#dirlist.name#" target="_blank">#dirlist.name#</a> (#NumberFormat(outSize)# kB, #lsdateformat(dirlist.dateLastModified, 'dddd d mmmm yyyy')#) </cfloop>
REReplaceNoCase(string,"<[^>]*>","","ALL")