<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Against All Odds - UDF</title>
			<link>http://www.ppshein.net/index.cfm</link>
			<description>A blog for ColdFusion, Android, jQuery, jQueryMobile, Oracle, HL7 and other Web-based programming languages, Web Server like IIS7 and RDMS like Oracle, Microsoft SQL and MySQL.</description>
			<language>en-us</language>
			<pubDate>Wed, 19 Jun 2013 23:33:06 -0700</pubDate>
			<lastBuildDate>Mon, 24 Dec 2012 01:49:00 -0700</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>pyaephyoeshein@gmail.com</managingEditor>
			<webMaster>pyaephyoeshein@gmail.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>pyaephyoeshein@gmail.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Convert date format UDF</title>
				<link>http://www.ppshein.net/index.cfm/2012/12/24/Convert-date-format-UDF</link>
				<description>
				
				Today, I&apos;ve created simple UDF for convert date format &quot;dd/mm/yyyy&quot; to &quot;mm/dd/yyy&quot;. Because our clients want to use &quot;dd/mm/yyyy&quot; format as our national format into our projects. You may all know that it&apos;s very easy to convert but it&apos;s dedicated to those who start learning Coldfusion UDF.
				 [More]
				</description>
				
				
				<category>UDF</category>
				
				<category>CF Function</category>
				
				<pubDate>Mon, 24 Dec 2012 01:49:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2012/12/24/Convert-date-format-UDF</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Simple UDF for LIKE searching type</title>
				<link>http://www.ppshein.net/index.cfm/2011/7/13/Simple-UDF-for-LIKE-searching-type</link>
				<description>
				
				I bet, every programmer know &quot;&lt;b&gt;LIKE&lt;/b&gt;&quot; searching type in all RDBMS. It&apos;s so simple and can help us to search by all types of character. Unfortunately, we need to avoid using LIKE command if we really don&apos;t need it because it can make query performance to getting slow and sometimes, RDBMS can be crush. Today, I need to use create simple UDF in Coldfusion for LIKE command. Because, we need consistency for LIKE command in our searching query.

That&apos;s why I wrote following UDF for LIKE.

&lt;code&gt;
&lt;cffunction name=&quot;UdfForLIKE&quot; returntype=&quot;string&quot; output=&quot;No&quot;&gt;
	&lt;cfargument name=&quot;SearchParam&quot; type=&quot;string&quot; default=&quot;&quot;&gt;
	&lt;!--- If search method doesn&apos;t declare, STARTING is default. ---&gt;
	&lt;cfargument name=&quot;SearchMethod&quot; type=&quot;string&quot; default=&quot;STARTING&quot;&gt;
	&lt;cfset ReturnResult = &quot;&quot;&gt;
	&lt;cfswitch expression=&quot;#SearchMethod#&quot;&gt;
		&lt;cfcase value=&quot;STARTING&quot;&gt;
			&lt;cfset ReturnResult = SearchParam &amp; &quot;%&quot;&gt;
		&lt;/cfcase&gt;
		&lt;cfcase value=&quot;ENDING&quot;&gt;
			&lt;cfset ReturnResult = &quot;%&quot; &amp; SearchParam&gt;
		&lt;/cfcase&gt;
		&lt;cfcase value=&quot;WITHIN&quot;&gt;
			&lt;cfset ReturnResult = &quot;%&quot; &amp; SearchParam &amp; &quot;%&quot;&gt;
		&lt;/cfcase&gt;
		&lt;cfcase value=&quot;EXACT&quot;&gt;
			&lt;cfset ReturnResult = SearchParam&gt;
		&lt;/cfcase&gt;
		&lt;cfdefaultcase&gt;
			&lt;cfset ReturnResult = SearchParam &amp; &quot;%&quot;&gt;
		&lt;/cfdefaultcase&gt;
	&lt;/cfswitch&gt;
	&lt;cfreturn ReturnResult&gt;
&lt;/cffunction&gt;
&lt;/code&gt;
				 [More]
				</description>
				
				
				<category>UDF</category>
				
				<category>Coldfusion</category>
				
				<pubDate>Wed, 13 Jul 2011 18:14:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2011/7/13/Simple-UDF-for-LIKE-searching-type</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>REMatch in Coldfusion save my time</title>
				<link>http://www.ppshein.net/index.cfm/2010/11/2/REMatch-in-Coldfusion-save-my-time</link>
				<description>
				
				As we all know, there are a lot of functions in Coldfusion and I can&apos;t know all of them when I need to use. That&apos;s why I print out all of Coldfusion functions lists and put it on my wall. Even I did it already, I missed to use some core functions to put my projects. &lt;a href=&quot;http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_27.html&quot; target=&quot;_blank&quot;&gt;REMatch&lt;/a&gt; is one of them. 

The usage of REMatch is to compare two strings and return the match string both of them as array. Adobe recommend that when we&apos;re gonna use &lt;b&gt;REMatch&lt;/b&gt;, try it with regular expression and which will be powerful.

Before I didn&apos;t know &lt;b&gt;REMatch&lt;/b&gt; function, I&apos;ve created &lt;b&gt;ListGetDifferent&lt;/b&gt; function by myself for searching the same value and the different value between two lists.

&lt;a href=&quot;http://www.ppshein.net/index.cfm/2010/9/9/compare-list-in-coldfusion&quot; target=&quot;_blank&quot;&gt;http://www.ppshein.net/index.cfm/2010/9/9/compare-list-in-coldfusion&lt;/a&gt;

Once I know &lt;b&gt;REMatch&lt;/b&gt;, I feel I don&apos;t need to use my own UDF anymore when I need to compare two string but &lt;b&gt;NOT list&lt;/b&gt;.
				 [More]
				</description>
				
				
				<category>UDF</category>
				
				<category>Project</category>
				
				<category>CF Function</category>
				
				<category>Coldfusion</category>
				
				<category>CF Tag</category>
				
				<pubDate>Tue, 02 Nov 2010 18:50:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2010/11/2/REMatch-in-Coldfusion-save-my-time</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Internationalized in CFMX with Cffunction</title>
				<link>http://www.ppshein.net/index.cfm/2010/9/17/internationalized-in-cfmx-with-cffunction</link>
				<description>
				
				It&apos;s, creating internationalize in CFMX with cffunction.

common.cfm

&lt;code&gt;
&lt;cffunction name=&quot;udf_Translate&quot; output=&quot;Yes&quot; returntype=&quot;string&quot; hint=&quot;reads and parses UTF-8 resource bundle per locale&quot;&gt;
	&lt;cfargument name=&quot;Name&quot; required=&quot;Yes&quot; type=&quot;string&quot; /&gt;
	&lt;cfargument name=&quot;Filename&quot; required=&quot;Yes&quot; type=&quot;string&quot; /&gt;
	&lt;cfargument name=&quot;Section&quot; required=&quot;No&quot; type=&quot;string&quot; /&gt;
	&lt;cfset currentPath = getCurrentTemplatePath() /&gt;
	&lt;cfset currentDirectory = getDirectoryFromPath(currentPath) /&gt; 
	&lt;cfset local_file = currentDirectory &amp;amp; Filename /&gt;  
	&lt;cfset flag = 0 /&gt;    &lt;cfset i = 0 /&gt;   
	&lt;cfif FileExists(local_file)&gt;     
		&lt;cffile action=&quot;read&quot; file=&quot;#local_file#&quot; variable=&quot;resourceBundleFile&quot; charset=&quot;utf-8&quot;&gt;   
		&lt;cfset Transalated = ArrayNew(2) /&gt;   
			&lt;cfloop index=&quot;rbIndx&quot; list=&quot;#resourceBundleFile#&quot; delimiters=&quot;#chr(10)#&quot;&gt;      
				&lt;cfset i = i + 1 /&gt;
				&lt;cfset Orginal_word = listFirst(rbIndx,&quot;=&quot;) /&gt;      
				&lt;cfset Transalted_word = listRest(rbIndx,&quot;=&quot;) /&gt;
				&lt;cfset Transalated[i][1] = Orginal_word /&gt;   
				&lt;cfset Transalated[i][2] = Transalted_word /&gt;    
				&lt;cfif ASC(Transalted_word) NEQ 13&gt;
	                &lt;cfset Transalated[i][2] = Transalted_word /&gt;      
				&lt;cfelse&gt;       
					&lt;cfset Transalated[i][2] = Transalated[i][1] /&gt;       
				&lt;/cfif&gt;
				&lt;cfif Transalated[i][1] EQ Name&gt;          
					&lt;cfset flag = 1 /&gt;                
					&lt;cfreturn Transalated[i][2] /&gt;    
				&lt;/cfif&gt;        
			&lt;/cfloop&gt;    
	&lt;/cfif&gt;    
	&lt;cfif flag EQ 0&gt;   
		&lt;cfreturn Name /&gt; 
	&lt;/cfif&gt;
&lt;/cffunction&gt;
&lt;/code&gt;

index.cfm

&lt;code&gt;
&lt;cfoutput&gt;#udf_Translate(&quot;Sex&quot;, &quot;INPATIENT_EL.properties&quot;, &quot;&quot;)#&lt;/cfoutput&gt;
&lt;/code&gt;
				
				</description>
				
				
				<category>UDF</category>
				
				<category>CF Function</category>
				
				<category>Coldfusion</category>
				
				<category>CF Tag</category>
				
				<pubDate>Fri, 17 Sep 2010 19:08:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2010/9/17/internationalized-in-cfmx-with-cffunction</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Compare list in Coldfusion</title>
				<link>http://www.ppshein.net/index.cfm/2010/5/9/compare-list-in-coldfusion</link>
				<description>
				
				I&apos;m trying to compare 2 lists and output the different value and same value of these 2 lists. Normally, CF doesn&apos;t have complete function of compare 2 lists. That&apos;s why I gotta create my own UDF for comparing 2 lists.
How does it work :

&lt;ul&gt;
&lt;li&gt;ListGetDifferent(&lt;em&gt;List1&lt;/em&gt;, &lt;em&gt;List2&lt;/em&gt;, &quot;Same/Differ&quot;)&lt;/li&gt;
&lt;li&gt;If you defined &quot;Same&quot;, then will return &lt;strong&gt;Same value&lt;/strong&gt; of main list after comparing with second list.&lt;/li&gt;
&lt;li&gt;If you defined &quot;Different&quot;, then will return &lt;strong&gt;different value&lt;/strong&gt; of main list after comparing with second  list as well.&lt;/li&gt;
&lt;/ul&gt;

&lt;span style=&quot;text-decoration: underline;&quot;&gt;Function UDF&lt;/span&gt;

&lt;code&gt;
&lt;cffunction name=&quot;ListGetDifferent&quot; output=&quot;yes&quot;&gt;
	&lt;cfargument name=&quot;mainList&quot; required=&quot;Yes&quot; /&gt;
	&lt;cfargument name=&quot;compareList&quot; required=&quot;Yes&quot; /&gt;
	&lt;cfargument name=&quot;CompareType&quot; required=&quot;Yes&quot; default=&quot;Same&quot; /&gt;
	&lt;cfset ReturnList = &quot;&quot; /&gt;
	&lt;cfif CompareType EQ &quot;Same&quot;&gt;      
		&lt;cfloop list=&quot;#mainList#&quot; index=&quot;i&quot;&gt;     
			&lt;cfif ListFindNoCase(compareList,i)&gt;       
				&lt;cfset ReturnList = ListAppend(ReturnList,i) /&gt;       
			&lt;/cfif&gt;   
		&lt;/cfloop&gt;  
	&lt;cfelse&gt;    
		&lt;cfloop list=&quot;#mainList#&quot; index=&quot;i&quot;&gt;    
			&lt;cfif NOT ListFindNoCase(compareList,i)&gt;       
				&lt;cfset ReturnList = ListAppend(ReturnList,i) /&gt;    
			&lt;/cfif&gt;  
		&lt;/cfloop&gt;  
	&lt;/cfif&gt;  
	&lt;cfreturn ReturnList /&gt;
&lt;/cffunction&gt;
&lt;/code&gt; Get from Same Value &lt;code&gt;#ListGetDifferent(&quot;1,2,3,4,5&quot;, &quot;1,3,5&quot;, &quot;Same&quot;)# Return : 1,3,5&lt;/code&gt;

&lt;span style=&quot;text-decoration: underline;&quot;&gt;Get from Different Value&lt;/span&gt;
&lt;code&gt;
#ListGetDifferent(&quot;1,2,3,4,5&quot;, &quot;1,3,5&quot;, Differ&quot;)#
Return : 2,4
&lt;/code&gt;
				
				</description>
				
				
				<category>UDF</category>
				
				<category>Project</category>
				
				<category>CF Function</category>
				
				<category>Coldfusion</category>
				
				<category>CF Tag</category>
				
				<pubDate>Sun, 09 May 2010 17:28:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2010/5/9/compare-list-in-coldfusion</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Convert to Ordinal Format</title>
				<link>http://www.ppshein.net/index.cfm/2010/4/6/convert-to-ordinal-format</link>
				<description>
				
				&lt;p&gt;Today, I need to develop one simple CFML UDF, which convert numeric format to Ordinal format. It&apos;s just simple UDF but useful for future my projects.
&lt;/p&gt;
&lt;p&gt;
&lt;span style=&quot;text-decoration: underline;&quot;&gt;Coding&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;
&lt;cffunction name=&quot;convertOrdinal&quot; returntype=&quot;string&quot; output=&quot;false&quot;&gt;
	&lt;cfargument name=&quot;inputInt&quot; required=&quot;yes&quot; type=&quot;numeric&quot; /&gt;
	&lt;cfparam name=&quot;OrdFormat&quot; default=&quot;&quot;&gt;
	&lt;cfsilent&gt;
		&lt;cfif inputInt MOD 10 EQ 1 AND inputInt MOD 100 NEQ 11&gt;      
			&lt;cfset OrdFormat = &quot;st&quot; /&gt;     
		&lt;cfelseif inputInt MOD 10 EQ 2 AND inputInt MOD 100 NEQ 12&gt;        
			&lt;cfset OrdFormat = &quot;nd&quot; /&gt;     
		&lt;cfelseif inputInt MOD 10 EQ 3 AND inputInt MOD 100 NEQ 13&gt;       
			&lt;cfset OrdFormat = &quot;rd&quot; /&gt;     
		&lt;cfelse&gt;        
			&lt;cfset OrdFormat = &quot;th&quot; /&gt;    
		&lt;/cfif&gt;      
		&lt;cfreturn TRIM(inputInt &amp; OrdFormat) /&gt;   
	&lt;/cfsilent&gt; 
&lt;/cffunction&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
Usage
&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;cfoutput&gt;#convertOrdinal(1)#&lt;/cfoutput&gt;&lt;/code&gt;&lt;/p&gt;
				
				</description>
				
				
				<category>UDF</category>
				
				<category>CF Function</category>
				
				<category>Coldfusion</category>
				
				<category>CF Tag</category>
				
				<pubDate>Tue, 06 Apr 2010 07:31:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2010/4/6/convert-to-ordinal-format</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>UDF (User Defined Function)</title>
				<link>http://www.ppshein.net/index.cfm/2009/10/22/udf-user-defined-function</link>
				<description>
				
				&lt;p&gt;In these days, I feel like myself to create UDF, user defined function in cfml. Because, it&apos;s reusable and flexible to change when needed. When we want to develop Webservices (&lt;a href=&quot;http://en.wikipedia.org/wiki/SOAP&quot; target=&quot;_blank&quot;&gt;SOAP&lt;/a&gt;), UDF are the most powerful and compatible for every Web Development Language. That&apos;s why I decided I&apos;ll always create UDF whenever I develop any programs.&lt;/p&gt;
				
				</description>
				
				
				<category>UDF</category>
				
				<pubDate>Thu, 22 Oct 2009 06:32:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2009/10/22/udf-user-defined-function</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Webservices</title>
				<link>http://www.ppshein.net/index.cfm/2009/10/16/webservices</link>
				<description>
				
				Well, I&apos;m interesting to create webservices (WSDL) in CF in these days. Because, I wanna test how to integrate two different language by webservices. Developing webservices is very simple. Ok, let&apos;s go.

&lt;strong&gt;helloWorld.cfc&lt;/strong&gt;

&lt;code&gt;
&lt;cfcomponent&gt;
&lt;cffunction name=&quot;HelloWorldMsg&quot; access=&quot;remote&quot; returntype=&quot;string&quot; output=&quot;no&quot;&gt;
&lt;cfargument name=&quot;name&quot; type=&quot;string&quot; required=&quot;yes&quot;&gt;
&lt;cfreturn &quot;Hello World : &quot; &amp;amp; arguments.name&gt;
&lt;/cffunction&gt;
&lt;/cfcomponent&gt;
&lt;/code&gt;

&lt;strong&gt;caller.cfm&lt;/strong&gt;
&lt;code&gt;
&lt;cfinvoke webservice=&quot;http://helloWorld.cfc?wsdl&quot; method=&quot;HelloWorldMsg&quot; returnvariable=&quot;msg&quot;&gt;
&lt;cfinvokeargument name=&quot;name&quot; value=&quot;PPSHEIN&quot;/&gt;
&lt;/cfinvoke&gt;
&lt;cfoutput&gt;#msg#&lt;/cfoutput&gt;
&lt;/code&gt;
				
				</description>
				
				
				<category>UDF</category>
				
				<category>WebServices</category>
				
				<pubDate>Fri, 16 Oct 2009 06:32:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2009/10/16/webservices</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Javascript UDF</title>
				<link>http://www.ppshein.net/index.cfm/2009/10/12/javascript-udf</link>
				<description>
				
				Honestly, I&apos;m so far to develop javascript UDF because I feel like myself to develop Coldfusion UDF instead of Javascript. Yesterday, I need to develop javascript UDF for part of my project. It&apos;s for return checkbox value whether this checkbox is being checked or not. It&apos;s just simple UDF.

&lt;code&gt;
&lt;form name=&quot;frmUDF&quot;&gt;
	&lt;input type=&quot;checkbox&quot; name=&quot;chkMyCheck&quot;&gt;
	&lt;input type=&quot;button&quot; name=&quot;btnCheck&quot; onclick=&quot;beingCheck(document.frmUDF.chkMyCheck)&quot;&gt;
&lt;/form&gt;
&lt;/code&gt;

JS coding

&lt;code&gt;
     function beingCheck(obj) {
	 if (obj.checked == true)
	 	var returnCheck = 1         
	else             
		var returnCheck = 1         
		return returnCheck         
	} 
&lt;/code&gt;
				
				</description>
				
				
				<category>UDF</category>
				
				<category>Javascript</category>
				
				<pubDate>Mon, 12 Oct 2009 06:32:00 -0700</pubDate>
				<guid>http://www.ppshein.net/index.cfm/2009/10/12/javascript-udf</guid>
				
				
			</item>
			
		 	
			</channel></rss>