Monday, December 19, 2022

Lyrics about destiny , karma and sin .陳健安 On Chan - 《在錯誤的宇宙尋找愛》

意外聽到一首2019的歌,看了MV和歌詞,就喜歡上了。 
這種帶點宗教宿命色彩的詞總是很吸引我。
超脫得很浪漫。

詞: 黃偉文 曲: 馮穎琪

編/:謝國維 意識一早超脫 情愛這東西 越過了天地 並未眷戀螻蟻 沒有光陰跟遠近 我是叢電波 破天際 但你的召喚 讓我將功德放低 為你呱呱出世 回到這身體 自降四千等 為覓人類一吻 作謝禮 誰話愛戀 苦海濟世 會創造奇蹟 將蒼生撫慰 被你吸引 讓我當初失智慧 這宇宙 這種深情根本虛構 失了足 才會跌落你的地球 目光遠大如我 你有限維度裡 看春秋 很後悔 但愛死方會得救 為了找到真愛 尋遍每粒沙 住進你的家 就為明白這叫 錯誤嗎 求做對簡單的愛侶 與你歷其境 方知多可怕 沒法擺脫 俗套的分手戲碼 這宇宙 這種深情根本虛構 失了足 才會跌落你的地球 上天已難回去 我似被囚在你 那春秋 不恨你 恨我太晚參透 親手作孽 惡果他人怎可解救 貪怨癡 要葬在你的地球 為了擁抱你 換這雙手 一早已 被切去兩翼 禁飛走 這樣勇 試問你可能夠 自絕位列仙班 都不算太內疚 但愛到欠自我 我笑我下流 這宇宙 這種深情根本虛構 失了足 才會跌入你的溫柔 在你的結界 盪過韆鞦 我便無力 再看北斗 不恨你 恨我的反抗不夠 我的愛全被接收 必須再重頭禪修 練到清心寡愛 無懼色誘

Tuesday, December 6, 2022

MySQL database : Double type Numeric value out of range issue

 That was a really silly mistake I made due to not reading the manual ...


I want to save numeric value with 1 decimal point . i.e. : 2.0 , 1.5 , 1.0 , 0.5 and 0.0 .

The datatype was set as double (1,1) . After test, I found out that I never able to save value bigger than or equal to 1.0  . The maximum number I saved with options (2.0 , 1.5 , 1.0 , 0.5 , 0.0) is 0.5
instead of 2.0 .

I checked through the program codes and try to figure out the error in calculation related functions.


However the answer is about the database datatype. 

Double (1,1) in MySQL never able to save number bigger than or equal to 1. 

This setting doesn't mean 1number and 1 decimal point. It means the entire number has 1 digit ONLY.

Quoted from official document as below : 

DOUBLE[(M,D)]

Here, (M,D) means that values can be stored with up to M digits in total, of which 

D digits may be after the decimal point

Double (1,1) means totally ONE digit , and ONE digit follows decimal point. The only digit is assigned decimal part , so I never able to save value before decimal point.

After I set datatype to Double (2,1) , issue resolved. 


Just a diary to remind myself to read manual .




Quoted from official : 

As of MySQL 8.0.17, the nonstandard FLOAT(M,D) and DOUBLE(M,D) syntax is deprecated and you should expect support for it to be removed in a future version of MySQL.

Next year SF migration plan : moving out customer account to AWS , and call SF data with service account

 👀 The most challenging part is about those function with user verification. My service cloud with MIAW chat , nearly redo due to the user ...