EMEA APAC 等地域简称

EMEA = Europe, the Middle East and Africa
EMEA是Europe, the Middle East and Africa的缩写,它指的是欧洲、中东和非洲地区。在业务领域,特别是在市场营销和统计等领域,它用来表示地区。

APAC = Asia Pacific
APAC(亚太地区)包括东亚、南亚、东南亚和大洋洲。

BRICs = Brazil、Russia、India、China
也称之为金砖国家,末尾的s可能在缩写时去掉。

其他的地区缩写:

NCSA / AMER / AMS / NALA
The Americas, being North, Central, and South America
美洲,包括北美、中美和南美

NA / NAR(North American Region)
North America, meaning Canada and the United States of America only
北美洲

NORAM
North America, being Canada, the United States of America, and Mexico
加拿大、美国、墨西哥

LATAM / LAC / CALA
Latin America, and the Caribbean
拉丁美洲和加勒比地区

EEMEA
Eastern Europe, Middle East, and Africa
东欧、中东和非洲

MENA
Middle East, and North Africa
中东和北非

Americas
美洲州(南美洲、北美洲、加勒比海地区)

MENAP = Middle East, North Africa, and Pakistan
中东、北非和巴基斯坦

SSA = Sub-Saharan Africa
撒哈拉以南非洲

江ノ島

今日は電車で江ノ島へ行きました。そこの海はとても綺麗で、海岸で長い時間遊びました。帰る時、富士山の後ろの夕焼けが見えました。とても綺麗でした。

We went to Enoshima by train today. The sea there is truly beautiful, and we spent the whole afternoon at the beach. We also saw the sunset behind Mount Fuji; it was truly amazing.

https://www.instagram.com/p/CxWgxc_vPhFWKohlJpwjX4rv6KoKXBLdgIKSRY0/

科学未来館

今日は科学未来館へ行きました。いろいろな体験活動に参加しました。IISはもっと面白い体験ができました。ISS(International Space Station)では食べ物やトイレも見ましたが、とても嬉しかったです。


I went to the Science Future Museum today. I experienced many halls there. The most interesting hall was the ISS hall, where I learned what kind of food they can eat in space and what the toilet looks like. It was a truly enjoyable experience.

少年時代 歌詞

作詞:井上陽水

夏が過ぎ 風あざみ

誰のあこがれに さまよう

青空に残された 私の心は夏模様

夢が覚め 夜の中

永い冬が 窓を閉じて

呼びかけたままで

夢はつまり 想い出のあとさき

夏まつり 宵かがり

胸のたかなりに あわせて

八月は夢花火 私の心は夏模様

目が覚めて 夢のあと

長い影が 夜にのびて

星屑の空へ

夢はつまり 想い出のあとさき

夏が過ぎ 風あざみ

誰のあこがれに さまよう

八月は夢花火 私の心は夏模様

Believer 歌詞

映画「ウルトラマントリガー エピソードZ」主題歌『Believer』

作詞:堀下さゆり
作曲:森元康介

信じよう奇跡を 僕らずっと守っていこう
君に咲いた笑顔を

宇宙(そら)にさ みつけた幾千の星
それぞれに輝いてほら キラリと光る
大事なひとを想いあう気持ちが
誰かの心に届いて 響きあうように

全力前進で 負けそうな時にも
あきらめない願い つないでくれた
君となら

信じよう未来を 僕ら共に描いていこう
希望という光を
暗闇に閉ざされ 明日(あす)が見えなくなりそうでも
絆は揺るがない 仲間(みんな)がいてくれる

本当の強さって一体何だろう
自分の弱さも抱きしめ 足ふみだす勇気
いつでも君は笑っていたよね
優しさは強さだってこと 教えてくれた

絶体絶命で 折れそうな時にも
ぎゅっとかたく結ぶ 離さないで
僕の手を

信じよう奇跡を 僕らずっと守っていこう
君に咲いた笑顔を
壁が立ち塞がり 夢が見えなくなりそうでも
絆は揺るがない 仲間(みんな)がいてくれた

信じよう未来を 僕ら共に描いていこう
希望という光を
暗闇に閉ざされ 明日(あす)が見えなくなりそうでも
絆は揺るがない 僕らは一人じゃない

How to get client ip address in flask

Flask have 3 methods to retrive client IP

1, request.remote_addr

2, request.environ[‘REMOTE_ADDR’]

3, request.environ[‘HTTP_X_FORWARDED_FOR’]

For the first 2 methods request.remote_addr and request.environ['REMOTE_ADDR'], we can use it if the server was directly called by clients.

But if our sevice behind a proxy, we need to look for the “X-Forwarded-For” header for the client IP. Which means we have to use the 3rd method request.environ['HTTP_X_FORWARDED_FOR'] to get the client IP.

Here is the details of the X-Forwarded-For

The X-Forwarded-For (XFF) HTTP header field is a common method for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer.

End;

How MySQL show, grant or revoke user privileges

I wrote this post to memo the basic MySQL commands to show, grant, or revoke user privileges.

Firstly, let’s show all users and hosts of my current MySQL instance by the following command:

mysql> SELECT user,host FROM mysql.user;

+---------------+-----------+
| user          | host      |
+---------------+-----------+
| dbuser1       | %         |
| root          | %         |
| mysql.session | localhost |
| mysql.sys     | localhost |
+---------------+-----------+

1, Show Privileges for a user in MySQL

SHOW GRANTS FOR <username>@<host>;

Also, we can check the permissions for the currently logged in user with:

mysql> SHOW GRANTS;

+----------------+
| Grants for dbuser1@% |
+----------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON *.* TO 'dbuser1'@'%' WITH GRANT OPTION |
+----------------+

3, Revoke privileges for a user in MySQL. Here we take “REPLICATION SLAVE” as an example.

REVOKE REPLICATION SLAVE ON *.* FROM dbuser1;

4, Grant privileges for a user in MySQL

GRANT REPLICATION SLAVE ON *.* TO dbuser1;

End;

make a call 是什么意思

今天和同事讨论了一个问题,需要客户确认,然后他说了一句 

“Let them make a call”

我很疑惑,好像我们没有在讨论要和客户通电话来确定,当我准备问他时,想来还是谷歌一下。

果不其然,Make a call有两个意思:

1,打电话 To call someone, as on a phone or via the Internet.

I have to make a call, so I’m going to step outside for a minute.

How do you make a call on Skype? Can you show me?

2,做决定 To make a decision (about something).

I know that neither option is ideal, but you have to make a call soon.

It’s too much pressure being a doctor. If you don’t make the right call about a patient’s course of treatment, they could end up dead!

由此可见,同事的意思应该是让客户来做决定吧。所以具体是哪个意思还得根据上下文来确定。

AccessDeniedException: 403 Request is prohibited by organization’s policy. vpcServiceControlsUniqueIdentifier

We may be facing this error when performing actions on Google Cloud Platform

AccessDeniedException: 403 Request is prohibited by organization’s policy.
vpcServiceControlsUniqueIdentifier: error_indicator

You could find further information about the error by search the error_indicator in Console Logs

Usually, It was caused by violation of the VPC Service Control rules. For example, you access the resource which is a untrusted project, and you could fix it by adding the untrusted project to your VPC Service Control Perimeter.

The smelling of the air at morning 4 AM

When I was child, my family made most of our income from planting watermelons. My father was really good at planting watermelons and he always can plant the sweetest watermelons to his customers each summer.

At that time, we need to prepare the watermelons in the afternoon before the sale day. After dinner, my father always picks the best watermelon and opens it with a knife. Then, Our whole families sit around it to enjoy the most delicious fruit. Actually we don’t have much money to taste other fruits, but this is the one I most like.

On the sale day, my parents need to get up earlier than normal, because my father needs to drive the truck to the nearest city from our country to sell watermelon and the truck can not go fastly for the fragile goods.

My parents have 3 children. We do not always have the chance to go with them because they are too busy to take care of us while selling the watermelon. It’s also dangerous because our truck is just parked beside the road. But I really love to go with them, then, I can see a totally different world compared to a country. I can see cars because our country didn’t have one at that time. I can get a chance to taste a delicious breakfast.  If I were lucky, I can get a can of Jianlibao(some drink like coca cola). I dreamed of going with my parents to sell our watermelon.

Actually, I have more chances to go with them than my older brother and older sister. Yes, because I’m the youngest and always have that priority to do something.

When I was chosen to go with them before the sale day. I just can not fall asleep easily because I was so excited. 

At 4 AM the next day, I was woken up by my mother. I barely can open my eyes because I’m sleepy, but I still can wear my clothes and climb our truck in a fast and efficient way. When the truck engine starts, It’s just a perfect opening for my journey. My father driving the truck walking through the country road in the dark, I closed my eyes and then took a deep breath. Inhaled a bunch of fresh air to my little exciting body. It was called pleasure then, but for now, I call it happiness.

Today I woke up at 4 AM and I cannot fall asleep any more, so I decided to take a run.  After I went out and walked in the park, I smelled the very familiar air. It brought me back to the sweet memory. My father passed away 4 years ago. I missed him so much.