2019年8月15日 星期四

英文歌詞翻譯 Lauv - f*ck, i'm lonely (with Anne-Marie)




[Verse 1: Lauv]

I call you one time, two time, three time
我一遍兩遍三遍地打給你
I  can't wait no more
我再也等不下去
Your  fingers through my hair, that's on my mind
你手指穿過我頭髮的記憶仍在我心頭
I know it's been a minute since you walked right through that door
我知道從你走出門已過了一分鐘
But I still think about you all the time
但我仍然無時無刻在想妳

[Pre-Chorus: Lauv]
I  don't know, I don't know
不知道,不知道
How  I'm gonna make it out
我該如何熬過
I don't know, I don't know
不知道,不知道
Now  you got me sayin'
你讓我說出了

[Chorus: Lauv]
Fuck, I'm lonely, I'm lonely, I'm lonely as Fuck
X!!我好寂寞,好寂寞,寂寞得像X!!
come hold me, come hold me, come hold me
過來抱我,過來抱我,過來抱我
It's been me, myself, and why did you go, did you go?
這裡只剩我了,為何你還是要走,還是要走?
Oh,  fuck, I'm lonely, I'm lonely, I'm lonely, lonely, I
喔...X!!我好寂寞,好寂寞,寂寞得像X!!

[Verse 2: Anne-Marie]
Yeah, I still watch the shows you showed me
我依然在看你給看的節目
I still drink that wine
我依然喝著酒
But these days it tastes more bitter than sweet, hmm
但這些日子似乎不甜反而更苦了
And all my friends are way too drunk to save me from my phone
我的朋友都醉倒了以致無法阻止我打給你
So sorry if I say some things I mean
非常抱歉如果我講了不好的話

[Pre-Chorus: Anne-Marie & Lauv]
I don't know, I don't know
不知道,不知道
How I'm gonna make it out
我該如何熬過
I don't know, I don't know
不知道,不知道
Now you got me sayin'
你讓我說出了

[Chorus: Anne Marie & Lauv, Anne-Marie]
Fuck, I'm lonely, I'm lonely, I'm lonely as Fuck
X!!我好寂寞,好寂寞,寂寞得像X!!
come hold me, come hold me, come hold me
過來抱我,過來抱我,過來抱我
It's been me, myself, and why did you go, did you go?
這裡只剩我了,為何你還是要走,還是要走?
Oh, fuck, I'm lonely, I'm lonely, I'm lonely, lonely, I
喔...X!!我好寂寞,好寂寞,寂寞得像X!!

[Bridge: Lauv with Anne-Marie, Anne-Marie]
I miss those nights when you would come over
我想念那些你會過來的夜晚
Spent all night just tryna get closer
花了一整個晚上只為了讓彼此更親密
That was June and now it's October
那時是6月,但現在已是10月
I don't want, don't want to get over
我不想,我不想結束

I miss those nights when you would come over
我想念那些你會過來的夜晚
Spent all night just tryna get closer
花了一整個晚上只為了讓彼此更親密
That was June and now it's October
那時是6月,但現在已是10月
I don't want, don't want to get over you
我不想,我不想忘記你
Oh, get over you (Oh)
忘記你...

[Chorus: Lauv & Anne-Marie, Lauv]
Fuck, I'm lonely, I'm lonely, I'm lonely as Fuck
X!!我好寂寞,好寂寞,寂寞得像X!!
come hold me, come hold me, come hold me
過來抱我,過來抱我,過來抱我
It's been me, myself, and why did you go, did you go?
這裡只剩我了,為何你還是要走,還是要走?
Oh, fuck, I'm lonely, I'm lonely, I'm lonely, lonely
喔...X!!我好寂寞,好寂寞,寂寞得像X!!

[Outro: Lauv & Anne-Marie, Lauv]
I miss those nights when you would come over (Yeah)
我想念那些你會過來的夜晚
Spent all night just tryna get closer
花了一整個晚上只為了讓彼此更親密
That was June and now it's October
那時是6月,但現在已是10月
I don't want, don't want to get over
我不想,我不想結束
I miss those nights when you would come over
我想念那些你會過來的夜晚
Spent all night just tryna get closer
花了一整個晚上只為了讓彼此更親密
That was June and now it's October
那時是6月,但現在已是10月
I don't want, don't want to get over you
我不想,我不想忘記你

(Hmm, hmm)

2019年7月23日 星期二

MySQL 備份

備份 MySQL


備份單一資料庫
mysqldump -u root -p database_name > backup.sql
備份多個資料庫
mysqldump -u root -p --databases db1 db2 > backup.sql
備份全部資料庫
mysqldump -u root -p --all-databases > backup.sql
備份單一資料表
mysqldump -u root -p database_name table_name > backup.sql
備份多個資料表
mysqldump -u root -p database_name table1 table2 > backup.sql
備份資料庫除了特定資料表
mysqldump -u root -p database --ignore-table=database.table1 > database.sql


導入 MySQL


導入單一資料庫
mysql -u root -p database_name < backup.sql
導入多個資料庫
mysql -u root -p < backup.sql

2019年7月9日 星期二

英文歌詞翻譯 OneRepublic - Start Again ft. Logic



Can't I just turn back the clock?
能否讓我就這樣倒轉時間
Forgive my sins
赦免我的罪孽
I just wanna roll my sleeves up
我只想捲起袖子
And start again
重新一遍
I know that I messed it up
我知道我搞砸了
Time and time again
一次又一次
I just wanna roll my sleeves up
我只想捲起袖子
And start again
重新一遍

I was switchin' up the lanes
我曾嘗試不同的路
Steppin' out the frame I'm in
離開原本的圈子
I was pulling on the reins
重新掌握自己 (註一)
Sick of all the same happenin'
厭倦一成不變的人生
I swear I was looking for disaster mixed with a bottle of gin
我認真地希望一場災難能毀滅一切
And just because I come home after
因為即使我回來
Doesn't mean you'll take me in
也不代表你會接受我

You see my world is spinning like there's nothing to know
你目睹我的世界旋轉著就像沒有東西可以認知
You see my world is feeling like it just might explode
你目睹我的世界瀕臨爆炸邊緣
And yes I know it's hard to take it backwards from my mind
對, 我知道一切很難挽回 (註二)
I need to get a ride, need to see some light come in
我需要去兜風喘口氣

Feelin' like maybe I'm unappreciated
就像我不再受你歡迎
Like my presence in your life has been alleviated
就像我的存在對你來說已不再重要 (註三)
I feel like everything I've done before is different now
就像我留下的痕跡已逐漸消逝
But I can see clearer than ever from a distance now
但我現在能看清楚了因為這距離
Every day I do it, I been goin' through it
我每天都想挽回一切
But you never knew it 'cause I never showed you
但你不會知道,因為我不會表現出來
You gave me the world, so I feel I owed you
你曾經給了我全世界,所以我覺得我虧欠你
I been lookin' through the mirror and that's the old you
我看著鏡子卻出現曾經的你
I'ma get it right now, don't know how
我想我知道了,只是不知道如何挽回
But I promise that we're gonna make it somehow
但我承諾我們一定能回到當初
I'm all in, it's from the heart again
我會再次從心底付出我的所有
Open up your mind and maybe we could start again
你是否能敞寬心扉讓我們重新一遍


註解
  1. reins : 韁繩
  2. take it backwards : = have it backwards = get it backwards
  3. alleviated : 緩解

MySQL with "localhost"

前言

     移植(複製)系統後,新系統很慢

     事情是這樣的,公司成立分部,鑑於前輩們 (都走了) 建的系統很好用

     公司讓我去建一個到分部,我心裡 OS : 複製貼上我最會 !!

     一切都很順利,安裝  PHP 然後 Hello World ~~

     安裝 Mysql 匯出匯入,會 Google 的都會,直到我開啟系統...好慢...

檢查步驟 1 : 打開"開發者人員選項"


     不急不慌先怪硬體...,開玩笑的...請按 F12

     開了 F12 就發現 Hello World 很快,但系統很慢...

     再仔細觀察發現連結資料庫特很慢 ( 圖檔很快 )


檢查步驟 2 : 檢查 Mysql 


     我第一個想法,我要去優化前輩們的 SQL,結果大概是 2.2 秒 變 2 秒...

檢查步驟 3 : Google it !!


     Google 結果發現問題出在 localhost 身上

     當你連結資料庫時,hostname = "localhost",此時 Server 會找 localhost 所對應的 IP 位置

     只要你沒特別將 localhost 導向 127.0.0.1,那就會找 ::1,IPv6 裡的主機本身

     鑒於 Mysql 並沒設定開啟 IPv6 所以你就只能等,等 Server 用 ::1發現不行才會換 127.0.0.1

     造成連結資料庫特很慢的結果。

解決辦法

     解決辦法有 3 種

     1. 把系統裡的 hostname 通通從 localhost 改成 127.0.0.1

          如果你前輩有先見之明,它會是全域參數,改一下就好

          若不是...見一個改一個...

     2. 設定主機的 localhost 讓其導向 127.0.0.1 

          這我不會,附上參考資料
          http://iamshowp.blogspot.com/2010/05/127001localhostipv6.html

     3. Enable Mysql IPv6 

          這最簡單,最推薦

          修改 config
[mysqld]
bind_address = 127.0.0.1,::1
重啟 MySQL (windows指令)
net stop mysql
net start mysql

參考資料 : https://dev.mysql.com/doc/refman/5.5/en/ipv6-local-connections.html

2019年5月19日 星期日

IE CSS 失效

CSS 在 IE 瀏覽器下失效

在網站開發時,總會發現 IE 瀏覽器跟別人不太一樣
最常出事就是 CSS,CSS 在 IE 瀏覽器下失效
提供幾個從 stackoverflow 找的方法能影響下面

Do not code CSS on the HTML file

    這裡應該是指 CSS Code 有很多 HTML Code 不一樣,舉個最常出現的例子就是註解。
 <style type ="text/css"> 
  <!-- You need this in order to have CSS, it has --> 
  p {color: blue; font-family:arial;}
 </style>
    沒意外上面這段註解會失效,且很可能影響下面的程式碼

Make a separate CSfile and link to it

 <link rel="stylesheet" href="css/style.css">

Always add <!DOCTYPE> tag to every HTML page

    其中最有效的就是第三點,在每個 HTML 頁面開頭都要加上所謂的 DOCTYPE 「文件類型」,DOCTYPE 的功能主要是標準化網頁,如果沒有這個 Tag,瀏覽器會依照自己的意思去解釋,而其中 IE 最怪,所以常常失效!

請把指定版本的<meta>放在第一位

    原話 : Make <meta http-equiv="X-UA-Compatible" content="IE=edge">, is the first <meta> tag on your page, otherwise IE may not respect it     上面這個指定 IE 用 Edge 去讀取這段 Code,不放第一個還真的會失效,你可以用 F12 去檢查當前瀏覽頁面用的 IE 版本,如果你沒有指定 DOCTYPE,不意外會變成 IE5,很慘的...

參考資料 :
1. https://stackoverflow.com/questions/595768/css-not-working-in-ie
2. http://www.flycan.com/article/css/html-doctype-97.html
3. http://www.webpage.idv.tw/maillist/maillist4/new/02/02.htm
4. https://www.itread01.com/p/648379.html
5. https://stackoverflow.com/questions/25557299/internet-explorer-11-disable-display-intranet-sites-in-compatibility-view-via

JS 日期操作

JavaScipt 日期操作


  1. 宣告
  2. var now = new Date();
    var targetDate = new Date("2018/11/24");
    
    // IE 要注意的地方,IE date 格式為 yyyy/mm/dd
    var somedate = "2019-5-17";
    var targetDate = new Date(somedate.replace("-","/"));

    * 不照IE格式會顯示 NaN-NaN-NaN ().(更多參考資訊)

  3. 加減、指定數值
  4. var mydate = new Date("2018/11/24");
    mydate.setFullYear(mydate.getFullYear()+1); // FullYear 為西元4碼
    mydate.setMonth(mydate.getMonth()+1);       // Month 為 0 ~ 11
    mydate.setDate(mydate.getDate()+1);         // Date 為 1 ~ 31

參考資料 :
1. http://www.ucamc.com/e-learning/javascript/265-javascript-set-date-function.html
2. https://dotblogs.com.tw/tiffany/2012/05/16/72207

2019年5月3日 星期五

PHP 日期加減

PHP 日期加減
1. mktime()
$date1 = date ("Y-m-d H:i:s" , mktime(date('H'), date('i'), date('s'), date('m'), date('d')-1, date('Y'))); 
$date2 = date ("Y-m-d H:i:s" , mktime(date('H'), date('i'), date('s'), date('m'), date('d'), date('Y')));
2. strtotime()
$today = '2013-04-19';
echo date("Y-m-d", strtotime($today."+3 year"));
echo date("Y-m-d", strtotime($today."-1 month"));
echo date("Y-m-d", strtotime($today."+10 week"));
echo date("Y-m-d", strtotime($today."+10 day"));
echo date("Y-m-d", strtotime($today."+2 hour"));
echo date("Y-m-d", strtotime($today."+20 minute"));
echo date("Y-m-d", strtotime($today."+5 seconds"));
echo date("Y-m-d", strtotime($today."+1 day 5 seconds"));
echo date("Y-m-d", strtotime($today."+1 week -2 day"));


參考資料 :
http://blog.twbryce.com/strtotime-method/

Popular Posts