2007年12月19日 星期三
2007年8月26日 星期日
Nightwish -Sleepwalker ( EP 只有7min, 買不下去 ... )
Feel the ocean where passion lies
Silently the senses
Abandon all defenses
A place between sleep and awake
End of innocence, unending masquerade
That's where I'll wait for you
Hold me near you
So close I sear you
Seeing, believing
Dreaming, deceiving
A place between sleep and awake
End of innocence, unending masquerade
That's where I'll wait for you
Sleepwalker seducing me
I dare to enter your ecstacy
Lay yourself now down to sleep
In my dreams you're mine to keep
Sleepwalker,
Sleepwalker
Sleepwalker seducing me...
2007年7月8日 星期日
Lost Horizon
that shined so bright once in your eyes?
What about the death... faith you lost...
so that was your quest?
What about the dreams...
there where no visions in your grief?
What about the fight...
that graced your life?
Water, fire, wind and soil
My soul came to be reborn
As the lightning thrashes black skies
The spirit fills my mind
Welcome back, to the days of thunder!
Welcome back, to the days where you were born!
Welcome back, to break the spell you're under!
Welcome back, to the days of thunder!
Welcome back, to the days where you were born!
Welcome back, to raise again your honour!
What about the life...
It shines so bright now in my eyes!
What about the death...
Faith I found, now life's my quest!
What about the dreams...
There're new visions in my grief!
What about the fight...
It graces my life!
Scene Tree
#define SceneTreeNode_H
#include <windows.h>
#endif
#include <xtl.h>
#endif
#include <d3dx9math.h>
#include <string>
#include "safemacro.h"
//#include "SceneTreeNode.h"
/*
use std::map for now,
we can change it into hash_map later
*/
#include <map>
typedef std::map<std::string, CSceneTreeNode*>::iterator SceneTreeMapIterator;
typedef std::pair<std::string, CSceneTreeNode*> SceneTreePair;
typedef std::pair<SceneTreeMapIterator,bool> SceneTreeOperationReturnValue;
{
public:
CSceneTreeNode();
virtual ~CSceneTreeNode();
///////////////////////////////////////////////////////////////////////////
//scene tree operation
///////////////////////////////////////////////////////////////////////////
CSceneTreeNode* AddNewChildNode(std::string* pName);
//And kill all it's child node
HRESULT DeleteChildNode(std::string* pName);
// If this node's parent isn't NULL, call DisAttachThisNodeFromParent() automatically
HRESULT AttachThisNodeToNewParent(CSceneTreeNode* pNewParent);
// split node from parent , this node will be new tree root
HRESULT DisAttachThisNodeFromParent();
void DeleteAllChild();
CSceneTreeNode* GetParentNode();
///////////////////////////////////////////////////////////////////////////
//node matrix operation
///////////////////////////////////////////////////////////////////////////
HRESULT SetGlobalMatrix(D3DXMATRIX* pMatrix);
const D3DXMATRIX* GetLocalMatrix();
const D3DXMATRIX* GetGlobalMatrix();
HRESULT UpdateChildNode();
// flag == false 就 recursive , flag == true 就呼叫 UpdateChildNode();
HRESULT UpdateChildNodeFromSceneRoot();
//flag operation (self dirty)
HRESULT SetAllChildNeedUpdateFlag(bool bFlag);
//flag operation (some child dirty)
HRESULT SetAllParentSomeChildNeedUpdate(bool bFlag);
SceneTreeMap m_ChildNodeMap;
D3DXMATRIX m_LocalMatrix;
D3DXMATRIX m_GlobalMatrix;
m_bSomeChildNeedUpdateFlag => reduce recursive pass
m_bNeedUpdateFlag => reduce matrix multiplication
*/
bool m_bNeedUpdateFlag;
bool m_bSomeChildNeedUpdateFlag;
CSceneTreeNode* m_pParent;
{
m_Name = "";
m_pParent = NULL;
m_bNeedUpdateFlag = false;
m_bSomeChildNeedUpdateFlag = false;
D3DXMatrixIdentity(&m_LocalMatrix);
D3DXMatrixIdentity(&m_GlobalMatrix);
}
{
if(m_ChildNodeMap.empty() == false)
{
DeleteAllChild();
}
m_pParent = NULL;
}
///////////////////////////////////////////////////////////////////////////
//scene tree operation
///////////////////////////////////////////////////////////////////////////
{
SceneTreeMapIterator pos;
pos = m_ChildNodeMap.find(*pName);
if( pos == m_ChildNodeMap.end() )
{
CSceneTreeNode* pNewSceneTreeNode = new CSceneTreeNode;
m_ChildNodeMap.insert(SceneTreePair(*pName, pNewSceneTreeNode));
pNewSceneTreeNode->SetGlobalMatrix(&m_GlobalMatrix);
pNewSceneTreeNode->m_pParent = this;
}
return NULL;
}
HRESULT CSceneTreeNode::DeleteChildNode(std::string* pName)
{
SceneTreeMapIterator pos;
pos = m_ChildNodeMap.find(*pName);
if( pos != m_ChildNodeMap.end() )
{
SAFE_DELETE(pos->second);
return S_OK;
}
return E_FAIL;
HRESULT CSceneTreeNode::AttachThisNodeToNewParent(CSceneTreeNode* pNewParent)
{
if(m_pParent != NULL)
DisAttachThisNodeFromParent();
SceneTreeOperationReturnValue result;
result = (pNewParent->m_ChildNodeMap).insert(SceneTreePair(m_Name, this));
if(result.second ==false)
return E_FAIL;
m_pParent = pNewParent;
return S_OK;
}
HRESULT CSceneTreeNode::DisAttachThisNodeFromParent()
{
if(!m_pParent)
return E_FAIL;
pos = (m_pParent->m_ChildNodeMap).find(m_Name);
if(pos == (m_pParent->m_ChildNodeMap).end())
return E_FAIL;
(m_pParent->m_ChildNodeMap).erase(pos);
m_pParent = NULL;
}
void CSceneTreeNode::DeleteAllChild()
{
SceneTreeMapIterator pos;
//DeleteAllChild recursive
for(pos = m_ChildNodeMap.begin(); pos!=m_ChildNodeMap.end(); ++pos)
{
pos->second->DeleteAllChild();
SAFE_DELETE(pos->second);
//m_ChildNodeMap.~map();
}
//clean the Node Map
if(m_ChildNodeMap.begin() != m_ChildNodeMap.end())
m_ChildNodeMap.erase(m_ChildNodeMap.begin(),m_ChildNodeMap.end());
}
{
SceneTreeMapIterator pos;
pos = m_ChildNodeMap.find(*pName);
if(pos != m_ChildNodeMap.end())
{
return pos->second;
}
else
return NULL;
CSceneTreeNode* CSceneTreeNode::GetParentNode()
{
return m_pParent;
}
//node matrix operation
///////////////////////////////////////////////////////////////////////////
{
if(pMatrix)
{
m_LocalMatrix = *pMatrix;
SetAllChildNeedUpdateFlag(true);
SetAllParentSomeChildNeedUpdate(true);
return S_OK;
}
}
HRESULT CSceneTreeNode::SetGlobalMatrix(D3DXMATRIX* pMatrix)
{
//注意矩陣乘法順序
//[L] * [Par_G] = [G]
//[L] = [G] * [Par_G]^-1
if(pMatrix)
{
m_GlobalMatrix = *pMatrix;
SetAllChildNeedUpdateFlag(true);
SetAllParentSomeChildNeedUpdate(true);
if(m_pParent != NULL)
{
D3DXMATRIX ParentGlobalMatrixInverse;
D3DXMatrixInverse( &ParentGlobalMatrixInverse, NULL, &(m_pParent->m_GlobalMatrix));
D3DXMatrixMultiply( &m_LocalMatrix, &m_GlobalMatrix, &ParentGlobalMatrixInverse);
}
else
{
m_LocalMatrix = m_GlobalMatrix;
}
return S_OK;
}
return E_FAIL;
}
const D3DXMATRIX* CSceneTreeNode::GetLocalMatrix()
{
return &m_LocalMatrix;
}
const D3DXMATRIX* CSceneTreeNode::GetGlobalMatrix()
{
return &m_GlobalMatrix;
}
{
//注意矩陣乘法順序
//[L] * [Par_G] = [G]
if(m_bNeedUpdateFlag == true)
{
if(m_pParent != NULL)
{
D3DXMatrixMultiply( &m_GlobalMatrix, &m_LocalMatrix, &(m_pParent->m_GlobalMatrix));
}
else
{
m_GlobalMatrix = m_LocalMatrix;
}
m_bNeedUpdateFlag = false;
m_bSomeChildNeedUpdateFlag = false;
SceneTreeMapIterator pos;
for(pos = m_ChildNodeMap.begin(); pos!=m_ChildNodeMap.end(); ++pos)
{
pos->second->UpdateChildNode();
}
return S_OK;
}
HRESULT CSceneTreeNode::UpdateChildNodeFromSceneRoot()
{
// keep on looking, while some child dirty
if(m_bSomeChildNeedUpdateFlag == false)
{
return S_OK;
}
{
UpdateChildNode();
return S_OK;
}
for(pos = m_ChildNodeMap.begin(); pos!=m_ChildNodeMap.end(); ++pos)
{
pos->second->UpdateChildNodeFromSceneRoot();
m_bSomeChildNeedUpdateFlag = false;
}
return S_OK;
}
HRESULT CSceneTreeNode::SetAllChildNeedUpdateFlag(bool bFlag)
{
if( bFlag == m_bNeedUpdateFlag)
{
return E_FAIL;
}
SceneTreeMapIterator pos;
for(pos = m_ChildNodeMap.begin(); pos!=m_ChildNodeMap.end(); ++pos)
{
pos->second->SetAllChildNeedUpdateFlag(bFlag);
}
return S_OK;
}
{
if(bFlag == m_bSomeChildNeedUpdateFlag)
{
return E_FAIL;
}
m_bSomeChildNeedUpdateFlag = bFlag;
if(m_pParent != NULL)
m_pParent->SetAllParentSomeChildNeedUpdate(bFlag);
return S_OK;
}
2007年7月1日 星期日
2007年6月19日 星期二
英文自傳
That sacred call, that final cry, breeds a spiritual aspiration, which leads to the great gathering of the three.
Under a prodigious influence of the same, shared flame, baptised in Metal and the restored will, they interlace their faiths and conclude their goals. Transcendental Protagonist, Cosmic Antagonist and Preternatural Transmogrifyer are born.
During two years, the reunited companions consequently prepare a great manifestation for the world - their first album of power. About a year later, when the adjusting of the thoughts is almost finished, another shape turns up on the horizon. The singer Daniel joins the brave ones, embellishing the music by his divine voice. Shortly thereafter, two demonstration songs are recorded. Also he, listening to his deepest ego, finds his real identity. The new, fourth warrior is born. His name is Ethereal Magnanimus.
In June 1999, the demonstration CDs are sent out to several record labels. By the end of the summer, the formation receives very positive feedback and interest from most of them. Yet, only one of them proves itself worthy enough. It's Music For Nations. In March 17th, 2000, both parties finally signs a covenant, and the collaboration begins. Shortly after, a music studio is entered and the recording begins. Like in a trance, with no rest and no mercy, from late March through mid August, the album "Awakening The World" is being created. Only the walls of the several studios know the pain and the suffering that is being experienced. But nothing can stop this enterprise.
And now the work is finished. The first ritual is over. The second begins. And out of nowhere the fifth and the sixth warrior are on their way to take their place at the round table, where two of the thrones that surround it have been waiting to be ascended. The new dawn is born and is here to stay. Once lost. Now brought back.
The LOST HORIZON.
We want to help them find the voice of their inner self, which by help of the inner Force will bring the awakening. The awakening will be a new start. A way back, followed by the redintegration. The person will never turn the same, but strengthened by pain - seeing, hearing, feeling, thinking and sensing in a much better way. The dark experiences will turn into an advantage. The bright knowledge will mix with the dark in a perfect composition, the golden combination, the natural balance, harmony and understanding of things, knowledge and strength, the point and the self. To happiness.
For all of what we are, this means an opportunity to change things on a larger scale. Not only to play our music and hope that people like it, but rather to actually say something with what we do and make people take a step back and open their eyes, thus contributing to a change not only in their lives, but also to the world.
2007年6月14日 星期四
2007年5月6日 星期日
2007年4月9日 星期一
五月二十二日 Dragonforce 演唱會!
Online Ticketing Link: http://www.rockempire.com.tw/index1.php
2007年2月28日 星期三
2007年2月6日 星期二
莊子是這樣教導的
夫子出於山,舍於故人之家。故人喜,命豎子殺雁而烹之。
豎子請曰:其一能鳴,其一不能鳴,請奚殺?
主人曰:殺不能鳴者。
明日,弟子問於莊子曰:昨日山中之木,以不材得終其天年﹔今主人之雁,以不材死。先生將何處?
莊子笑曰:周將處乎材與不材之間。材與不材之間,似之而非也,故未免乎累。若夫乘道德而浮遊則不然,旡譽旡訾,一龍一蛇,與時俱化,而旡肯專為。一上一下,以和為量,浮遊乎萬物之祖。物物而不物於物,則胡可得而累邪!此神農黃帝之法則也。若夫萬物之情,人倫之傳,則不然。合則離,成則毀,廉則挫,尊則議,有為則虧,賢則謀,不肖則欺。胡可得而必乎哉!悲夫,弟子志之,其唯道德之鄉乎!
繼孟子的教導之後,我們也要向莊子好好得學習人生的哲理。
首先來翻譯這段文章:
匠伯(木匠領袖)率弟子入山實地觀察木材,見路旁有大樹,其蔭可蔽數千牛,觀者如市,猶如一景點,眾弟子以為美材,匠伯卻一路行去不回頭,莊子追問何不砍伐,匠伯說此木是散木,即樹中心會軸解的樹,是不材之木。莊子聽了,當機指點弟子道:「大木無用,故不被砍伐。」莊子下山後,宿於老友家,老友命僕人殺鵝待客,僕人請示主人:「一鵝會叫,一鵝不會叫,殺哪一隻?」主人說:「殺不會叫的。」次日,弟子於途中問道:「昨日山中大木,因不材而不被砍伐,今日主人之雁,卻因不會叫而被殺,請問夫子將處於哪一種狀況?」莊子說:「我一定處在材與不材之間。
處於成材與不成材之間,好像合于大道卻並非真正與大道相合,所以這樣不能免於拘束與勞累。假如能順應自然而自由自在地遊樂也就不是這樣。沒有讚譽沒有詆毀,時而像龍一樣騰飛時而像蛇一樣蜇伏,跟隨時間的推移而變化,而不願偏滯於某一方面;時而進取時而退縮,一切以順和作為度量,優遊自得地生活在萬物的初始狀態,役使外物,卻不被外物所役使,那麼,怎麼會受到外物的拘束和勞累呢?這就是神農、黃帝的處世原則。至於說到萬物的真情,人類的傳習,就不是這樣的。有聚合也就有離析,有成功也就有毀敗;棱角銳利就會受到挫折,尊顯就會受到傾覆,有為就會受到虧損,賢能就會受到謀算,而無能也會受到欺侮,怎麼可以一定要偏滯於某一方面呢!可悲啊!弟子們記住了,恐怕還只有歸向于自然吧!」
孟子認為早上起床不想上班,就不要去。換一份能發揮所長的工作。這是出於儒家"用之則行,捨之則藏"的精神。就是如果環境能讓我發揮所長,就好好地一展長才。如果環境不允許,就退守山林養精蓄銳,以待時清。
莊子則認為,早上不想上班,就晚點去。有工作可做就做,無工作做就擺爛。太認真做,以後事情全部攬到自己身上,容易過勞死。瘋狂地擺爛,讓人一看就討厭,遲早遭報應。在公司裡,有時老闆口若懸河般地宛如先知,但仔細剖析之後,才發現交辦的事項有多少累贅。此時就要像龍一樣地騰飛,像蛇一樣蟄伏,知道甚麼事值得好好做,甚麼事情要應付了事。如此才會悠遊於辦公室之間,不被末名奇妙的 SPEC 勞累,此神農黃帝之法則也!
莊子此言甚是,所謂無用之用,才與不才,在"完全沒有軟體工程規範的公司"裡才能完全地體會到合於大道的人生哲理。
有很多如我一般理科出身的朋友,對國學不太瞭解,所以我試著把孟子及莊子的微言大義簡化如下:
bool 孟子上班認真度; // 認真度 = true or false
float 莊子上班認真度; // 0 < 認真度 < 1
if(早上不爽上班)
{
孟子上班認真度 = false;
莊子上班認真度 = 1- 擺爛度 ; // 通常 擺爛度 < 1
}
2007年1月29日 星期一
孟子也覺得換工作比較好
孟 子 曰 : 「 牛 山 之 木 嘗 美 矣 , 以 其 郊 於 大 國 也 , 斧 斤 伐 之 , 可 以 為 美 乎 ? 是 其 日 夜 之 所 息 , 雨 露 之 所 潤 , 非 無 萌 櫱 之 生 焉 , 牛 羊 又 從 而 牧 之 , 是 以 若 彼 濯 濯 也 . 人 見 其 濯 濯 也 , 以 為 未 嘗 有 材 焉 , 此 豈 山 之 性 也 哉 ?
雖 存 乎 人 者 , 豈 無 仁 義 之 心 哉 ? 其 所 以 放 其 良 心 者 , 亦 猶 斧 斤 之 於 木 也 , 旦 旦 而 伐 之 , 可 以 為 美 乎 ? 其 日 夜 之 所 息 , 平 旦 之 氣 , 其 好 惡 與 人 相 近 也 者 幾 希 , 則 其 旦 晝 之 所 為 , 有 梏 亡 之 矣 . 梏 之 反 覆 , 則 其 夜 氣 不 足 以 存 ; 夜 氣 不 足 以 存 , 則 其 違 禽 獸 不 遠 矣 . 人 見 其 禽 獸 也 , 而 以 為 未 嘗 有 才 焉 者 , 是 豈 人 之 情 也 哉 ?
故 苟 得 其 養 , 無 物 不 長 ; 苟 失 其 養 , 無 物 不 消 . 孔 子 曰 : 『 操 則 存 , 舍 則 亡 ; 出 入 無 時 , 莫 知 其 鄉 . 』 惟 心 之 謂 與 ? 」