Thursday, January 11, 2018

Oracle Case statements when testing for NULL

Just a little tidbit when working with ORACLE and case statements.

The first method, where the given column name is passed to successive WHEN statements, WHEN must have a value to work with, so you have to convert the null value into something and test for it.

Method 1: Covert the incoming value first

CASE nvl(some_column,'NULL')
         WHEN 'NULL' THEN some_other_column
         WHEN 'ABC' THEN another_column
         END some_column

Method 2: do the condition checks in the WHEN
    WHEN nval(some_column,'NULL') = 'NULL' THEN some_other_column
     WHEN some_column = 'ABC' THEN another_column
     ELSE some_column
     END  some_column

Friday, August 25, 2017

Crystal Reports 2016 User Function Library for i18n Translation.

While endeavoring to expand my knowledge of Crystal Reports Designer, I just finished uploading my experiment in creating a Crystal Reports User Function Library in C#.  I've placed the project in my GitHub account

Monday, April 11, 2016

FakeSMTP: A Mail Server Emulator

FakeSMTP is a java (jar) application that you launch on your development environment that can act as an SMTP server (receive mode) for testing email functionality in your applications.  You can open up the emails in FakeSMTP, which will launch your email client for viewing.

Example of a ColdFusion web service for AngularJS using $http and JSONP

A small example of a ColdFusion JSONP Web service using $http, that expands on Ben Nadel's excellent article on Using JSONP With $resource In AngularJS.

Form Submit Code for the AngularJS Controller

$scope.onSubmit = function(){
          method: 'JSONP',
          url: 'http://your_site/your_cf_jsonp_service.cfm',
          params: {
            callback: "JSON_CALLBACK",
            data: $scope.formModel
        function successCallBack(response){console.log("returned");console.log(response);},
        function errorCallBack(response){console.log("error"); console.log(response);}

Sample ColdFusion AngularJS JSONP Service

<cfsetting showDebugOutput="No">
<!--- Configure the Access Control header for your environment --->
<cfheader name="Access-Control-Allow-Origin" value="*">

<cfparam name="url.callback" type="string" default="angular.callbacks_0">
<!--- Do processing logic, create objects, etc.
then serialize it
Just going to send back a time stamp for this example --->
<cfset result = Now()>
<cfset response= "#url.callback#(#serializeJson(result)#)">
<cfcontent type="text/javascript; charset=utf-8" variable="#charsetDecode(response,'utf-8')#" />

Sunday, April 10, 2016

Editor Conundrum

VI, Pico, NotePad++, HomeSite, ColdFusion Studio, DreamWeaver, Eclipse, CFBuilder, Atom, Brackets, Sublime 2/3, and on and on...

I've used them all.  Some are specific to the OS and never go away (VI,Pico), some become so aged that you must toss, and others you just keep around.    There's never a perfect blend, those with that one feature that you'll need to go back to.   Sometimes you're in code mode, where it's all about the language your working in, code completion, snippets, color syntax, and then there's the visual side, where you need to make a change and see the result.

The progression of HomeSite -> ColdFusion Studio, switching to Dreamweaver, then to Eclipse with the cfeclipse plugin.  The shift to eclipse was primarily because I had switched from the type of employment (working for a software manufacturer) where the the perks of free software dried up.  Forking out over a hundred bucks for an editor often leads to a do-with-out approach on some features.  Yes, I'm cheap that way.

With Eclipse, I have the various configurations for Java, PHP, and ColdFusion.  But as with anything Eclipse is a bit persnickety and often hangs with that awful opaque white overlay as it's trying to do something and you HOPE it comes back.  You end up having to turn off many features that you find useful when the files you're editing have more lines they they probably should have.

Recently I did fork out $70 for Sublime, which was under my $100 think about it threshold.  It's fast, extensible, styles well.   A very good editor.  I added a plugin to launch a browser, all well and good.

But I wanted more....

I wanted side by side live preview for a particular bit of code I was working with.  I performed a small search for live preview, but it's all about opening up a new browser window which it happily does on my other screen that I'm multi-tasking on, right on top of everything.

Well, I've also happen to have Atom installed, which is chromium based. I search for live preview and Ding Goes the Bell!

So for the current task of the day, I'm switching to Atom.  Once I go back into pure code mode, Sublime takes over again.

Saturday, April 9, 2016

Google Domains So Far

Google Domains and/or Blogger still has a bit of work to do on their redirect.  The interface to redirect is fine, it's just that using the desktop times out regardless of network used, but with my iPhone, no problems occur with both m=0 and m=1 for the mobile setting (using WiFi).    Initially this setting worked when I first set it up, then it died.  

The problem is it isn't anything I've done.  It's just going to Google Domains, and connecting the Blogger account, and Google Domains/Blogger do the rest.

I've disconnected the the redirect and the old works fine, in fact it worked fine yesterday.  Today I'm having problems again.  so I followed the same disconnect/reconnect, and desktop chrome (and other browsers) are timing out.     

Since the iPhone can connect perfectly, mobile or desktop version, but the m=1 automatically shows up on the iPhone.  It almost seems there's something in the client detection that fails.

So this time I've disconnected it again, deleted the synth record.  and tried a standard redirect of to  This keeps the blog working only the redirect will not function.  when a custom domain is setup on Blogger, it disables in the standard {domain} url.