Please support me :)

The personal homepage of Terry J. Butler

AngularJS - Argument '' is not aNaNunction, got undefined

Posted in on Wednesday, October 21, 2015 at 12:47 PM by Terry

If you're using a similar notation, make sure that you're closing the wrapped function as follows:

(function () {
    'use strict';

        .controller('MainController', MainController);

    MainController.$inject = ['$scope', '$http', 'SearchService', 'FilterTabsService'];

    function MainController($scope, $http, SearchService, FilterTabsService)
		// ... 

})(); // <--

If you're missing this, the Controller or Service won't be found. 


I'm still alive!

Posted in on Tuesday, October 13, 2015 at 11:31 PM by Terry

I've taken a huge leave of absense from my blog, but I am still around.

Recently I moved my blog from Wordpress over to my own homebrew blog so I'm hoping to start blogging more.

Corsair Force Series 3 60GB SSD Locking / Freezing Problems

Posted in Uncategorized on Wednesday, August 17, 2011 at 8:53 AM by Terry
With the recent problems with part of the Force 3 120GB line of Solid State drives, it seems that the 60GB models are problematic too suffering in much the same way, despite Corsair claiming that the other models aren't affected. After reading Corsair's responses on their forums and the lack of real solutions to the problem, with the exception of some rather poor firmware with no changelog that is problematic to update, I've gone straight back to eBuyer in the hope of a refund. Anybody else got anything to weigh in regarding this situation?

Worth-See Ray Tracing Videos

Posted in Uncategorized on Tuesday, August 09, 2011 at 7:27 PM by Terry

Batch PNGOut File Compressor

Posted in Uncategorized on Thursday, July 07, 2011 at 4:42 PM by Terry

This is a batch file I wrote to handle the compression directories full of PNG files using Ken Silverman’s amazing PNGOUT tool.

Bear in mind that this isn’t exactly a replacement for PNGOUTWin which supports asynchronous file compression taking advantage of multiple cores, this is merely a batch file that recursively navigates through a given directory and throws all PNGs one at a time at PNGOUT.

Output example:

Output for D:\Images\ for 88 files
1252 kb before
922 kb after
saving a total of 330 kb (26%)
Press any key to continue . . .


  1. Download Ken Silverman’s command line PNGOUT tool (as provided in the link)
  2. Set the path for the pngo variable in the batch file
  3. Run the batch file simply like so
    • pngout-batch “D:\Images\”
  4. Optional: Create a shortcut to the batch file and place it in your SendTo folder for your user account for the sake of convenience
    • Windows XP
      • C:\Documents and Settings\<username>\SendTo
    • Windows Vista / 7
      • C:\Users\<username>\AppData\Roaming\Microsoft\Windows\SendTo

Here is a preview of the batch file or you can download the batch file itself at the bottom of the post.

:: PNGOut Compressor Batch File v1.0
:: Author: Terry J. Butler
:: Website:
:: Post URI:
:::READ ME::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Distribute this batch file as you'd like but I ask that you please leave this 
:: commented header section intact.
:: If you want to modify this batch file, I ask that you give credit where credit 
:: is due.
:: Thanks to Ken Silverman for the fantastic PNGOut. Nothing compares to it.
:: You'll need to download it from, place it  
:: somewhere convenient and change the path to it for the 'pngo' variable under the
:: Thanks to the NT reference at ( for an incredible 
:: wealth of information that helped shape this batch file
:: Head to the link in the Post URI above for further details on how to use.
:::CHANGE LOG:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: v1.0
:: - Initial Release
:: Set this path to the locaation of your pngout.exe file
SET pngo="D:\tools\pngout.exe" 

@echo off

:: Setting EnabledDelayedExpansion will cause each variable to be expanded at execution 
:: time rather than at parse time. EnableDelayedExpansion is Disabled by default.
setLocal EnableDelayedExpansion

:: set some arithmetic capable variables
set /a value=0
set /a sum=0
set /a sumOriginal=0
set /a count=0
set /a diff=0
set /a diffPercent=0

pushd %1

	FOR /R %%G IN (*.png) DO (
		echo Now Compressing %%G 
		set /a value=%%~zG
		set /a sum=!sum!+!value!	
		set /a count+=1
		%pngo% "%%G"

	set /a sumOriginal=sum/1024

	set /a value=0
	set /a sum=0

	FOR /R %%G IN (*.png) DO (
		set /a value=%%~zG
		set /a sum=!sum!+!value!	
	set /a sum=sum/1024	
	set /a diff=!sumOriginal!-!sum!	
	set /a diffPercent=(100*(!sumOriginal!-!sum!))/!sumOriginal!;	

	@echo Output for %CD% for %count% files
	@echo !sumOriginal! kb before
	@echo !sum! kb after	

	@echo saving a total of !diff! kb (!diffPercent!%% decrease)

:: Unset variables
SET _value=
SET _sum=
SET _sumOriginal=
SET _count=
SET _diff=
SET _diffPercent=


Download pngout-batch.bat

MOD Monday #92

Posted in MOD Monday on Monday, May 30, 2011 at 7:23 PM by Terry

MOD Monday #91

Posted in MOD Monday on Monday, May 23, 2011 at 7:16 PM by Terry

This is “(Global Gladiators)alltunes-sfx”, from the game Global Gladiators, by Nightshade (Andrew James Barnabas).

Download MP3
Download MOD

MOD Monday #90

Posted in MOD Monday on Monday, May 16, 2011 at 3:31 PM by Terry

This is “Gameover Theme” by Reg (Régis Parret).

Download MP3
Download MOD

MOD Monday #89

Posted in MOD Monday on Monday, May 09, 2011 at 3:25 PM by Terry

MOD Monday #88

Posted in MOD Monday on Monday, May 02, 2011 at 11:38 AM by Terry


Blog Search