Well it's actually super easy, you just open a Shell prompt, type "cat /etc/issue" and press enter...
$ cat /etc/issue
Fedora release 16 (Verne)
And that is it :-)
Web Development & Rich Internet Applications
$ cat /etc/issue
Fedora release 16 (Verne)
com.middleweek.strip.prototype.startDualTimer = function (firstDelay, ongoingDelay) {
"use strict";
var self = this;
if (self._internal.timer === null) { // Only start the timer if it's not already started...
var timeoutHandler = function () {
"use strict";
if (self._internal.timer) { // Check to see if it's been stopped.
self.timerInternalEventHandler();
}
self._internal.timer = window.setTimeout(timeoutHandler, ongoingDelay);
};
self._internal.timer = window.setTimeout(timeoutHandler, firstDelay);
}
}
It's all pretty self-explanatory but here we have a function that accepts two values, firstDelay and ongoingDelay. The first call to setTimeout uses the firstDelay which invokes it's private closure function timeoutHandler() which in turns calls the components timerInternalEventHandler() function to do it's magic and then it continues to recursively call the private closure with ongoingDelay, and so forth......setInterval's best friend!
com.middleweek.strip.prototype.getItemMetrics = function () {
"use strict";
var self = this;
var item = {};
item.id = self.createUUID();
var renderedHTML = self._renderItem(self.renderers.stripItem, item);
$('body').append(renderedHTML);
var metric = {};
metric.width = $('#' + item.id).outerWidth();
metric.height = $('#' + item.id).outerHeight();
$('#' + item.id).remove();
return metric;
};
...
function Metrics(w,h) {
"use strict";
this.width = w;
this.height = h;
}
var jqCache = $('#' + item.id);
var metric = new Metrics( jqCache.outerWidth(), jqCache.outerHeight() );
return metric;
...
...neat!
hscroller.scrollToItemIndex(0);
BindingUtils.bindProperty()
. First time round, all is fine but on take-two of opening the poppedUp HSmoothBox, it throws a wobbly... This was because the injected data model was fetched from the server and the timings just so made it work on it's first view but attempt numero two meant the dataProvider's ArrayCollection was there already waiting and was being injected into the HSmoothBox before it was fully created.FlexEvent.CREATION_COMPLETE
handler an internal "_scroller" object is created which, is required when we call its scrollToItemIndex()
function. The culprit was caught!package com.middleweek.component
{
import containerEx.HSmoothBox;
import mx.events.FlexEvent;
/**
*
* @author nick.middleweek 16th February 2011
*
* This is to fix component functionality by overriding some methods that are prematurely invoked.
*
*/
public class HSmoothBox2B extends HSmoothBox
{
/**
* @private
* Storage variable to test if the creationComplete phase has executed.
*/
private var creationCompleted : Boolean = false;
/**
* Constructor
*
*/
public function HSmoothBox2B ()
{
super();
this.addEventListener( FlexEvent.CREATION_COMPLETE, onCreationComplete );
}
private function onCreationComplete ( evt : FlexEvent ) : void
{
this.creationCompleted = true;
}
override public function scrollToItemIndex ( val : int, immediate : Boolean = false ) : void
{
if ( creationCompleted == true )
{
super.scrollToItemIndex( val, immediate );
}
}
override public function head () : void
{
if ( creationCompleted == true )
{
super.head();
}
}
override public function tail () : void
{
if ( creationCompleted == true )
{
super.head();
}
}
}
}
now HSmoothBox is even smoother!
var num : Number = ( 11995 / 1000000 );
var num2 : Number = num * 1000;
var str2 : String = num2.toFixed( 6 );
var num3 : Number = new Number( str2 );