<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Andy's Blog: Application Express etc.</title>
	<atom:link href="http://atulley.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://atulley.wordpress.com</link>
	<description>SELECT * FROM RANDOM.stuff WHERE subject IN ('Application Express','Oracle','PL/SQL','SQL') AND is_worth_blogging_about IN ('YES','MAYBE','DOUBTFUL');</description>
	<lastBuildDate>Tue, 14 May 2013 12:53:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='atulley.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andy's Blog: Application Express etc.</title>
		<link>http://atulley.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://atulley.wordpress.com/osd.xml" title="Andy&#039;s Blog: Application Express etc." />
	<atom:link rel='hub' href='http://atulley.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Adobe Fireworks Colour Picker Problem on Mac OS X Mountain Lion</title>
		<link>http://atulley.wordpress.com/2013/05/14/adobe-fireworks-colour-picker-problem-on-mac-os-x-mountain-lion/</link>
		<comments>http://atulley.wordpress.com/2013/05/14/adobe-fireworks-colour-picker-problem-on-mac-os-x-mountain-lion/#comments</comments>
		<pubDate>Tue, 14 May 2013 12:53:24 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Adobe Fireworks]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=284</guid>
		<description><![CDATA[I&#8217;ve had a problem with Adobe Fireworks CS5 ever since upgrading to a Retina Display MacBook. The problem is that the eye-dropper colour picker tool just doesn&#8217;t work any more. At all. Very frustrating. I came across a very simple workaround today which can be found here: http://simianstudios.com/blog/post/colour-picker-bug-workaround-for-adobe-fireworks-cs4-in-os-x-lion  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=284&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve had a problem with Adobe Fireworks CS5 ever since upgrading to a Retina Display MacBook. The problem is that the eye-dropper colour picker tool just doesn&#8217;t work any more. At all. Very frustrating.</p>
<p>I came across a very simple workaround today which can be found here:</p>
<p><a title="http://simianstudios.com/blog/post/colour-picker-bug-workaround-for-adobe-fireworks-cs4-in-os-x-lion" href="http://simianstudios.com/blog/post/colour-picker-bug-workaround-for-adobe-fireworks-cs4-in-os-x-lion">http://simianstudios.com/blog/post/colour-picker-bug-workaround-for-adobe-fireworks-cs4-in-os-x-lion</a></p>
<p> </p>
<p><a href="http://atulley.files.wordpress.com/2013/05/fw.jpg"><img class="size-full wp-image" id="i-290" alt="Image" src="http://atulley.files.wordpress.com/2013/05/fw.jpg?w=215" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/284/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=284&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2013/05/14/adobe-fireworks-colour-picker-problem-on-mac-os-x-mountain-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2013/05/fw.jpg?w=215" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Controlling Hide/Show Apex Regions Using Javascript</title>
		<link>http://atulley.wordpress.com/2013/04/19/controlling-hideshow-apex-regions-using-javascript/</link>
		<comments>http://atulley.wordpress.com/2013/04/19/controlling-hideshow-apex-regions-using-javascript/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 14:49:19 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[ApEx]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=254</guid>
		<description><![CDATA[Hide/Show regions are very useful in that they allow users to hide certain on-screen content when it&#8217;s not relevant for them (and show it again just as easily) simply by clicking the small arrow icon in the top left of the region.   But how can you programmatically do the equivalent of clicking the arrow [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=254&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hide/Show regions are very useful in that they allow users to hide certain on-screen content when it&#8217;s not relevant for them (and show it again just as easily) simply by clicking the small arrow icon in the top left of the region.</p>
<p><a href="http://atulley.files.wordpress.com/2013/04/hide_show_regions1.jpg"><img class="size-full wp-image" id="i-260" alt="Image" src="http://atulley.files.wordpress.com/2013/04/hide_show_regions1.jpg?w=379" /></a></p>
<p> </p>
<p>But how can you programmatically do the equivalent of clicking the arrow icons? Perhaps, for example, when a user clicks a particular button on your page, you want all Show/Hide regions to be expanded. How can you do this?</p>
<p>One answer is the snippet of code below. In this code, &#8220;MY_REGION&#8221; is the static ID of the region for which we wish to programatically click the show/hide arrow icon.</p>
<p><pre class="brush: jscript; title: ; notranslate">
// How to programatically click a Hide/Show region hide/show button
$('#MY_REGION .uRegionControl').click();
</pre>
</p>
<p></p>
<p>We can use the snippet below to work out the current status of a Hide/Show region i.e. whether it is currently expanded or collapsed. The below snippet will return a value or &#8220;none&#8221; if the region is collapsed.</p>
<pre class="brush: jscript; title: ; notranslate">
// How to find out whether a hide/show region is currently shown or not
$('#MY_REGION div.uRegionHeading').next().css('display');
</pre>
<p>We can build on the above to create a function which expands, collapses or toggles the state of a Hide/Show Region.</p>
<pre class="brush: jscript; title: ; notranslate">

// ********************************************************
// ** Function setStateOfHideShowRegion(pRegionStaticId,pDoWhat)(type,id)  
// ** Collapses, Expands of toggles any Hide Show region which has a static id
// ** defined by the string pRegionStaticId.
// ** Returns either &quot;collapsed&quot; or &quot;expanded&quot; to indicate the status of the
// ** region once this function has run.
// ** pDoWhat: either &quot;expand&quot;, &quot;collapse&quot; or &quot;toggle&quot;
// ********************************************************
function setStateOfHideShowRegion(pRegionStaticId,pDoWhat) {
    
    var returnState;
    var currentState = 'expanded';
    doWhat = pDoWhat.toLowerCase();
    
    if ($('#'+pRegionStaticId+' div.uRegionHeading').next().css('display') == 'none') {
        
        currentState = 'collapsed';
        
    };
    
    if (doWhat == 'toggle') {
        
        $('#'+pRegionStaticId+' .uRegionControl').click();
        returnState = (currentState=='expanded'?'collapsed':'expanded');
        
    }
    else if (doWhat == 'expand') {
        
        if (currentState !== 'expanded') {
            $('#'+pRegionStaticId+' .uRegionControl').click();
        };
        returnState = 'expanded';
        
    }
    else if (doWhat == 'collapse') {
        
        if (currentState !== 'collapsed') {
            $('#'+pRegionStaticId+' .uRegionControl').click();
        };
        returnState = 'collapsed';
        
    };
    
    return returnState;
    
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=254&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2013/04/19/controlling-hideshow-apex-regions-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2013/04/hide_show_regions1.jpg?w=379" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Advanced Javascript Tutorial</title>
		<link>http://atulley.wordpress.com/2013/04/18/advanced-javascript-tutorial/</link>
		<comments>http://atulley.wordpress.com/2013/04/18/advanced-javascript-tutorial/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 19:26:41 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=239</guid>
		<description><![CDATA[Today I came across a great interactive tutorial which covers a series of advanced Javascript topics. It&#8217;s very well put together and lets you try out your own variations of the code being shown which can be very handy in making sure your understanding is correct. It&#8217;s from John Resig, the creator of jQuery. The [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=239&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I came across a great interactive tutorial which covers a series of advanced Javascript topics. It&#8217;s very well put together and lets you try out your own variations of the code being shown which can be very handy in making sure your understanding is correct.</p>
<p>It&#8217;s from John Resig, the creator of jQuery. The tutorial is not jQuery-centric though. In fact, it doesn&#8217;t talk about or use jQuery at all. It&#8217;s just pure Javascript.</p>
<p>You can find it here: <a href="http://ejohn.org/apps/learn/">http://ejohn.org/apps/learn/</a></p>
<p><a href="http://atulley.files.wordpress.com/2013/04/ninja.gif"><img class="aligncenter" id="i-251" alt="Image" src="http://atulley.files.wordpress.com/2013/04/ninja.gif?w=210" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=239&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2013/04/18/advanced-javascript-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2013/04/ninja.gif?w=210" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Restoring a dropped table</title>
		<link>http://atulley.wordpress.com/2013/04/09/restoring-a-dropped-table/</link>
		<comments>http://atulley.wordpress.com/2013/04/09/restoring-a-dropped-table/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 19:11:30 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[oracle sql]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=204</guid>
		<description><![CDATA[Catastrophe! You&#8217;ve just accidentally dropped a table which contained really rather important data. What to do? One thing you can do to recover the situation quickly (if you&#8217;re running 10g or later, that is) is to run the following command: If the table is still in the Recycle Bin, it&#8217;ll be recovered straight away. You [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=204&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://atulley.files.wordpress.com/2013/04/catastrophe_625x352.jpg"><img class="size-full wp-image" id="i-230" alt="Image" src="http://atulley.files.wordpress.com/2013/04/catastrophe_625x352.jpg?w=615" /></a>Catastrophe! You&#8217;ve just accidentally dropped a table which contained really rather important data. What to do?</p>
<p>One thing you can do to recover the situation quickly (if you&#8217;re running 10g or later, that is) is to run the following command:</p>
<p>
<pre class="brush: sql; title: ; notranslate">FLASHBACK TABLE MY_SCHEMA.MY_SUPER_IMPORTANT_TABLE TO BEFORE DROP;</pre>
</p>
<p>If the table is still in the Recycle Bin, it&#8217;ll be recovered straight away. You can check whether the table is still available in the recycle bin and whether it can be recovered this way, with the following SELECT statement:</p>
<p>
<pre class="brush: sql; title: ; notranslate">SQL&gt; select original_name, can_undrop from recyclebin;

ORIGINAL_NAME CAN
-------------------------------- ---
MY_SUPER_IMPORTANT_TABLE YES
</pre>
</p>
<p>You can read about the Recyle Bin and Flashback Drop here: <a title="http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables011.htm#ADMIN01511" href="http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables011.htm#ADMIN01511" target="_blank">http://docs.oracle.com/cd/B19306_01/backup.102/b14192/flashptr004.htm</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=204&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2013/04/09/restoring-a-dropped-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2013/04/catastrophe_625x352.jpg?w=615" medium="image">
			<media:title type="html">Image</media:title>
		</media:content>
	</item>
		<item>
		<title>An Interesting Feature of NOT IN and Multi-Row Subqueries</title>
		<link>http://atulley.wordpress.com/2013/03/01/an-interesting-feature-of-not-in-and-multi-row-subqueries/</link>
		<comments>http://atulley.wordpress.com/2013/03/01/an-interesting-feature-of-not-in-and-multi-row-subqueries/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 13:55:17 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=186</guid>
		<description><![CDATA[Take the following simple SQL statement: Since &#8216;x&#8217; cannot be found in our subquery, you&#8217;d expect this to return a row from Dual right? Indeed it does: What about in the following case? You might expect this to return a row as well since &#8216;x&#8217; is still not in our subquery (which now returns two [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=186&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Take the following simple SQL statement:</p>
<pre class="brush: sql; title: ; notranslate">
SELECT *
FROM dual
WHERE 'x' NOT IN
(SELECT 'a' FROM dual);</pre>
<p>Since &#8216;x&#8217; cannot be found in our subquery, you&#8217;d expect this to return a row from Dual right? Indeed it does:</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; SELECT *
  2  FROM dual
  3  WHERE 'x' NOT IN
  4  (SELECT 'a' FROM dual);

D
-
X
</pre>
<p>What about in the following case?</p>
<pre class="brush: sql; title: ; notranslate">
SELECT *
FROM dual
WHERE 'x' NOT IN
(SELECT 'a' FROM dual
 UNION ALL
 SELECT NULL FROM dual);
</pre>
<p>You might expect this to return a row as well since &#8216;x&#8217; is still not in our subquery (which now returns two values: &#8216;x&#8217; and NULL).</p>
<p>You&#8217;d be wrong, however. This query will in fact return no rows:</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt; SELECT *
  2  FROM dual
  3  WHERE 'x' NOT IN
  4  (SELECT 'a' FROM dual
  5   UNION ALL
  6   SELECT NULL FROM dual);

no rows selected
</pre>
<p>If the subquery referenced by your NOT IN statement contains any NULL values, the NOT IN condition will evaluate to unknown.</p>
<p>It&#8217;s worth noting that this is not the case if you use an IN as opposed to a NOT IN:</p>
<pre class="brush: sql; title: ; notranslate">
SQL&gt;  SELECT *
  2   FROM dual
  3   WHERE 'a' IN
  4   (SELECT 'a' FROM dual
  5    UNION ALL
  6    SELECT NULL FROM dual);

D
-
X
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=186&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2013/03/01/an-interesting-feature-of-not-in-and-multi-row-subqueries/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Preventing calls to console.log throwing errors in IE</title>
		<link>http://atulley.wordpress.com/2012/10/11/preventing-calls-to-console-log-throwing-errors-in-ie/</link>
		<comments>http://atulley.wordpress.com/2012/10/11/preventing-calls-to-console-log-throwing-errors-in-ie/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 14:59:08 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=183</guid>
		<description><![CDATA[When developing applications which make a lot of use of Javascript, it can be very useful to use the console.log() function to output debug to Firefox&#8217;s Firebug console or to Chrome&#8217;s Javascript console. However, such calls will cause errors when run inside IE as it does not by default have a console object (depending on [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=183&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>When developing applications which make a lot of use of Javascript, it can be very useful to use the console.log() function to output debug to Firefox&#8217;s Firebug console or to Chrome&#8217;s Javascript console.</p>
<p>However, such calls will cause errors when run inside IE as it does not by default have a console object (depending on the version of IE you are running and what add-ons you have installed). These errors may prevent other aspects of your Javascript from running, essentially breaking you application.</p>
<p>One quick solution to this is to add the following piece of jQuery to your code which will prevent console.log() from doing anything at all in IE and hence preventing the errors from occurring:</p>
<p>&nbsp;</p>
<p>$(document).ready(function(){</p>
<p>if ($.browser.msie) {console = { log: function() {} }};</p>
<p>})</p>
<p>&nbsp;</p>
<p>Alternatively, you can incorporate the following piece of code which will, in IE, cause all messages sent to the console via console.log() to be alerted using alert() instead:</p>
<p>$(document).ready(function(){</p>
<p>if ($.browser.msie) {console = { log: function(msg) {alert(&#8216;Debug: &#8216;+msg);} }};</p>
<p>})</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=183&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2012/10/11/preventing-calls-to-console-log-throwing-errors-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>New Release of jQuery UI</title>
		<link>http://atulley.wordpress.com/2012/10/09/new-release-of-jquery-ui/</link>
		<comments>http://atulley.wordpress.com/2012/10/09/new-release-of-jquery-ui/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 19:19:36 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=180</guid>
		<description><![CDATA[I&#8217;ve just noticed that there&#8217;s a new version of jQuery UI: 1.9. It includes nifty new widgets including Menu, Spinner and Tooltip. And who doesn&#8217;t love new widgets? You can read about it and see demoes of the new functionality here: http://blog.jqueryui.com/2012/10/jquery-ui-1-9-0/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=180&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just noticed that there&#8217;s a new version of jQuery UI: 1.9. It includes nifty new widgets including Menu, Spinner and Tooltip. And who doesn&#8217;t love new widgets?</p>
<p>You can read about it and see demoes of the new functionality here: <a title="http://blog.jqueryui.com/2012/10/jquery-ui-1-9-0/" href="http://blog.jqueryui.com/2012/10/jquery-ui-1-9-0/">http://blog.jqueryui.com/2012/10/jquery-ui-1-9-0/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=180&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2012/10/09/new-release-of-jquery-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Clicking a Region Selector Button Programmatically</title>
		<link>http://atulley.wordpress.com/2012/10/09/clicking-a-region-selector-button-programmatically/</link>
		<comments>http://atulley.wordpress.com/2012/10/09/clicking-a-region-selector-button-programmatically/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 09:46:01 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[ApEx]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=173</guid>
		<description><![CDATA[As far as I&#8217;m aware, there&#8217;s no out-of-the-box call made available by Apex to allow you to click a particular button in a Region Selector programmatically via Javascript. The following bit of jQuery will allow you to do this. Just change the string &#8220;Personal Bio&#8221; to be whatever the string is that appears in the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=173&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As far as I&#8217;m aware, there&#8217;s no out-of-the-box call made available by Apex to allow you to click a particular button in a Region Selector programmatically via Javascript.</p>
<p>The following bit of jQuery will allow you to do this. Just change the string &#8220;Personal Bio&#8221; to be whatever the string is that appears in the Region Selector button you want to programatically &#8220;click&#8221;:</p>
<p>$(&#8216;span:contains(&#8220;Personal Bio&#8221;)&#8217;).parent().click();</p>
<p>Be aware that the string (&#8220;Personal Bio&#8221; in the above example) is case sensitive.</p>
<p>With a bit more work this technique could be employed so that your pages &#8220;remember&#8221; which Region was last selected in the Region Selector whenever you go back to a page.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=173&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2012/10/09/clicking-a-region-selector-button-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Dual to reduce function calls (and getting your 5-a-day)</title>
		<link>http://atulley.wordpress.com/2011/02/07/using-dual-to-reduce-function-calls-and-getting-your-5-a-day/</link>
		<comments>http://atulley.wordpress.com/2011/02/07/using-dual-to-reduce-function-calls-and-getting-your-5-a-day/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 17:33:06 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=152</guid>
		<description><![CDATA[Reducing function calls with Scalar Subquery Caching.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=152&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://atulley.files.wordpress.com/2011/02/banana_guard.jpg"><img class="alignleft size-medium wp-image-154" title="Banana Guard" src="http://atulley.files.wordpress.com/2011/02/banana_guard.jpg?w=108&#038;h=76" alt="" width="108" height="76" /></a><span style="text-decoration:underline;"> </span></p>
<h3>An introduction to an interesting feature of<br />
Oracle SQL through the medium of fruit&#8230;</h3>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="text-decoration:underline;">Make a FRUITS table.</span></p>
<p><code>CREATE TABLE fruits (fruit_name varchar2(30));</code></p>
<p><span style="text-decoration:underline;">Put in 5 bananas, 7 apples and 3 blueberries.</span><br />
<code>INSERT INTO fruits VALUES ('banana');<br />
INSERT INTO fruits VALUES ('banana');<br />
INSERT INTO fruits VALUES ('banana');<br />
INSERT INTO fruits VALUES ('banana');<br />
INSERT INTO fruits VALUES ('banana');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('apple');<br />
INSERT INTO fruits VALUES ('blueberry');<br />
INSERT INTO fruits VALUES ('blueberry');<br />
INSERT INTO fruits VALUES ('blueberry');</code></p>
<p><span style="text-decoration:underline;">Create a sequence for keeping track of the number of times our function below is called.</span><br />
<code>CREATE SEQUENCE seq START WITH 1;</code></p>
<p><span style="text-decoration:underline;">Make our function which returns a fruit&#8217;s colour</span> (and increments our sequence each time it runs).<br />
<code>CREATE OR REPLACE FUNCTION get_colour (p_fruit_name IN varchar2)</code><br />
<code>RETURN varchar2<br />
IS<br />
l_num number;<br />
BEGIN<br />
SELECT seq.nextval INTO l_num FROM dual;</code></p>
<p><code> CASE p_fruit_name<br />
WHEN 'banana' THEN RETURN 'yellow';<br />
WHEN 'apple' THEN RETURN 'green';<br />
WHEN 'blueberry' THEN RETURN 'blue';<br />
END CASE;<br />
END get_colour;<br />
/</code></p>
<p><span style="text-decoration:underline;">Get the colour of each fruit in our table.</span><br />
<code>SELECT get_colour(fruit_name) FROM fruits;</code></p>
<p><em><strong>QUESTION ONE: What will the following return?</strong></em><br />
<code>SELECT seq.nextval FROM dual;</code></p>
<p>Well, there are 15 rows in our table so we&#8217;d expect the function to have run 15 times. And indeed it has: seq.nextval will show a value of 16.</p>
<p><span style="text-decoration:underline;">Now, let&#8217;s reset the sequence for the next experiment.</span><br />
<code>DROP SEQUENCE seq;<br />
CREATE SEQUENCE seq START WITH 1;</code></p>
<p><span style="text-decoration:underline;">And again get the colour of all of our fruits using our function but this time wrapping it inside a SELECT FROM dual.</span><br />
<code>SELECT (SELECT get_colour(fruit_name) FROM dual)<br />
FROM fruits;</code></p>
<p><strong><em>QUESTION TWO: What will the following return now?</em></strong><br />
<code>SELECT seq.nextval FROM dual;</code></p>
<p>Well, we might be tempted to think that the function would have run 15 times as before and hence our sequence&#8217;s nextval would now be 16, as before. However, this is not the case. You&#8217;ll find the value returned is in fact <strong>4</strong>, meaning that the function ran <strong>3</strong> times.</p>
<p><em><strong>What happened there?</strong></em><br />
How can the function have run only 3 times if we gave it 15 bits of data to process (i.e. 15 fruits, one for each row from our table) and it returned the correct answer in each case?</p>
<p>The answer is <strong>Scalar Subquery Caching</strong> whereby the result of a &#8220;<em>SELECT some_function(x) FROM dual&#8221;</em> will be remembered for <em>x</em> as soon as it is run once. Hence, the function need only be run for each of the <em>different</em> fruits in the table and since we have only 3 different fruits (blueberry, apple and banana), the function is only run 3 times.</p>
<p>Tom Kyte talks about it <a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2683853500346598211">here</a>.</p>
<p>Nifty, eh?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=152&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2011/02/07/using-dual-to-reduce-function-calls-and-getting-your-5-a-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2011/02/banana_guard.jpg?w=300" medium="image">
			<media:title type="html">Banana Guard</media:title>
		</media:content>
	</item>
		<item>
		<title>ChangeCase: A Simple Apex 4.0 Plugin</title>
		<link>http://atulley.wordpress.com/2010/07/16/changecase-a-simple-apex-4-0-plugin/</link>
		<comments>http://atulley.wordpress.com/2010/07/16/changecase-a-simple-apex-4-0-plugin/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 15:24:39 +0000</pubDate>
		<dc:creator>Andrew Tulley</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atulley.wordpress.com/?p=137</guid>
		<description><![CDATA[Creating a simple Apex 4 Item Plugin to allow the contents of a Text Field to be automatically uppercased or lowercased.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=137&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>A foray into Plug-Ins</strong></p>
<p><a href="http://atulley.files.wordpress.com/2010/07/13-amp-plug.jpg"><img class="alignleft size-full wp-image-142" title="13-amp-plug" src="http://atulley.files.wordpress.com/2010/07/13-amp-plug.jpg?w=595" alt=""   /></a>To educate myself in the ways of the new Apex 4.0 Plug-Ins feature, I decided to create a simple item Plug-In which automatically converts all the text entered into the item either to uppercase or to lowercase, depending on which option the developer chooses. I&#8217;m making it available here not so much because I think it will be a useful Plug-In (though perhaps it might be if your requirement is very simple) but rather in the hope that it might be helpful to anyone else looking at Plug-Ins for the first time. I have heavily commented the code to explain what each bit is doing.</p>
<p><strong>See it in action</strong></p>
<p>A working example of this plugin can be seen <a title="Example of ChangeCase Plugin" href="http://apex.oracle.com/pls/apex/f?p=45649">here</a>.</p>
<p><strong>Download and install</strong></p>
<p>The plugin itself can be downloaded <a href="http://andrew.tulley.co.uk/blogfiles/item_type_plugin_uk_co_tulley_changecase.sql">here</a>.</p>
<p>Once you have downloaded the Plug-In, you can install it by going to Shared Components &gt; Plug-Ins &gt; Import and following the prompt. You will then be able to create ChangeCase items in your application, choosing whether you want the contents to be automatically uppercased or lowercased.</p>
<p><strong>Creating it from scratch</strong></p>
<p>If, for the hell of it, you want to create this Plug-In from scratch as opposed to just downloading and installing it you can do so by following these steps.</p>
<ol>
<li>Within Application Builder go to Shared Components &gt; Plug-ins and click &#8220;Create &gt;&#8221;.</li>
<li>Specify the following details and then click &#8220;Create&#8221;:<br />
<span style="text-decoration:underline;"><br />
Name</span>: ChangeCase<br />
<span style="text-decoration:underline;">Internal Name</span>: uk.co.tulley.changecase (or change this to be a universally unique name based on your domain name)<br />
<span style="text-decoration:underline;">Type</span>: Item<br />
<span style="text-decoration:underline;">PL/SQL Code</span>: Paste in the contents of <a href="http://andrew.tulley.co.uk/blogfiles/ChangeCase_Plugin_PLSQL_Code.txt">this file</a>. This contains two PLSQL functions (render_changecase and validate_changecase which we reference in the Render Function Name and Validation Function Name properties of this Plug-In). This PL/SQL code is heavily commented so should hopefully be fairly self-explanatory.<br />
<span style="text-decoration:underline;">Render Function Name</span>: render_changecase<br />
<span style="text-decoration:underline;">Validation Function Name</span>: validate_changecase<br />
<span style="text-decoration:underline;">Standard Attributes</span>: Tick the checkbox labelled &#8220;Is Visible Widget&#8221;. If you do not tick this checkbox then there will be no option to specify a Label for our ChangeCase Item Plugin when we create an instance of it in our application. Since this is essentially just a slightly-modified Text Field, we certainly want the ability to specify a label.</li>
<li>Click &#8220;Custom Attributes&#8221;. When we create a new instance of our new Plug-In, we want to be able to decide whether we want the contents to be automatically uppercased or lowercased so we create a custom attribute here to allow that decision to be made.</li>
<li>Click &#8220;Add Attribute&#8221;.</li>
<li>Specify the following details and then click &#8220;Create&#8221;.<br />
<span style="text-decoration:underline;"><br />
Scope</span>: Component<br />
<span style="text-decoration:underline;"> Attribute</span>: 1<br />
<span style="text-decoration:underline;"> Label</span>: Case Alteration Option<br />
<span style="text-decoration:underline;"> Type</span>: Select List<br />
<span style="text-decoration:underline;"> Required</span>: Yes<br />
<span style="text-decoration:underline;"> Default Value</span>: UPPER<br />
<span style="text-decoration:underline;"> Add Value button in List of Values Section</span>: Create two entries. One with a Display Value of &#8220;Uppercase&#8221; &amp; a Return Value of &#8220;UPPER&#8221;; and the other with a Display Value of &#8220;Lowercase&#8221; and a Return Value of &#8220;LOWER&#8221;.</li>
<li>We want the value entered into any instance of our new Plug-In Item to be either automatically uppercased or lowercased. We want this to happen client-side so for this we need some Javascript. That very simple Javascript can be found in <a href="http://andrew.tulley.co.uk/blogfiles/changecase.js">this file</a>. Download this file to your computer.</li>
<li>Back in Application Builder, click &#8220;Files&#8221; and then the &#8220;Upload New File&#8221; button.</li>
<li>Browse for the changecase.js file that you just downloaded and then click &#8220;Upload&#8221;.</li>
<li>Finally, click &#8220;Apply Changes&#8221;.</li>
</ol>
<p>You will now be able to create ChangeCase items in your pages where you&#8217;ll be able to specify, under settings, whether you want the content automatically uppercased or lowercased.</p>
<p><a href="http://atulley.files.wordpress.com/2010/07/changecaseplugin_screenshot1.jpg"><img class="alignleft size-medium wp-image-140" title="Ability to create ChangeCase items" src="http://atulley.files.wordpress.com/2010/07/changecaseplugin_screenshot1.jpg?w=300&#038;h=84" alt="" width="300" height="84" /></a></p>
<p><a href="http://atulley.files.wordpress.com/2010/07/changecaseplugin_screenshot2.jpg"><img class="alignleft size-full wp-image-141" title="Ability to choose whether you want text to be automatically uppercased or lowercased" src="http://atulley.files.wordpress.com/2010/07/changecaseplugin_screenshot2.jpg?w=595" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atulley.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atulley.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atulley.wordpress.com&#038;blog=907573&#038;post=137&#038;subd=atulley&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://atulley.wordpress.com/2010/07/16/changecase-a-simple-apex-4-0-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a6739a93530503423b488917f43cf9ae?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Andy</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2010/07/13-amp-plug.jpg" medium="image">
			<media:title type="html">13-amp-plug</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2010/07/changecaseplugin_screenshot1.jpg?w=300" medium="image">
			<media:title type="html">Ability to create ChangeCase items</media:title>
		</media:content>

		<media:content url="http://atulley.files.wordpress.com/2010/07/changecaseplugin_screenshot2.jpg" medium="image">
			<media:title type="html">Ability to choose whether you want text to be automatically uppercased or lowercased</media:title>
		</media:content>
	</item>
	</channel>
</rss>
