Saturday, April 6, 2019

最全面、最简单、最有用的养生指南

Here is the link.

护颈椎、养血管、降血压,养生大工程要取得好结果,最要在意日常的小积累,怎么做呢?

1. 这样养颈椎↓

时间
护颈椎要点
备注
7:00
加个披肩或围脖
出门前也别忘了披上一件披肩,抵挡秋风对颈背部的侵袭。
10:00
做个颈椎操
在座位上坐直,先做几个深呼吸放松身体,然后分别做“前后点头”。
19:00
吃个“补肾餐”
中医认为,胡桃、山萸肉、生地、黑芝麻、牛骨等具有补肾髓的功能,可以把这些材料加入到你的晚餐中,以起到强壮筋骨,推迟肾与脊柱蜕变的效果。
21:00
学学大鹏展翅
看电视时,不妨见缝插针地学一学大鹏展翅:双脚分开与肩同宽,然后缓慢地弯腰至90°,两个手臂模仿大鹏飞行一样伸展开。这个动作可以帮你增加颈椎部肌肉的韧性。
23:00
选个好枕头
中间低,两端高的“元宝形”枕头对颈椎有很好的支撑作用,可以让颈椎得到很好的休息。对于颈椎不好的人来说,放弃过度柔软的弹簧床吧,木板床、棕绷床才是最佳的选择。


2. 这样养血管↓

时间
养血管要点
备注
8:00
早餐来杯豆浆
大豆中的的蛋白质是属于优质蛋白质,多不饱和脂肪酸更加丰富,对心血管有益。
10:00
喝杯苦荞茶
经常泡上杯苦荞茶,既补充水分,又有益血管健康。苦荞茶中的硒可以预防血管老化。
12:00
来点血管喜爱的食物
果蔬:每天一斤蔬菜半斤水果;鱼类:每周至少吃一次鱼,可以预防心血管疾病;
膳食纤维:全谷类薯类、蔬菜、水果种都富含膳食纤维。
15:00
一小把坚果
坚果大部分都是不饱和脂肪酸,有利于提高血液中“好”胆固醇,降低“坏”胆固醇。
19:00
饭后百步走
晚饭1个小时后出去走走,对控制血脂很有帮助。最好持续时间40-60分钟左右,让自己微微出汗,能够提高血液循环,避免血栓。

22:00睡前床头放杯水睡前小口喝点温开水,能稀释血液,防止血栓发生。老人最好在床头放一杯水,起夜完厕所后,可以少喝一点补充水分。

3. 这样降血压↓

做法
降血压要点
备注
减少钠盐摄入
腌制、卤制、泡制的食品以及烹饪用盐,应尽量少用;在烹调时尽可能用量具(如盐勺)称量加用的食盐;用替代产品,如代用盐、食醋等
每人每日食盐量逐步降至6g
规律运动
步行、快走、慢跑、游泳、气功、太极拳等可根据自己的爱好灵活选择;量力而行,循序渐进;目标对象为没有严重心血管病的患者。
强度:中等量;每周3~5次;每次持续30分钟左右
合理
膳食
食用油每人<0.5两/日;少吃或不吃肥肉和动物内脏;其它动物性食品不超过1~2两/日;蔬菜每日400~500g,水果100g;蛋类每人每周5个;适量豆制品或鱼类;奶类每日250g
营养均衡
控制体重
减少总的食物摄入量,增加足够的活动量;肥胖者若非药物治疗效果不理想,可考虑辅助用减肥药物
体重指数(kg/m2)<24; 腰围:男性<90cm;女性<85cm
戒烟
一般推荐采用突然戒烟法,在戒烟日完全戒烟;必要时戒烟咨询与戒烟药物结合
彻底戒烟,避免被动吸烟

限制饮酒高血压患者不提倡饮酒;酗酒者逐渐减量每天白酒<1两、葡萄酒<2两、啤酒<5两

4. 这样防痔疮↓

时间
防痔
要点
备注
6:30
起床后一杯水
水是促进肠道蠕动帮助排便的。然后,揉揉肚子!要顺时针按摩小腹,帮助排便。

7:00
蹲马桶不超5分钟
蹲马桶的时候不要玩手机!不要看报纸!这些都会干扰大脑给括约肌发布排便指令。蹲马桶的时间不要超过5分钟。

10:00
奖励自己一个水果
多吃含纤维的食物有助于预防便秘,苹果、梨、西瓜、香蕉都是不错的选择。

12:00
蔬菜配粗粮
蔬菜中也有很多富含纤维素,比如甜菜、西兰花、甘蓝科蔬菜、胡萝卜、绿豆、菠菜、芹菜、茭白、豌豆等。全麦、麦麸等谷类食物也是不错的选择。

15:00
运动有帮助
建议每小时至少活动一下,3-5分钟就行,让括约肌处的静脉血液循环恢复恢复,可以有效减少痔疮的发病率。

18:00
做做提肛操
可以利用零星时间做做提肛动作,促进括约肌处的静脉血液循环。有意识地收缩尿道、阴道、直肠括约肌,然后放松。如此反复50 -100 次,建议每日2-3 遍效果最佳。

21:00
睡前温水坐浴
每天临睡前用温水清洗臀部并坐浴10分钟,有助于此处肿大的静脉收缩,还有止痛、止痒功效。

22:30
准时入睡不熬夜
肠道一般利用晚上休息的这段时间进行润滑工作,吸收营养,排出废物,这样第二天才能顺利排便。所以,保证充足的睡眠,也是预防痔疮的方法之一。


5. 这样护骨↓

时间
护骨
要点
备注
7:00
给膝盖做按摩
平躺在床上,双手从上到下再从下到上揉捏按摩大腿正前方的股四头肌。股四头肌是人体最大最有力的肌肉之一,自我按摩可让肌肉血液循环更好。3~5分钟即可。

11:00
给小腿加加油
建议坐了两三个小时即站起散步十五至二十分钟。还可以坐着时勾勾脚背3~5秒,能改善小腿肿胀。

13:00
给颈椎拉拉筋
坚持多仰望天空,开始的时候可能会感觉酸胀,甚至肩膀和手臂也会感到酸麻,这说明已经有问题了,更需要好好改善。另外,还可以多向左侧、右侧歪歪头或者转转头。

17:00
让双手练套操
先握拳,再用力张开双手,再握拳,接着用力伸出大拇指,再握拳, 用力张开除大拇指之外的四指,主要是为了把手指功能练开,锻炼手上很少用到的肌肉群和韧带。

21:00
给肩膀减负
搓澡耸肩就能轻松。一只手臂内旋从背后由下向上摸背,一只手臂从背后由上向下拉,用毛巾连接两臂,这样搓搓澡。这个动作能很好地活动肩部关节和肌肉,舒缓肩部疲劳。

22:00
给腰椎放假
建议仰卧睡觉或者休息时,可尝试在膝盖腘窝下方垫一个1到2厘米的软枕,这样可帮助腰椎紧贴在床面上,让腰椎回到休息位。腰部肌肉松弛下来,人也会轻松起来④。


6. 这样养胃↓

时间
养胃
要点
备注
7:00
喝杯温开水
早起喝一杯温开水,能清洁消化道、补充夜里身体流失的水分,稀释渐趋浓稠的血液,还有益于早餐的消化吸收,促进排便。不宜喝凉开水,因为早晨是人体阳气生发之时,喝凉水属于“逆势而为”,容易给胃部造成不良刺激。

8:00
早餐吃热食
调查表明,不吃早餐会引发肝胆病、胃病。一份均衡的早餐中应包含谷类、奶类、肉类、豆制品以及水果、蔬菜等几大类食物,每样都吃点,以保证充足的营养。  

9:30
晨练别受寒
冬季晨练要避开雾霾,亲近阳光,“赶迟不赶早”。等阳光明媚、气温上升后,再出门锻炼,运动时做好热身,护好腰腹、关节。

12:00
午饭前喝汤
在食物比较干而唾液分泌不足的情况下,适量的汤水有益于消化和吸收,尤其适合在冬季肠胃“懒惰”时。汤水能够稀释唾液和胃液,但是对肠道消化液的影响很小。

15:00
找老友聊天
不少人生气后一点胃口都没有,原有胃病的还会加重。冬天人的心情容易随气温一起变得低落,多和家人老友聊天,可以让心变暖,胃也会随之暖和起来。 

18:00
晚饭别太饱
晚餐一定要控制在“七八分饱”。每顿少吃一点,两顿正餐之间适量加餐,既保持总量,又不会让胃挨饿。

19:00
站立助消化
胃容易有灼热感(烧心)的人,尽量不要饭后躺着或久坐,否则容易反流到食道,使症状加剧。用餐后半小时以内不要做剧烈运动。


Thursday, April 4, 2019

Case study: weekly contest 112 ranking 164

Here is the profile. I like to write union find algorithm based on the player's submission.


Case study: weekly contest 112 ranking 158

Here is the profile. He solved 1014/ 1015 algorithms. He joined Google.

Case study: weekly contest 112 ranking 156

Here is the profile. I like to look into how the player advances himself and join Microsoft as a junior engineer in 2019.


Can I be a hard working person?

April 4, 2019

Introduction


Honestly I have to push myself very hard in order to be a outstanding programmer. I like to solve another 300 algorithm in next six month. I choose to be hard working person and also I need to learn how to focus on problem solving daily on algorithm.

Learn from a few role models


I studied weekly contest 112 on leetcode 947. I like to share a few role models from top 200 players, so I can motivate myself to work hard.

I do not need to push myself to be one of top players, Googler, who finished over 1000 algorithms.

I need to set up 10 stages in order to solve over 1000 algorithms from 378 solved today.

It is such great learning experience to know those top players. My ranking of contest is 15000, and those top 200 players are usually before top 5000 players.

Ranking 102, leetcode profile. Solved 992/ 1015, global ranking 356/ 90378, intel engineer, Ph.D.

Ranking 117, leetcode profile. Solved 752/ 1015, global ranking 3486/ 90378, JP Morgan Chase, Googler, linkedin profile.

I am interesting in learning that a top programmer can be trained by himself. Good math, good teaching and learning skills.

I like to advance myself ranking, at least let me encourage myself daily. Solve 10 algorithms a week.

Performance improvement


I have to learn how to solve more algorithms first. As a result, I may be able to improve my performance easily. I need to study the performance graph from Ranking 117.


Here are performance comparison.



Last year submission 


I did 959 submission, solved 270 algorithms.
Ranking 117, 1370 submission, estimated algorithm solved in last 12 months: 540 algorithms.

Total submission


I did have 1433 submissions.
Ranking 117, 8810 submissions.

I only had submission from 2015 to April 2018 less than 500 submissions, ranking 117 has 7500 submissions.

I need to find time to solve more algorithms.

Follow up 

Oct. 9, 2019

I solved 52 algorithms from April to Oct 9 2019. My mark is 430 algorithm, back in April 2019, I solved 378 algorithms.

I spent time to work on system design, and took time to work on tree algorithm and graph algorithm, so I slowed down to solve more algorithms.

I need to come out more ideas to track my progress, so that I can be on right track to advance myself in terms of problem solving skills. I like to see my weekly contest performance better, I like to see my post with more upvotes, and I like to see most posts I write to share my experience, how I address my learning process each doubt and concern properly.

To advance career, every one has its own path.

Last 6 months, I spent a lot of hours to study personal finance, investment as well.

Oct. 30, 2019

I just solved the easy level tree algorithm. I solved 450 algorithms today. I did 9 easy level array algorithm from Oct. 21 to Oct. 30.
Here is my 450 mark - a tree algorithm, the link is here.

How to save time to work on the important project?

April 4, 2019

Introduction


It is my short research. How to save time to work on the important project? I was so busy starting from Nov. 2018, I worked on personal finance research, I extracted three molar teeth, I worked on my hay fever second year. I had to push myself to learn how to be a good software programmer in the world.

How to save time?


I need to save time to work on the important project. I need to learn from so many videos, books, articles in order to learn how to be a frugal personal, minimalism, and also learn how to control my expenses, live under my means.

I do not have time for the study every day.

More important project


I need to keep the habit to challenge myself using algorithm problem solving daily.

Solve another 300 Leetcode algorithms?

April 4, 2019

Introduction


It is my choice to live an easy life from Nov. 2018, and I can spend time to continue to do personal finance research. Or I can push myself to solve another 300 Leetcode algorithms, and also advance my ranking on weekly contest, learn from more top players.

Solve another 300 algorithms


I know that it is hard for me to push myself to solve problems. I like to learn to control things I can control, and let go those things I cannot control.

This March I could not pass online code screen. It is the biggest alarm and I like to push myself hard. In order to achieve the goal, I can control how many algorithms I think and work on in daily basis. I can control how I should catch up algorithms in weekly contest.

I was too busy


I finally had time to work on weekly contest 112 algorithm 947 remove stones. I played the contest in Nov. 2017, but I did not write the algorithm 947, and I did not have time to study the algorithm at all. After more than 4 months, I finally spent time to work on the algorithm.


Case study: Why it is hard to go over top 200 players on weekly contest 112 on graph algorithm

April 4, 2019

Introduction


It is such great learning experience. I spent last two weeks to work on union find algorithm, graph algorithm. Most of time I worked on the same algorithm from weekly contest 112. I like to write a case study on learning experience.

Case study


A few goals are set up for me to work on.

1. Work on weekly contest ranking.
2. Find top players and learn from those players from their code and experience.
3. Learn how to write union find algorithm, ranking, size, find, path compression, time complexity etc.
4. Learn how to hack a solution using just partial code of union find
5. Learn how to rewrite union find algorithm using C#
6. Time my practice, debug skills, and my emotions related to learning, troubleshooting and understanding
7. Learn to push myself to learn algorithms through weekly contest top players
8. How to solve the problem in less than 10 minutes?
9. How to solve the problem in less than 30 minutes?
10. How to solve the problem in less than 45 minutes?
11. Learn all kinds of solution, prepare to give to interviewees on interviewing.io
12. Figure out what are my weakness compared to those top players

Difference between 2019 and 2015 - 2017


2015 - 2017
The first two years I was a rookie on Leetcode.com. I did not know there are so many discussion on discuss panel. I always searched Google.com and then found some Chinese student and learned from their sharing.

2019
After more than 30 contests, I figured out how to read top players' code and learn from them. I did find out so many ideas to solve an algorithm. It is a lot of hard work since I have to learn from 200 players who scored all algorithms in weekly contest 112.

I need to learn how to shorten the time to learn more players. Right now, I did find out that my debugging and analytical skills could not catch up.

Union find algorithm



It is interesting journey to practice union find algorithm last two weeks. I worked on Leetcode 685, 720, 130 first, and then I came cross those algorithms I missed in weekly contest.

I chose to work on one of weekly contest 112 Leetcode 749, and then I started the journey to play with so many ideas related to union find implementation.

The code written in the contest usually are short and is very easy to follow. But I still spent more time than I expected.




Case study: Union find algorithm study code - ranking 176

April 4, 2019

Introduction


It is my study time to go over those union find algorithm from top ranking 100 to 200 in weekly contest 112 on Leetcode.com. I like to write a case study on my learning of player 176.

Case study


I chose to write a C# code based on player ranking 176. I wrote C# code but I found out the code could not pass online judge.

It is good thing since I can learn how to trouble shooting the problem. I could not pinpoint the bug, so I continued to study more about union find algorithm.

After more than one hour study, I found the bug. I submitted the code, here is my C# code.

I also learned how to write a path compression function using iterative solution. I learned from the website of lecture note.

Iterative way path compression


I also like to continue to learn.

Buggy code 


It took me more than one hour to find the bug. I spent time to write down each step of union, and then figure out why there are two trees in test case 1. One of reasons is that Parent member should be private, so that it can not be accessed directly, only available for function Find.

Rule No. 1
Only work on root of tree in union find. Connect one root as another root's child. Do not confuse the parent node with root node.

Wednesday, April 3, 2019

9 Ways to Avoid Lifestyle Inflation – Spending Less When You Earn More

Here is the link.


The Secret Reason You are Poor - Lifestyle Inflation - The Cost of Living

Here is the link.

9 Things You Should NEVER Do With Your Money

Here is the link.

1. Custom house
2. Sit around $$
3. Spending $ you don't have
4. Dumb investments
5. Actual gambling
6. Living above means
7. Buying on margin
8. Not saving for emergency
9. Credit early




Case study: Comparison of union find algorithms experience

April 3, 2019

Introduction


I like to compare the experience I had on union find algorithms. It is my short research and I like to figure out what I can do in order to master the algorithm.


Comparison study


I like to compare three experience I have so far.

Case 1: Experience on Hackerrank

I worked on union find algorithms again and again on contests, I got over 10 medals. Most of time I had to work on graph algorithm. I applied union find algorithm to solve a few algorithms from 2016 to 2017.

Case 2: 100 minutes work with my ex-coach

I also hired a private coach who gave me a session on union find algorithm. I paid 100 Canadian dollar for 100 minutes session. 10 session I paid $1000 Canadian dollars in less than two weeks.

Case 3: Study top 50 player's submission on Leetcode 947 stones removed on weekly contest 112.

I spent time to study all top 50 player's submission on the algorithm, I learned a few union find algorithm. I spent time to write C# code.

Case 4: Study ranking from 100 to 200 players, I wrote a case study here.





6 Reasons Why You're Broke

Here is the link.

1. Not investing - inflation 2-3%
2. behind on credit cards
3. Stupid loans - car loan, $30,000 car loan if you make $30,000 dollars a year
4. Happiness > finances
5. Too much housing
6. Not tracking expenses


Case study: 2000 August I cried since online gaming was moving to Las Vegas

April 3, 2019

Introduction


It is my personal finance research. I like to go over a few case studies and like to look into how I was a problem solver back in 2000.

Case study


I cried for a few times since I had to move with one small team to Las Vegas while other stayed in Boca Raton as a second branch.


How to Invest in the Stock Market for Beginners

Here is the link.

How to invest in the stock market for beginners

- Buy safe stocks (>80%)
 Coca cola, Bank, Etf's
- Stay away from spec, tech, comm.
- get dividends & reinvest
- buy when every one else is selling
- pay attention to the news
- don't invest less than $500 at a time


Leetcode 947 remove stones - practice 7

April 3, 2019

Introduction


It is my 7th practice. I chose to study code from weekly contest 112 top 58th player's code. I like to learn how to write simple depth first search algorithm to solve the problem.

My practice


Here is my C# practice.


Leetcode 947 remove stones - practice 6

April 3, 2019


Introduction


It is my sixth practice. I like to learn how to write a union find algorithm with a good design of rank feature.

My practice


Here is my C# code based on weekly contest 112 ranking No. 13 player.


Leetcode 947 remove stones - practice 5

April 3, 2019

Introduction


It is my fifth practice. I chose to learn how to write a union find algorithm including ranking feature based on ranking No. 12 player of weekly contest 112.

My practice


Here is my C# practice.


Leetcode 947 remove stones - practice 4

April 3, 2019

Introduction


It is my practice to master the algorithm, I choose to study various solution based on weekly contest top 50 players on weekly contest 112. The current practice is based on ranking No. 40.

My practice 


Here is the practice. The union find algorithm is implemented using Size of disjoint set as well.


Tuesday, April 2, 2019

Stock Market Crashing!!! Our Rules for Investing

Here is the link.

0:40/ 7:58
Rule #1:
Diversify your total portfolio

Rule #2:
Don't panic when the stock market fluctuates

Market corrections are common. Historically, stock market drops have not been permanent.
Every year there is fluctuation, around 13%.

Rule #3:
Historically, the stock market has always rebounded.

KEY: Invest Long Term.
Don't invest money that you'll need right away/ in an emergency

Rule #4:
Don't watch daily news on how your stocks are doing.


Rule #5:
Don't fall for the "buy-high, sell-low" trap.

Panic sale - selling low
Emotional sale and purchase

Rule #6:
Understand that everyone has their own opinion.

Rule #7:
Make our money work.

Rule #8:
Paper loss isn't a real loss ...
unless you sell.




Achieving Financial Independence in a Consumer Culture

Here is the link.

Comparison study

April 2, 2019

Introduction


It is challenging for me to find time to practice graph algorithm. I played weekly contest starting from Sept. 2018, but I did not have time to study the graph algorithm in weekly contest 112 Nov 2018 until today.

Learning challenging 


I chose to study one of union find algorithm written by a top player ranking No. 13 on weekly contest 112. Here is the blog.

I like to compare two players and see what is the reason I could not push myself hard.




Actionable Items


I think that it is a good idea for me to work on more Leetcode algorithms. I may be able to solve 100 to 300 algorithm in next three months.



947. Most Stones Removed with Same Row or Column (Practice 3)

April 2, 2019

Introduction


It is the graph algorithm. What I did is to practice the idea from weekly 112 contest top player's submission.

My practice


Here is my practice. I need to fix one bug in the code.


947. Most Stones Removed with Same Row or Column (Practice 2)

April 2, 2019

Introduction


It is the graph algorithm. What I did is to study one of top player's code in weekly contest 112, and then I wrote a C# solution as well.

My practice


Here is my discussion link.


947. Most Stones Removed with Same Row or Column (Practice 1)

April 2, 2019

Introduction


It is my algorithm practice on union join algorithm. I chose to work on the algorithm in weekly contest 112. I chose to study a few top player's submissions, and then write C# code.

My practice


Here is one of my practice, I chose to write the solution and shared my tips using title:
C# Use partial of union find algorithm to solve the problem

Reaching Financial Independence: See Our Ten Stages

Here is the link.

1:47/ 12:01
Financial independent number - FIN number
How to calculate the number?
Annual expenses X 25 = Financial Independence

2:00/ 12:01
Using stock portfolio as an example

4% rule - 7% stock return.

10 Stages

1. Stage 1       < $0
2. Stage 2       = $0
3. Stage 3        > $1
4. Stage 4         $10,000
5. Stage 5         $50,000
6. Stage 6         10% FY number
7. Stage 7         25%
8. Stage 8         50%
9. Stage 9         75% FY number  (double 7 years)
10. Stage 10    100%

63 Practical Ways to Live a Frugal Life without Looking Like a Cheapskate

Here is the link.

Monday, April 1, 2019

30部必读的投资学经典书籍

Here is the link.

 全书名 《聪明的投资者》(The Intelligent Investor: A Book of Practical Counsel)又译作《智慧型股票投资 人》

全书名 《金融炼金术》(The Alchemy of Finance) 被誉为:投资者的投资指南,金融市场两部永恒的指导手册之一 被誉为
乔治·索罗斯这位金融奇才,堪称目前全球最具实力且获利最高的投资人,他的《金融炼金术》一书被 公众当成投资指南。

 全书名 《漫步华尔街:股市历久弥新的成功投资策略》(A Random Walk Down Wall Street) 被誉为:70年代至今世界股票投资界最畅销的好书,亚马逊评为2001年度的最佳畅销书籍,美国 MBA 学 被誉为 生的必读教学参考书籍。

全书名 《克罗谈投资策略: 神奇的墨菲法则》(Kroll on Profitable Investment Strategies)
《克罗谈投资策略》是作者的第六本专著。

全书名 《克罗谈投资策略: 神奇的墨菲法则》(Kroll on Profitable Investment Strategies)
《克罗谈投资策略》是作者的第六本专著。

书名 《怎样选择成长股》(Common Stocks and Uncommon Profits)
本书作者广受美国华尔街推崇和敬重,是最具影响力的投资专家之一他的投资哲学约四十年前提出, 今天,不只金融专业人士仍详加研读并付诸实践,而且被许多人奉为投资理财方面的经典之作。

The Little Money Bible - Stuart Wilde

8 minutes book review. Here is the link.


Top 20 Habits of Highly Wealthy & Successful People

Here is the link.


Train Your Brain To Make More Money

Here is the link.

Like a garden, you need to take away the weeds. You need to remove the piece of software without your permission.


13 Things To Avoid If You Want To Become Rich

Here is the link.

1. The blame ego 2. The know it all ego 3. The fearful ego 4. The comfort zone ego 5. The judgemental ego 6. The excuses ego 7. The people pleasing ego 8. The justification ego 9. The jealous ego 10. The fake ego 11. The shy ego 12. The other people's opinions ego 13. The do it yourself ego