Celtic Tune – Under Fiery Skies

•2013-03-31 • Leave a Comment

Some of my all-time favorite memories involve the Celtic Rock band “Six Mile Bridge.”  I discovered them by accident, at my favorite Irish pub, Kierans.  I’d gone down with a friend to have some Fish & Chips, and maybe a pint, and ended up watching this marvelous bad playing on the tiniest little stage they’d probably ever played on.

And so, my love affair with this band was born.  I bought a CD at the show, and when I learned that they were playing the same venue the following weekend, I committed the songs to memory.

Continue reading ‘Celtic Tune – Under Fiery Skies’

A test post for Joe’s Benefit

•2011-06-22 • 2 Comments

He’s actually really really sick, and we need to have a benefit for him. 

avatar_01

<< edit :: actually, I was just demo-ing microsoft’s Windows Live Writer software to Joe @ http://incongruouscircumspection.blogspot.com/.  I’m rather surprised with how well that bit of msft software works! Devil >>

To blog, or not to blog; that is the question

•2011-03-11 • 4 Comments

Recently, a friend of mine has started blogging, and its somewhat re-kindled in me the desire to blog.  I really enjoy the process of writing out my thoughts, molding the misty concepts into a concrete, and (hopefully) well-written, post.

The problem is, though, what should I write about?  I have so many interests and hobbies, many in odd juxtaposition to each other, that, other than myself, and people close to me, I really can’t see anyone following what I’ve got to say, even if they should happen to stumble upon me and my blog.  It just seems really unlikely that someone who might be interested in one of my programming posts would also be interested in a worship music post too.  Or that someone interested in my fusion power posts would care to hear about the latest discovery of a great Irish folk/rock band.

You see what I’m saying here.  I need to pare down what I write about.  I can’t really blog about “everything under the sun.”  Its just too wide a gulf.  So, what should I write about?  Of course, nobody’s listening to me right now anyhow, so this is really more of a rhetorical sort of question, but, hey, if you’re out there, listening to my ravings, feel free to let me know what you’re thinking.  I’d love to hear from you.

The Forgotten Verses to The Star Spangled Banner

•2010-07-04 • Leave a Comment

The Star Spangled Banner (the National Anthem of the United States of America), written by Francis Scott Key in 1814,

Happy 4th of July! The American Flag in Fireworks

Oh, say can you see by the dawn’s early light
What so proudly we hailed at the twilight’s last gleaming?
Whose broad stripes and bright stars thru the perilous fight,
O’er the ramparts we watched were so gallantly streaming?
And the rocket’s red glare, the bombs bursting in air,
Gave proof through the night that our flag was still there.
Oh, say does that star-spangled banner yet wave
O’er the land of the free and the home of the brave?

On the shore, dimly seen through the mists of the deep,
Where the foe’s haughty host in dread silence reposes,
What is that which the breeze, o’er the towering steep,
As it fitfully blows, half conceals, half discloses?
Now it catches the gleam of the morning’s first beam,
In full glory reflected now shines in the stream:
‘Tis the star-spangled banner! Oh long may it wave
O’er the land of the free and the home of the brave!

And where is that band who so vauntingly swore
That the havoc of war and the battle’s confusion,
A home and a country should leave us no more!
Their blood has washed out their foul footsteps’ pollution.
No refuge could save the hireling and slave
From the terror of flight, or the gloom of the grave:
And the star-spangled banner in triumph doth wave
O’er the land of the free and the home of the brave!

Oh! thus be it ever, when freemen shall stand
Between their loved home and the war’s desolation!
Blest with victory and peace, may the heav’n rescued land
Praise the Power that hath made and preserved us a nation.
Then conquer we must, when our cause it is just,
And this be our motto: “In God is our trust.”
And the star-spangled banner in triumph shall wave
O’er the land of the free and the home of the brave!

(thanks to http://blog.worship.com/worship/2010/06/the-star-spangled-banner-by-francis-scott-key-in-1814-the-national-anthem-of-the-united-states-of-am.html )

Flex 4 — Reusable Icon Button Skins

•2010-05-06 • 14 Comments

So, for the last day or so, I’ve been on a quest.  I’ve recently begun to program in flex (and am eagerly awaiting the day when I can finally put my Classic ASP days behind me!) for a new project.  After mocking up the first module of the application, it was finally time to begin actual work.

Right off the bat, I found a need for an Icon Button (a button, with an icon placed on it).  Unfortunately, while this was quite trivial in Flex3, it has become rather complicated with the advent of Flex4.  Now, I’d like to take a moment aside to say that I rather like Flex4’s way of doing this.  It’s very powerful and inherently flexible.  Unfortunately, as a novice Flex programmer, I found the waters a bit tricky to navigate.  This post is my attempt to catalog my thoughts and my solution.

The first thing I tried was to google up a bunch of examples.  I quickly found many references:

I’m sorry to say that I had no luck whatsoever with the above methods.   I don’t for one minute think its the fault of the posters above, but rather, I think that my inexperience, combined with changes to the underlying Flex SDK between now and the time their articles were originally posted, is to blame.

Eventually, as I started to get a feel for how each of the above (and any others I might have stumbled across in my research) were trying to accomplish the task.  I settled for making Ben’s solution my own(ie: the first link above).  As it turned out in that particular case, after I’d done the work of mapping the classes to my package layout, renaming files and classes, etc., that the only thing I was really missing was a typo, just a simple mistake left over from the 50-odd experiments I’d done previously!

Once I had that down, I then proceeded to extend his example a bit, adding in bits of things that I’d seen and liked from some of the other resources.

Unfortunately, this blog doesn’t have a great way for me to display code, so, I’ll have to settle for some pastebin links, to show you how I did it.   Here’s a link to download the whole project, if that would be more convenient for you:   http://www.mediafire.com/file/b2jmzwi5duu/ReusableIconButtonSkins.7z .

  • This is the main application. I’m just setting up all the Icons (for possible reuse at another time), and then I set up a tileGroup to render out the new IconButtons. You can see how the configuration is. Each button has many properties that can be set, in particular, we have new ‘icon_____’ properties, to set particular icons for button states (up, down, over, disabled), as well as some sizing properties, to coerce the images to be of a nice size.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
    							 xmlns:s="library://ns.adobe.com/flex/spark" 
    							 xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" viewSourceURL="srcview/index.html">
    	<fx:Declarations>
    		<!-- Place non-visual elements (e.g., services, value objects) here -->
    	</fx:Declarations>
    	
    	<s:Group xmlns:Skins="Skins.*" 
     			 xmlns:Components="Components.*"
    	>
    		
    		<fx:Script>
    			<![CDATA[
    				
    				[Bindable][Embed(source="res/ico/add2.png")]
    				public var addIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/adddirect.png")]
    				public var adddirectIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/adddecimal.png")]
    				public var adddecimalIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/addgrean.png")]
    				public var addgreanIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/addgreanbuble.png")]
    				public var addgreanbubleIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/addtable.png")]
    				public var addtableIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/advancetab.png")]
    				public var advancetabIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/delete2.png")]
    				public var deleteIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/coins.png")]
    				public var coinsIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/giraffe.jpg")]
    				public var giraffeIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/animal.jpg")]
    				public var animalIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/kitten.jpg")]
    				public var kittenIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/hedgehog.jpg")]
    				public var hedgehogIcon:Class;
    				
    				[Bindable]
    				[Embed(source="res/ico/weim.jpg")]
    				public var weimIcon:Class;
    			]]>
    		</fx:Script>
    		
    		
    		
    		<s:TileGroup x="10" y="10" width="511" height="716">
    			
    			<Components:IconButton
    				label="I Love Wiem's"
    				height="160"
    				width="120"
    				iconUp="{weimIcon}"
    				iconOver="{weimIcon}"
    				iconDown="{kittenIcon}"
    				iconDisabled=""
    				iconWidth="100"
    				iconHeight="100"
    				fontFamily="Times"
    				fontWeight="bold"
    				skinClass="Skins.IconButtonSkin"
    				/>
    			<Components:IconButton
    				label="Animals"
    				height="160"
    				width="120"
    				iconUp="{hedgehogIcon}"
    				iconOver="{animalIcon}"
    				iconDown="{giraffeIcon}"
    				iconDisabled=""
    				iconWidth="64"
    				iconHeight="64"
    				fontFamily="Times"
    				fontWeight="bold"
    				skinClass="Skins.IconButtonSkin"
    				/>
    			<Components:IconButton
    				label="Tables"
    				height="160"
    				width="120"
    				iconUp="{advancetabIcon}"
    				iconOver="{advancetabIcon}"
    				iconDown="{addgreanbubleIcon}"
    				iconDisabled=""
    				iconWidth="64"
    				iconHeight="64"
    				fontFamily="Times"
    				fontWeight="bold"
    				skinClass="Skins.IconButtonSkin"
    				/>
    			<Components:IconButton
    				label="Delete"
    				height="160"
    				width="120"
    				iconUp="{deleteIcon}"
    				iconOver="{deleteIcon}"
    				iconDown="{coinsIcon}"
    				iconDisabled=""
    				iconWidth="64"
    				iconHeight="64"
    				fontFamily="Times"
    				fontWeight="bold"
    				skinClass="Skins.IconButtonSkin"
    				/>
    			
    			
    			
    		</s:TileGroup>
    		
    		
    	</s:Group>
    
    </s:Application>
    
  • This is where I sub-classed the spark.components.Button. You can see all the ‘new’ properties that we’ve added to the IconButton class (as compared with the Button class).
    package Components
    {
    
    	import spark.components.Button;
    	
    	//icons
    	[Style(name="iconUp",type="*")]
    	[Style(name="iconOver",type="*")]
    	[Style(name="iconDown",type="*")]
    	[Style(name="iconDisabled",type="*")]
    	
    	[Style(name="iconWidth",type="Number")]
    	[Style(name="iconHeight",type="Number")]
    	
    	
    	
    	//paddings
    	[Style(name="paddingLeft",type="Number")]
    	[Style(name="paddingRight",type="Number")]
    	[Style(name="paddingTop",type="Number")]
    	[Style(name="paddingBottom",type="Number")]
    	public class IconButton extends Button
    	{
    		public function IconButton()
    		{
    			super();
    		}
    	}
    	
    }
  • This is the Skin code. All the fun stuff happens in here. Its not substantially different from the one Ben lists on his site, but I’ve added some extra bits in, like changing to a vertical layout, adding the ‘standard’ spark skin look&feel, image size coersion.
    <s:SparkSkin
    	xmlns:fx="http://ns.adobe.com/mxml/2009"
    	xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
    	xmlns:s="library://ns.adobe.com/flex/spark"
    	xmlns:mx="library://ns.adobe.com/flex/halo"
    	currentStateChanging="onCurrentStateChanging(event)"
    	>
    	<fx:Metadata>
    		[HostComponent("Components.IconButton")]
    	</fx:Metadata>
    	<fx:Script fb:purpose="styling">
    		<![CDATA[
    			import mx.events.StateChangeEvent;
    			
    			private function onCurrentStateChanging(event:StateChangeEvent):void{
    				switch(event.newState){
    					case "up":
    						setIcon("iconUp");
    						break;
    					case "over":
    						setIcon("iconOver");
    						break;
    					case "down":
    						setIcon("iconDown");
    						break;
    					case "disabled":
    						setIcon("iconDisabled");
    						break;
    				}
    			}
    			private function setIcon(type:String):void{
    				if(hostComponent.getStyle(type) != null){
    					icon.source = hostComponent.getStyle(type);
    				}
    			}
    			/* Define the skin elements that should not be colorized. 
    			For button, the graphics are colorized but the label is not. */
    			static private const exclusions:Array = ["labelDisplay"];
    			
    			/** 
    			 * @private
    			 */     
    			override public function get colorizeExclusions():Array {return exclusions;}
    			
    			/**
    			 * @private
    			 */
    			override protected function initializationComplete():void
    			{
    				useChromeColor = true;
    				super.initializationComplete();
    			}  
    			
    			/**
    			 *  @private
    			 */
    			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
    			{
    				var cr:Number = getStyle("cornerRadius");
    				
    				if (cornerRadius != cr)
    				{
    					cornerRadius = cr;
    					shadow.radiusX = cornerRadius;
    					fill.radiusX = cornerRadius;
    					lowlight.radiusX = cornerRadius;
    					highlight.radiusX = cornerRadius;
    					border.radiusX = cornerRadius;
    				}
    				
    				if (highlightStroke) highlightStroke.radiusX = cornerRadius;
    				if (hldownstroke1) hldownstroke1.radiusX = cornerRadius;
    				if (hldownstroke2) hldownstroke2.radiusX = cornerRadius;
    				
    				super.updateDisplayList(unscaledWidth, unscaledHeight);
    			}
    			
    			private var cornerRadius:Number = 2;
    		]]>
    	</fx:Script>
    	
    	<s:layout>
    		<s:BasicLayout/>
    	</s:layout>
    	
    	<s:states>
    		<s:State name="up"/>
    		<s:State name="over"/>
    		<s:State name="down"/>
    		<s:State name="disabled"/>
    	</s:states> 
    	
    	
    	<!-- layer 1: shadow -->
    	<!--- @private -->
    	<s:Rect id="shadow" left="-1" right="-1" top="-1" bottom="-1" radiusX="2">
    		<s:fill>
    			<s:LinearGradient rotation="90">
    				<s:GradientEntry color="0x000000" 
    								 color.down="0xFFFFFF"
    								 alpha="0.01"
    								 alpha.down="0" />
    				<s:GradientEntry color="0x000000" 
    								 color.down="0xFFFFFF" 
    								 alpha="0.07"
    								 alpha.down="0.5" />
    			</s:LinearGradient>
    		</s:fill>
    	</s:Rect>
    	
    	<!-- layer 2: fill -->
    	<!--- @private -->
    	<s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
    		<s:fill>
    			<s:LinearGradient rotation="90">
    				<s:GradientEntry color="0xFFFFFF" 
    								 color.over="0xBBBDBD" 
    								 color.down="0xAAAAAA" 
    								 alpha="0.85" />
    				<s:GradientEntry color="0xD8D8D8" 
    								 color.over="0x9FA0A1" 
    								 color.down="0x929496" 
    								 alpha="0.85" />
    			</s:LinearGradient>
    		</s:fill>
    	</s:Rect>
    	
    	<!-- layer 3: fill lowlight -->
    	<!--- @private -->
    	<s:Rect id="lowlight" left="1" right="1" top="1" bottom="1" radiusX="2">
    		<s:fill>
    			<s:LinearGradient rotation="270">
    				<s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
    				<s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
    				<s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
    			</s:LinearGradient>
    		</s:fill>
    	</s:Rect>
    	
    	<!-- layer 4: fill highlight -->
    	<!--- @private -->
    	<s:Rect id="highlight" left="1" right="1" top="1" bottom="1" radiusX="2">
    		<s:fill>
    			<s:LinearGradient rotation="90">
    				<s:GradientEntry color="0xFFFFFF"
    								 ratio="0.0"
    								 alpha="0.33" 
    								 alpha.over="0.22" 
    								 alpha.down="0.12"/>
    				<s:GradientEntry color="0xFFFFFF"
    								 ratio="0.48"
    								 alpha="0.33"
    								 alpha.over="0.22"
    								 alpha.down="0.12" />
    				<s:GradientEntry color="0xFFFFFF"
    								 ratio="0.48001"
    								 alpha="0" />
    			</s:LinearGradient>
    		</s:fill>
    	</s:Rect>
    	
    	<!-- layer 5: highlight stroke (all states except down) -->
    	<!--- @private -->
    	<s:Rect id="highlightStroke" left="1" right="1" top="1" bottom="1" radiusX="2" excludeFrom="down">
    		<s:stroke>
    			<s:LinearGradientStroke rotation="90" weight="1">
    				<s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
    				<s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
    			</s:LinearGradientStroke>
    		</s:stroke>
    	</s:Rect>
    	
    	<!-- layer 6: highlight stroke (down state only) -->
    	<!--- @private -->
    	<s:Rect id="hldownstroke1" left="1" right="1" top="1" bottom="1" radiusX="2" includeIn="down">
    		<s:stroke>
    			<s:LinearGradientStroke rotation="90" weight="1">
    				<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.0" />
    				<s:GradientEntry color="0x000000" alpha="0.25" ratio="0.001" />
    				<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.0011" />
    				<s:GradientEntry color="0x000000" alpha="0.07" ratio="0.965" />
    				<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.9651" />
    			</s:LinearGradientStroke>
    		</s:stroke>
    	</s:Rect>
    	<!--- @private -->
    	<s:Rect id="hldownstroke2" left="2" right="2" top="2" bottom="2" radiusX="2" includeIn="down">
    		<s:stroke>
    			<s:LinearGradientStroke rotation="90" weight="1">
    				<s:GradientEntry color="0x000000" alpha="0.09" ratio="0.0" />
    				<s:GradientEntry color="0x000000" alpha="0.00" ratio="0.0001" />
    			</s:LinearGradientStroke>
    		</s:stroke>
    	</s:Rect>
    	
    	<!-- layer 7: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
    	<!--- @private -->
    	<s:Rect id="border" left="0" right="0" top="0" bottom="0" width="69" height="20" radiusX="2">
    		<s:stroke>
    			<s:LinearGradientStroke rotation="90" weight="1">
    				<s:GradientEntry color="0x000000" 
    								 alpha="0.5625"
    								 alpha.down="0.6375" />
    				<s:GradientEntry color="0x000000" 
    								 alpha="0.75" 
    								 alpha.down="0.85" />
    			</s:LinearGradientStroke>
    		</s:stroke>
    	</s:Rect>
    	
    	
    	<s:Group
    		horizontalCenter="0"
    		verticalCenter="0"
    		>
    		<s:layout>
    			<s:VerticalLayout
    				paddingBottom="{ hostComponent.getStyle('paddingBottom')}"
    				paddingTop="{ hostComponent.getStyle('paddingTop')}"
    				paddingLeft="{ hostComponent.getStyle('paddingLeft')}"
    				paddingRight="{ hostComponent.getStyle('paddingRight')}" />
    		</s:layout>
    		<s:BitmapImage
    			id="icon"
    			width="{hostComponent.getStyle('iconWidth')}"
    			height="{hostComponent.getStyle('iconHeight')}"
    			source="{hostComponent.getStyle('iconUp')}"
    			verticalCenter="0"
    			alpha="{(this.currentState == 'up')?.5:1}"
    			/>
    		<s:Label
    			text="{hostComponent.label}"
    			verticalCenter="0"
    			includeInLayout="{( hostComponent.label != '' )}"
    			visible="{( hostComponent.label != '' )}"/>
    	</s:Group>
    	
    </s:SparkSkin>
    

All things considered, I’ve learned a great deal, and hopefully, my efforts here will help some other soul following in my footsteps learn these lessons a bit more quickly than I did.

Pregnancy Emotions

•2010-05-03 • Leave a Comment

Today I learned something new and interesting…

“pregnancy emotions don’t allow for logic”

Do you have any experience with this?  Any amusing anecdotes?  I’d love to hear about it.

The Necessity of Prayer :: 06 & 07

•2010-04-15 • Leave a Comment

Welcome back to part 6 (and 7, really) in my series on E.M. Bounds’ book about “The Necessity of Prayer.”

This time, we’ll be looking at the topic “Prayer and Importunity”

Importunity basically means ‘overly persistent.’  Irritatingly persistent might also be a good way to describe it.

In these two chapters, we look at a number of examples in scripture, describing importunate prayer or conduct, and how that kind of persistence paid dividends in the end.  Abraham asking God to spare Gomorrah, over and over again.  Jacob wrestling through the night, refusing to let go until he’d been blessed.  Moses prayed for 40 days to stay the hand of God against the Israelites.  Elijah prayed seven times for the rains to come.  Jesus himself in the garden of Gethsemane,prayed the same prayer three separate times.

Nowhere, however is it made as clear to us as with the “Parable of the Importunate Widow”.  This is the story where the widow brings her case to the judge again and again, and each time he turns her away.  Until, at some point, he realizes that the only way to be rid of her is to give her what she asks for, and he commits himself to avenging her.

Jesus is telling it to us plainly.  Come to me.  Come again.  And come again and again and again.  Why, do you suppose this is so?  In Bound’s words :

He teaches, moreover, that an answer to prayer is conditional upon the amount of faith that goes to the petition.  To test this, he delays the answer.  The superficial pray-er subsides into silence, when the answer is delayed.  But the man of prayer hand on and on.  The Lord recognizes and honors his faith, and gives him a rich and abundant answer to his faith-evidencing, importunate prayer.

The key to all of this, then, is to recognize that when you pray, you should anticipate a delay.  That your faith may be tested (and, as a curious consequence, strengthened!) by delay and what can only be perceived as failure.  But the correct response is to redouble your efforts, to become even more fervent in your petitions, and to not give up praying until your prayers have prevailed.

Am I the only one that is bothered by this notion?  It seems so….disrespectful…of God.  Doesn’t he have better things to do than to listen to me belly-ache about my needs and problems?  God seems to allow us to sway him.   When Israel had created for themselves the Golden Calf, God was in a terrible anger over it, and was set to destroy them wholly.  Moses set himself to pray for His hand to be stayed.  God said to him, “Leave me alone!” But Moses would not, and because Moses refused to give up until his prayers had prevailed, Israel was delivered.

It seems that God gives us an ear whenever we choose to take it.  Even when He may have set his will on a particular course, perhaps our prayers actually can influence Him in some way?