public class TextBlock_lineRotationExample extends Sprite {
public function TextBlock_lineRotationExample():void {
var s:String = “一向批判電影不會「口下留情」的大陸媒體,竟在李安導演《少年PI的奇幻漂流》內地上映後,於中國最大入口網站搜狐,罕見大讚道:『影片美輪美奐的視覺奇觀,身臨其境的3D效果。』”;
var fontDescription:FontDescription = new FontDescription(“MS Mincho”);
var format:ElementFormat = new ElementFormat();
format.fontSize = 15;
format.fontDescription = fontDescription;
var textElement:TextElement = new TextElement(s, format);
var textBlock:TextBlock = new TextBlock();
textBlock.content = textElement;
textBlock.lineRotation = TextRotation.ROTATE_90;
var linePosition:Number = this.stage.stageWidth – 120;
var previousLine:TextLine = null;
雲端服務 vs. 雲端運算
除了雲端運算這項口號之外,還有人提出了雲端服務的概念,這是由於雲端運算通常指的是在網路上提供且為商業和客戶服務的消費模型,這些服務包含了以資訊科 技為主的服務,如軟體即服務(SaaS, Software as a Service)以及提供伺服器運算及儲存能力的服務等,但實際上還有更多和資訊科技無關的商業和客戶的服務,如線上購物、銷售、娛樂等,而這些服務多半 與運算的功能無關,而更為貼近人們的生活,對這些客戶而言,他們所使用的不是雲端運算這項功能,而是由雲端運算環境所提供的雲端服務。
乍看之下好像沒有特殊之處,但實際上該數字比宇宙所有的基本粒子數量總和還要大。Googol這個字是由美國數學家Edward Kasner九歲的侄子Milton Sirotta發明的,後來在數學家Edward Kasner和James Newman的著作《Mathematics and the Imagination》(http://tinyurl.com/lxunra)中被引用,Google公司使用這個字顯示了公司想征服網路無窮無盡資 料的夢想,最後沒有選用Googol可能是因為版權的問題,而且當註冊Google.com網域的時候已經被註冊。
在函數編程中很早就有了Map和Reduce觀念,其實類似於演算法中各個擊破的作法(Divide and Conquer),也就是將問題分解成很多個小問題之後再做總和。Map函數的輸入是一個鍵/值序對組,輸出則為另一組中繼過渡的鍵/值序對組。而 Reduce函數則負責針對相同的中繼過渡的鍵/值序對組合併其所有相關聯的中繼值,並產生輸出結果的鍵/值序對組,如圖4所示。
圖4:MapReduce運算方式。
/**
* A simple extension of the Spark Panel component
* that enables dragging.
*/
public class DraggablePanel extends Panel
{
//————————————–
// Constructor
//————————————–
public function DraggablePanel()
{
super();
}
//————————————–
// Skin Parts
//————————————–
/**
* The skin part that represents the title bar of the underlying Panel.
* NOTE: The default PanelSkin already has this, it’s just not defined as a skinPart in the Panel class.
* We want it so that we can capture dragging.
*/
[SkinPart(required=”true”)]
public var topGroup:Group;