-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1662 lines (1012 loc) · 96.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html class="theme-next use-motion ">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=0.4.5.2" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT, Sphenginx" />
<link rel="alternate" href="/atom.xml" title="崔叔隐世记" type="application/atom+xml" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=0.4.5.2" />
<meta name="description" content="认真生活,开心工作!">
<meta property="og:type" content="website">
<meta property="og:title" content="崔叔隐世记">
<meta property="og:url" content="http://sphenginx.github.io/index.html">
<meta property="og:site_name" content="崔叔隐世记">
<meta property="og:description" content="认真生活,开心工作!">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="崔叔隐世记">
<meta name="twitter:description" content="认真生活,开心工作!">
<script type="text/javascript" id="hexo.configuration">
var CONFIG = {
scheme: 'Mist',
sidebar: 'post',
motion: true
};
</script>
<title> 崔叔隐世记 </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<!--[if lte IE 8]>
<div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;margin:0 auto;'>
<a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
<img src="http://7u2nvr.com1.z0.glb.clouddn.com/picouterie.jpg" border="0" height="42" width="820"
alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today or use other browser ,like chrome firefox safari."
style='margin-left:auto;margin-right:auto;display: block;'/>
</a>
</div>
<![endif]-->
<div class="container one-column
page-home
">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">崔叔隐世记</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle">独立之精神, 自由之思想!</p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
<nav class="site-nav">
<ul id="menu" class="menu ">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-home fa-fw"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories" rel="section">
<i class="menu-item-icon fa fa-th fa-fw"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about" rel="section">
<i class="menu-item-icon fa fa-user fa-fw"></i> <br />
关于
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
标签
</a>
</li>
<li class="menu-item menu-item-commonweal">
<a href="/404.html" rel="section">
<i class="menu-item-icon fa fa-heartbeat fa-fw"></i> <br />
公益404
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div id="content" class="content">
<section id="posts" class="posts-expand">
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/12/13/mysql-polygon/" itemprop="url">
MySQL 判断点是否在指定多边形区域内
</a>
</h1>
<div class="post-meta">
<span class="post-time">
发表于
<time itemprop="dateCreated" datetime="2017-12-13T20:03:01+08:00" content="2017-12-13">
2017-12-13
</time>
</span>
<span class="post-category" >
| 分类于
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/日薪越亿/" itemprop="url" rel="index">
<span itemprop="name">日薪越亿</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/12/13/mysql-polygon/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/12/13/mysql-polygon/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body">
<span itemprop="articleBody">
<p>近期接了个 <code>网格区域管理</code> 的需求, 具体实现为: 首先建立几个百度地图的坐标点, 其次可以在百度地图上画一个多边形,把需要的坐标点圈在多边形里面。 本文将介绍使用mysql判断点是否在指定多边形区域内的方法,提供完整流程。</p>
<h2 id="u521B_u5EFA_u6D4B_u8BD5_u8868"><a href="#u521B_u5EFA_u6D4B_u8BD5_u8868" class="headerlink" title="创建测试表"></a>创建测试表</h2><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="operator"><span class="keyword">CREATE</span> <span class="keyword">TABLE</span> <span class="string">`zone`</span> (</span><br><span class="line"> <span class="string">`id`</span> <span class="built_in">int</span>(<span class="number">10</span>) <span class="keyword">unsigned</span> <span class="keyword">NOT</span> <span class="literal">NULL</span> AUTO_INCREMENT,</span><br><span class="line"> <span class="string">`polygongeo`</span> <span class="built_in">text</span> <span class="keyword">NOT</span> <span class="literal">NULL</span>,</span><br><span class="line"> PRIMARY <span class="keyword">KEY</span> (<span class="string">`id`</span>)</span><br><span class="line">) <span class="keyword">ENGINE</span>=MYISAM <span class="keyword">DEFAULT</span> <span class="keyword">CHARSET</span>=utf8;</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>注意:空间索引只能在存储引擎为MYISAM的表中创建(MySQL5.7版本以上可以用Innodb引擎)</p>
</blockquote>
<h2 id="u63D2_u5165_u591A_u8FB9_u5F62_u6570_u636E"><a href="#u63D2_u5165_u591A_u8FB9_u5F62_u6570_u636E" class="headerlink" title="插入多边形数据"></a>插入多边形数据</h2><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="operator"><span class="keyword">insert</span> <span class="keyword">into</span> zone(polygongeo) <span class="keyword">values</span>(<span class="string">'POLYGON((1 1,1 5,5 5,5 1,1 1))'</span>);</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>注意:<code>polygongeo</code>包含的点必须是个闭环(第一个点 和 最后一个点必须一致) </p>
</blockquote>
<h2 id="u5224_u65AD_u70B9_u662F_u5426_u5728_u591A_u8FB9_u5F62_u533A_u57DF"><a href="#u5224_u65AD_u70B9_u662F_u5426_u5728_u591A_u8FB9_u5F62_u533A_u57DF" class="headerlink" title="判断点是否在多边形区域"></a>判断点是否在多边形区域</h2><h3 id="u6D4B_u8BD5_POINT_283_2C_4_29"><a href="#u6D4B_u8BD5_POINT_283_2C_4_29" class="headerlink" title="测试 POINT(3, 4)"></a>测试 POINT(3, 4)</h3><blockquote>
<p><code>where</code> 查询可以用 <code>MBRWithin</code> 或者 <code>MBRCONTAINS</code>(参数位置交换)</p>
</blockquote>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="operator"><span class="keyword">select</span> AsText(polygongeo) <span class="keyword">from</span> zone <span class="keyword">where</span> MBRWithin(POLYGONFROMTEXT(<span class="string">'POINT(3 4)'</span>), GEOMFROMTEXT(polygongeo));</span></span><br></pre></td></tr></table></figure>
<p>输出: POLYGON((1 1,1 5,5 5,5 1,1 1))<br>表示点 POINT(3, 4) 在多边形区域内 </p>
<h3 id="u6D4B_u8BD5_POINT_286_2C_1_29"><a href="#u6D4B_u8BD5_POINT_286_2C_1_29" class="headerlink" title="测试 POINT(6, 1)"></a>测试 POINT(6, 1)</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="operator"><span class="keyword">select</span> AsText(polygongeo) <span class="keyword">from</span> zone <span class="keyword">where</span> MBRWithin(POLYGONFROMTEXT(<span class="string">'POINT(6 1)'</span>), GEOMFROMTEXT(polygongeo));</span></span><br></pre></td></tr></table></figure>
<p>输出: 空<br>表示点 POINT(6, 1) 在多边形区域外 </p>
<h2 id="u53C2_u8003_u8D44_u6599"><a href="#u53C2_u8003_u8D44_u6599" class="headerlink" title="参考资料"></a>参考资料</h2><ul>
<li><ol>
<li><a href="http://blog.csdn.net/fdipzone/article/details/53896842" target="_blank" rel="external">mysql 判断点是否在指定多边形区域内</a> </li>
</ol>
</li>
<li><ol>
<li><a href="http://www.voidcn.com/article/p-wpvigmsq-bkg.html" target="_blank" rel="external">mongodb 判断坐标是否在指定多边形区域内的方法</a> </li>
</ol>
</li>
<li><ol>
<li><a href="http://www.voidcn.com/article/p-agdcdenf-da.html" target="_blank" rel="external">怎么判断一个点是否在多边形区域内</a></li>
</ol>
</li>
<li><ol>
<li><a href="https://www.chengxiaobai.cn/sql/mysql-according-to-the-latitude-and-longitude-search-sort.html" target="_blank" rel="external">mysql根据经纬度查找排序</a></li>
</ol>
</li>
</ul>
<p>总结:mysql空间查询并不很适合地图坐标,因此查询地图坐标可以使用mongodb实现,参考:<a href="http://blog.csdn.net/fdipzone/article/details/52374630" target="_blank" rel="external">《mongodb 判断坐标是否在指定多边形区域内的方法》</a></p>
</span>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/06/18/grew/" itemprop="url">
成熟之解BY余秋雨
</a>
</h1>
<div class="post-meta">
<span class="post-time">
发表于
<time itemprop="dateCreated" datetime="2017-06-18T20:03:01+08:00" content="2017-06-18">
2017-06-18
</time>
</span>
<span class="post-category" >
| 分类于
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/人生百态/" itemprop="url" rel="index">
<span itemprop="name">人生百态</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2017/06/18/grew/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/06/18/grew/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body">
<span itemprop="articleBody">
<h2 id="u5E8F"><a href="#u5E8F" class="headerlink" title="序"></a>序</h2><blockquote>
<p> 高中时语文老师推荐读余秋雨的书,自此欲罢不能,然随着年龄的增长,工作压力和生活琐事日益增多,竟渐渐迷失自己,生活工作的一塌糊涂。 今日又读到此文,心有所悟,特整理到博客,以此自勉。 惟愿有生之年早日达到此高度。</p>
</blockquote>
<h2 id="u6B63_u6587"><a href="#u6B63_u6587" class="headerlink" title="正文"></a>正文</h2><p><strong>成熟是一种明亮而不刺眼的光辉,一种圆润而不腻耳的音响,一种不再需要对别人察言观色的从容,一种终于停止向周围申诉求告的大气,一种不理会哄闹的微笑,一种洗刷了偏激的淡漠,一种无须声张的厚实,一种能够看得很远却又并不陡峭的高度。</strong></p>
<p>我一直认为,某个时期,某个社会,即使所有的青年人和老年人都中魔了,只要中年人不荒唐,事情就坏不到哪里去。</p>
<p>在中年,青涩的生命之果变得如此丰满,喧闹的青春冲撞沉淀成了雍容华贵,连繁重的社会责任也有可能溶解为日常的生活情态。</p>
<p>到了该自立的年岁还不知道精神上的自立,这是中国很多中年人的共同悲剧。</p>
<p>天天期待着上级的指示、群众的意见、家人的说法,然后才能跨出每一步——这是尚未精神断奶的标志。</p>
<p>最可怕的是,谁也没有断奶,而社会上又没有那么多上好的乳汁,因此开始了对各种伪劣饮料的集体吮吸。在一片响亮而整齐的吮吸声上面,是那些爬满皱纹却还未苍老的脸。</p>
<p>中年人最容易犯的毛病,是把一切希望都寄托于自己的老年。</p>
<p>如今天天节衣缩食、不苟言笑、忍气吞声,都是在争取着一个有尊严、有资财、有自由的老人。</p>
<p>但是,我们无数次看到了,一个窝囊的中年抵达不到一个欢快的老年。这正像江河,一个浑浊的上段不可能带来一个清澈的下段。</p>
<p>习惯了郁闷的,只能继续郁闷;习惯了卑琐的,只能保持卑琐。而且,由于暮色苍茫间的体力不支、友朋散失,郁闷只能更加郁闷,卑琐只能更加卑琐。</p>
<p>只有在中年树起独立的桅杆,扬起高高的白帆唱出响亮的歌声,才会有好风为你鼓劲,群鸥为你引路,找到一个个都在欢迎你的安静港湾,供你细细选择。</p>
<p>中年人的坚守,应该从观点上升到人格,而人格难以言表。在中年人眼前,大批的对峙消解了,早年的对手失踪了,昨天的敌人无恨了,更多的是把老老少少各色人等照顾在自己身边。</p>
<p>请不要小看这“照顾”二字,中年人的魅力至少有一半与此相关。</p>
<p>中年人失去方寸的主要特征是忘记了自己的年龄,一会儿要别人像对待青年那样关爱自己,一会儿又要别人像对待老人那样尊敬自己,明明一个大男人却不能对任何稍稍大一点的问题作出决定,频频找领导倾诉衷肠,出了什么事情又逃得远远的,不敢负一点责任。在家里,他们训斥孩子就像顽童吵架,没有一点身为人父的慈爱和庄重;对妻子,他们也会轻易地倾泻出自己的精神垃圾来酿造痛苦,全然忘却自己是这座好不容易建造起来的情感楼宇的顶梁柱;甚至对年迈的父母,他们也会任性赌气,极不公平地伤害着已经走向衰弱的身影。</p>
<p>西方一位哲人说,只有饱经沧桑的老人才会领悟真正的人生哲理,同样一句话,出自老人之口比出自青年之口厚重百倍。对此,我不能全然苟同。</p>
<p>哲理产生在两种相反力量的周旋之中,因此它更垂青于中年。世上一切杰出的哲学家都在中年完成了他们的思想体系,便是证据。</p>
<p>人生就是这样,年轻时,怨恨自己年轻,年迈时,怨恨自己年迈,这倒常常促使中年处于一种相对冷静的疏离状态和评判状态,然后一边慰抚年幼者,一边慰抚年老者。我想,中年在人生意义上的魅力,就在于这双向疏离和双向慰抚吧。</p>
<p>因双向疏离,他们变得洒脱和沉静;因双向慰抚,他们变得亲切和有力。但是,也正因为此,他们有时又会感到烦心和惆怅,他们还余留着告别天真岁月的伤感,又迟早会产生暮岁将至的预感。他们置身于人生凯旋的中心点,环视四周,思前想后,不能不感慨万千。</p>
<p>老年是如诗的年岁。这种说法不是为了奉承长辈。</p>
<p>中年太实际、太繁忙,在整体上算不得诗。青年时代常常被诗化,但青年时代的诗太多激情而缺少意境,按我的标准,缺少意境就算不得好诗。<br>只有到了老年,沉重的使命已经卸除,生活的甘苦也已了然,万丈红尘已移到远处,静下来的周际环境和放慢了的生命节奏加在一起,构成了一种总结性、归纳性的轻微和声,诗的意境出现了。</p>
<p>除了极少数命苦的老人,老年岁月总是比较悠闲。老年人可能不会写诗或已经不再写诗,但他们却以诗的方式生存着。看街市忙碌,看后辈来去,看庭花凋零,看春草又绿,而思绪则时断时续、时喜时悲、时真时幻。</p>
<p>当然会产生越来越多的生理障碍,但即便障碍也构成一种让人仰视的形态,就像我们面对枝干斑驳的老树,老树上的枯藤残叶,也会感到诗的存在。<br>中青年的世界的强悍,也经常需要一些苍老的手来救助。平时不容易见到,一旦有事则及时伸出,救助过后又立即消失,神龙见首不见尾。这是一种早已退出社会主体的隐性文化和柔性文化,隐柔中沉积着岁月的硬度,能使后人一时启悟,如与天人对晤。老年的魅力,理应在这样的高位上偶尔显露。不要驱使,不要强求,不要哄抬,只让它们成为人生的写意笔墨,似淡似浓,似有似无。</p>
<p>长江的流程也像人的一生,在起始阶段总是充满着奇瑰和险峻,到了即将了结一生的晚年,怎么也得走向平缓和实在。</p>
<p>不要因为害怕被别人误会而等待理解。现代生活各自独立、万象共存。东家的柳树矮一点,不必向路人解释本来有长高的可能;西家的槐树高一点,也不必向邻居说明自己并没有独占风水的企图。</p>
<p>做一件新事,大家立即理解,那就不是新事;出一个高招,大家又立即理解,那也不是高招。没有争议的行为,肯定不是创造;没有争议的人物,肯定不是创造者。任何真正的创造都是对原有模式背离,对社会适应的突破,对民众习惯的挑战。如果眼巴巴地指望众人理解,创造的纯粹性必然会大大降低。平庸,正在前面招手。</p>
<p>回想一下,我们一生所做的比较像样的大事,连父母亲也未必能深刻理解。父母虽缔造了我们却理解不了我们,这便是进化。</p>
<p>人生不要光做加法。在人际交往上,经常减肥、排毒,才会轻轻松松地走以后的路。我们周围很多人,实在是被越积越厚的人际关系脂肪层堵塞住了,大家都能听到他们既满足又疲惫的喘息声。</p>
<p>向往峰巅,向往高度,结果峰巅只是一道刚能立足的狭地。不能横行,不能直走,只享一时俯视之乐,怎可长久驻足安坐?上已无路,下又艰难,我感到从未有过的孤独与惶恐。世间真正温煦的美色,都熨帖着大地,潜伏在深谷。君临万物的高度,到头来构成了自我嘲弄。我已看出了它的讥谑,于是急急地来试探下山的陡坡。人生真是艰难,不上高峰发现不了什么,上了高峰又抓住不了什么。看来,注定要不断地上坡下坡,上坡下坡。</p>
</span>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2016/10/14/how-to-work/" itemprop="url">
如何高效率的工作
</a>
</h1>
<div class="post-meta">
<span class="post-time">
发表于
<time itemprop="dateCreated" datetime="2016-10-14T20:03:01+08:00" content="2016-10-14">
2016-10-14
</time>
</span>
<span class="post-category" >
| 分类于
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/人生百态/" itemprop="url" rel="index">
<span itemprop="name">人生百态</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2016/10/14/how-to-work/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2016/10/14/how-to-work/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body">
<span itemprop="articleBody">
<h2 id="u4F60_u4E0D_u52AA_u529B_uFF0C_u8C01_u4E5F_u7ED9_u4E0D_u4E86_u4F60_u60F3_u8981_u7684_u751F_u6D3B"><a href="#u4F60_u4E0D_u52AA_u529B_uFF0C_u8C01_u4E5F_u7ED9_u4E0D_u4E86_u4F60_u60F3_u8981_u7684_u751F_u6D3B" class="headerlink" title="你不努力,谁也给不了你想要的生活"></a>你不努力,谁也给不了你想要的生活</h2><p>近被朋友圈刷屏了,简单的两个聊天记录,拿2000工资与20000工资的有什么区别?<strong>不论做什么,走心最重要!</strong></p>
<p>很多时候,我们失败都不是因为“硬件”不行,而是“软实力”欠佳。</p>
<p>若都是刚进公司的新人,大家能力是差不多的,随着时间的推移,情商高的往往都会比情商低的更容易得到赏识或提拔;所以,在技能相对稳定的情况下,我们一定要努力优化自己的处事方法。</p>
<p><strong>机会是留给有准备的人的,要别人推一把你才走一步,那你跟猪又有什么区别。</strong></p>
<hr>
<p>如图所示:3张图揭示人与人之间的差别!</p>
<h3 id="u60C5_u666F_u4E00"><a href="#u60C5_u666F_u4E00" class="headerlink" title="情景一"></a>情景一</h3><p><img src="http://sphenginx.github.io/images/work/1.png" alt="普通员工1"><br><img src="http://sphenginx.github.io/images/work/2.png" alt="普通员工2"></p>
<h3 id="u60C5_u666F_u4E8C"><a href="#u60C5_u666F_u4E8C" class="headerlink" title="情景二"></a>情景二</h3><p><img src="http://sphenginx.github.io/images/work/3.png" alt="优秀员工"></p>
<p>那么问题来了,</p>
<p>你能看出老员工和新员工之间的差别吗?</p>
<p><strong>如果你是老板,你更愿意聘用哪一个?</strong></p>
<h2 id="u4F18_u79C0_u5458_u5DE5_VS__u666E_u901A_u5458_u5DE5"><a href="#u4F18_u79C0_u5458_u5DE5_VS__u666E_u901A_u5458_u5DE5" class="headerlink" title="优秀员工 VS 普通员工"></a>优秀员工 VS 普通员工</h2><h3 id="u5173_u4E8E_u521A_u5165_u804C"><a href="#u5173_u4E8E_u521A_u5165_u804C" class="headerlink" title="关于刚入职"></a>关于刚入职</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>看重工资的高低,在一无所长的前提下,没有想过学习丰富的工作经验和职业技能。</td>
<td>更看重宝贵的工作经验,踏踏实实的去学习业务技能,他相信只要有丰富的经验,以后无论到哪都能赢得高薪。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u5BF9_u5F85_u95EE_u9898"><a href="#u5173_u4E8E_u5BF9_u5F85_u95EE_u9898" class="headerlink" title="关于对待问题"></a>关于对待问题</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>在工作中会发现各种各样的问题,对于问题他们往往以抱怨的态度去对待,而没有想方法去解决</td>
<td>在工作过程中,碰到问题会冷静的分析原因,并通过各种手段去解决,慢慢培养了一种解决问题的能力。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u6267_u884C_u529B"><a href="#u5173_u4E8E_u6267_u884C_u529B" class="headerlink" title="关于执行力"></a>关于执行力</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>对于上司交代的问题本着能做就做,不能做就慢慢磨,执行效果较差。</td>
<td>上司交代的事情积极去解决,遇到问题会积极与上司沟通请示,执行效果好。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u4E2A_u6027"><a href="#u5173_u4E8E_u4E2A_u6027" class="headerlink" title="关于个性"></a>关于个性</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>个性张扬,以自我为中心,不善于处理自己与同事领导的关系,往往给人一种很浮躁的感觉。</td>
<td>为人谦虚低调,能协调好与领导同事的关系,人际关系非常好。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u4E0B_u73ED_u540E"><a href="#u5173_u4E8E_u4E0B_u73ED_u540E" class="headerlink" title="关于下班后"></a>关于下班后</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>下班后往往通过看电视、打打游戏等方式,度过一段休闲时光。</td>
<td>下班后会抽出时间回顾今天一天的工作内容,反思不足之处,并规划好第二天的工作内容。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u5DE5_u4F5C_u91CD_u70B9"><a href="#u5173_u4E8E_u5DE5_u4F5C_u91CD_u70B9" class="headerlink" title="关于工作重点"></a>关于工作重点</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>工作杂乱无章,搞不清楚工作的核心内容,工作往往忙起来手足无措。</td>
<td>能很好的做好工作规划,找准核心工作内容,即使忙起来也能井然有序。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u5BA2_u6237_u6C9F_u901A"><a href="#u5173_u4E8E_u5BA2_u6237_u6C9F_u901A" class="headerlink" title="关于客户沟通"></a>关于客户沟通</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>和客户沟通仅局限于单纯的送货收款,没有考虑到客户的实际需求,往往工作很辛苦,但是成效却很低。</td>
<td>能很好的处理与客户的客情关系,准确的找到客户实际需求,并结合客户需求达成销售。往往事半功倍。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u89C6_u754C"><a href="#u5173_u4E8E_u89C6_u754C" class="headerlink" title="关于视界"></a>关于视界</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>缺乏宏观思考,经常纠结于某个终端问题,有时为了应对单个终端问题不惜提高政策从而影响了整个市场价格体系。</td>
<td>从市场整体角度出发,能很好的协调好各个渠道之间的市场问题,对于违反市场规律的个别终端坚决予以治理。</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u6279_u8BC4"><a href="#u5173_u4E8E_u6279_u8BC4" class="headerlink" title="关于批评"></a>关于批评</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>对忠言逆耳理解的不透彻,总认为自己想的是对的,把上司或资深前辈的意见或建议不当一回事,我行我素。</td>
<td>能谦虚的接受批评,认识到自己所犯错误在哪,并积极改正!</td>
</tr>
</tbody>
</table>
<h3 id="u5173_u4E8E_u804C_u4E1A_u89C4_u5212"><a href="#u5173_u4E8E_u804C_u4E1A_u89C4_u5212" class="headerlink" title="关于职业规划"></a>关于职业规划</h3><table>
<thead>
<tr>
<th>普通员工</th>
<th>优秀员工</th>
</tr>
</thead>
<tbody>
<tr>
<td>没有职业规划,对自己想要什么没概念,能做多久算多久,风风光光是一辈子,窝窝囊囊也是一辈子,得过且过。</td>
<td>有自己的职业规划,知道自己想要什么,也知道如何去努力。</td>
</tr>
</tbody>
</table>
<p><img src="http://sphenginx.github.io/images/work/0.png" alt="你不努力,谁也给不了你想要的生活"></p>
</span>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2016/09/18/select-for-update/" itemprop="url">
MySQL 中的 SELECT FOR UPDATE
</a>
</h1>
<div class="post-meta">
<span class="post-time">
发表于
<time itemprop="dateCreated" datetime="2016-09-18T16:03:01+08:00" content="2016-09-18">
2016-09-18
</time>
</span>
<span class="post-category" >
| 分类于
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/日薪越亿/" itemprop="url" rel="index">
<span itemprop="name">日薪越亿</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2016/09/18/select-for-update/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2016/09/18/select-for-update/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body">
<span itemprop="articleBody">
<h2 id="MySQL__u4F7F_u7528SELECT__u2026_FOR_UPDATE__u505A_u4E8B_u52A1_u5199_u5165_u524D_u7684_u786E_u8BA4"><a href="#MySQL__u4F7F_u7528SELECT__u2026_FOR_UPDATE__u505A_u4E8B_u52A1_u5199_u5165_u524D_u7684_u786E_u8BA4" class="headerlink" title="MySQL 使用SELECT … FOR UPDATE 做事务写入前的确认"></a>MySQL 使用SELECT … FOR UPDATE 做事务写入前的确认</h2><p>以MySQL 的InnoDB 为例,预设的Tansaction isolation level 为REPEATABLE READ,在SELECT 的读取锁定主要分为两种方式:</p>
<p><code>SELECT ... LOCK IN SHARE MODE</code> 、 <code>SELECT ... FOR UPDATE</code></p>
<p>这两种方式在事务(Transaction) 进行当中SELECT 到同一个数据表时,都必须等待其它事务数据被提交(Commit)后才会执行。而主要的不同在于LOCK IN SHARE MODE 在有一方事务要Update 同一个表单时很容易造成死锁 。</p>
<p>简单的说,如果SELECT 后面若要UPDATE 同一个表单,最好使用SELECT … UPDATE。</p>
<p>举个例子: 假设商品表单products 内有一个存放商品数量的quantity ,在订单成立之前必须先确定quantity 商品数量是否足够(quantity>0) ,然后才把数量更新为1。</p>
<p>不安全的做法:<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SELECT quantity FROM products WHERE id=3; UPDATE products SET quantity = 1 WHERE id=3;</span><br></pre></td></tr></table></figure></p>
<p>为什么不安全呢?</p>
<p>少量的状况下或许不会有问题,但是大量的数据存取「铁定」会出问题。</p>
<p>如果我们需要在quantity>0 的情况下才能扣库存,假设程序在第一行SELECT 读到的quantity 是2 ,看起来数字没有错,但是当MySQL 正准备要UPDATE 的时候,可能已经有人把库存扣成0 了,但是程序却浑然不知,将错就错的UPDATE 下去了。</p>
<font color="red"><strong>因此必须透过的事务机制来确保读取及提交的数据都是正确的。</strong></font>
<p>于是我们在MySQL 就可以这样测试: (注1)<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SET AUTOCOMMIT=0; BEGIN WORK; SELECT quantity FROM products WHERE id=3 FOR UPDATE; //此时products 数据中id=3 的数据被锁住(注3),其它事务必须等待此次事务 提交后才能执行 SELECT * FROM products WHERE id=3 FOR UPDATE; //(注2) 如此可以确保quantity 在别的事务读到的数字是正确的。 UPDATE products SET quantity = '1' WHERE id=3; COMMIT WORK;</span><br></pre></td></tr></table></figure></p>
<p>提交(Commit)写入数据库,products 解锁。</p>
<p>注1: BEGIN/COMMIT 为事务的起始及结束点,可使用二个以上的MySQL Command 视窗来交互观察锁定的状况。<br>注2: 在事务进行当中,只有SELECT … FOR UPDATE 或LOCK IN SHARE MODE 同一笔数据时会等待其它事务结束后才执行,一般SELECT … 则不受此影响。<br>注3: 由于InnoDB 预设为Row-level Lock,数据列的锁定可参考这篇。<br>注4: InnoDB 表单尽量不要使用LOCK TABLES 指令,若情非得已要使用,请先看官方对于InnoDB 使用LOCK TABLES 的说明,以免造成系统经常发生死锁。 </p>
<h2 id="MySQL_SELECT__u2026_FOR_UPDATE__u7684Row_Lock__u4E0ETable_Lock"><a href="#MySQL_SELECT__u2026_FOR_UPDATE__u7684Row_Lock__u4E0ETable_Lock" class="headerlink" title="MySQL SELECT … FOR UPDATE 的Row Lock 与Table Lock"></a>MySQL SELECT … FOR UPDATE 的Row Lock 与Table Lock</h2><blockquote>
<p> 上面介绍过SELECT … FOR UPDATE 的用法,不过锁定(Lock)的数据是判别就得要注意一下了。由于InnoDB 预设是Row-Level Lock,所以只有「明确」的指定主键,MySQL 才会执行Row lock (只锁住被选取的数据) ,否则MySQL 将会执行Table Lock (将整个数据表单给锁住)。</p>
</blockquote>
<p>举个例子:</p>
<p>假设有个表单products ,里面有id 跟name 二个栏位,id 是主键。</p>
<p>例1: (明确指定主键,并且有此数据,row lock)<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SELECT * FROM products WHERE id='3' FOR UPDATE;</span><br></pre></td></tr></table></figure></p>
<p>例2: (明确指定主键,若查无此数据,无lock)<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SELECT * FROM products WHERE id='-1' FOR UPDATE;</span><br></pre></td></tr></table></figure></p>
<p>例2: (无主键,table lock)<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SELECT * FROM products WHERE name='Mouse' FOR UPDATE;</span><br></pre></td></tr></table></figure></p>
<p>例3: (主键不明确,table lock)<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SELECT * FROM products WHERE id<>'3' FOR UPDATE;</span><br></pre></td></tr></table></figure></p>
<p>例4: (主键不明确,table lock)<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SELECT * FROM products WHERE id LIKE '3' FOR UPDATE;</span><br></pre></td></tr></table></figure></p>
<p>注1: FOR UPDATE 仅适用于InnoDB,且必须在事务区块(BEGIN/COMMIT)中才能生效。<br>注2: 要测试锁定的状况,可以利用MySQL 的Command Mode ,开二个视窗来做测试。 </p>
<h2 id="u5176_u4ED6"><a href="#u5176_u4ED6" class="headerlink" title="其他"></a>其他</h2><p><a href="http://www.cnblogs.com/chenwenbiao/archive/2012/06/06/2537508.html" target="_blank" rel="external">转自 http://www.cnblogs.com/chenwenbiao/archive/2012/06/06/2537508.html</a></p>
</span>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2016/08/08/do-not-work-hard-without-self-control/" itemprop="url">
没有自制力的人有什么资格谈努力
</a>
</h1>
<div class="post-meta">
<span class="post-time">
发表于
<time itemprop="dateCreated" datetime="2016-08-08T09:27:40+08:00" content="2016-08-08">
2016-08-08
</time>
</span>
<span class="post-category" >
| 分类于
<span itemprop="about" itemscope itemtype="https://schema.org/Thing">
<a href="/categories/日薪越亿/" itemprop="url" rel="index">
<span itemprop="name">日薪越亿</span>
</a>
</span>
</span>
<span class="post-comments-count">
|
<a href="/2016/08/08/do-not-work-hard-without-self-control/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2016/08/08/do-not-work-hard-without-self-control/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body">
<span itemprop="articleBody">
<h2 id="u4E00"><a href="#u4E00" class="headerlink" title="一"></a>一</h2><p>在周鱼的微博上看到他的一段话 <code>你可以追剧追一晚,只要你可以按时交上论文。你可以有丰富的夜生活,只要第二天你还能精神饱满的做好本职工作。放纵究竟是不是错,取决于你能不能为你的放纵负责。还是那句话,没有自制力的人不足以谈人生。</code></p>
<p>简直一语戳中,微博底下留言的人,无一不在哀嚎:<strong>膝盖中箭。</strong></p>
<p>自制力并不是什么新鲜词,说白了就是能够自觉控制自己的行动和情绪,集中注意力去达成自己原本的目标,而不受其他事情的干扰。</p>
<p>可是说起来容易,做起来真是太难了。</p>
<p>对大多数人来说,论文通常都是在deadline来临时,才匆匆忙忙拼凑完成的,而在这之前,是逍遥地看剧打游戏,约会逛街.</p>
<p>工作也是,今天做不完那就明天再做咯,反正工作永远也做不完,但聊天八卦要跟上、剁手购物不能错过秒杀,就连无效的朋友聚餐打着“社交”的旗号也不能不去……</p>
<p>每天冲击我们的信息太多,要做的事情也太多,我们的时间也被分割成碎片,然后被鸡零狗碎所侵占,自制力一点一点丧失。</p>
<p>我们每天好像做了很多事,但为什么最后又好像什么都没做?</p>
<p>每天好像忙得团团转,焦头烂额,但为什么最后还是顾此失彼?</p>
<p>我们立下一堆目标和计划,最后一个也没完成,我们急吼吼地说要多么努力,我们甚至还曾以为自己很努力,原来不过就是看上去很努力而已,最后的结果是,想要做的事,和本应该完成的事,都没有完成。</p>
<p>丧失自制力的后果是让我们对自己愤怒和质疑:我们有什么资格谈努力?</p>
<h2 id="u4E8C"><a href="#u4E8C" class="headerlink" title="二"></a>二</h2><p>我一个朋友,她的出版资格考试报了三回,可一次也没去,是的,她连考场都没进。</p>
<p>最后她生生从考初级熬到了可以考中级资格(毕业五年可以直接考中级),她无所谓地说:“哎呀,大不了我直接考中级不就得了。”</p>
<p>其实在我看来,她这话无异于自欺欺人,没有个三五年,她中级一样考不下来。</p>
<p>还记得我们一起报名考初级的情景。</p>
<p>她特别豪言壮语地立下学习目标,用多长时间复习《著作权法》,用多长时间学习出版实操知识点……时间规划得特别详细,如实按照这个计划来,备考的时间完全充足,甚至还可以在一轮复习完了后,再进行重点知识二轮复习。</p>
<p>但我们相约一起复习的第一个周末她就缺席了。原因是,她们公司不久后要组织去某著名山庄泡温泉,开季度总结会,她想买一套新的泳衣,顺便去商场逛街,趁着打折买买换季的新衣服。</p>
<p>她打电话邀我作陪,“乔乔,这个礼拜你陪我逛街,下个礼拜我们再开始学习好不好?”</p>
<p>我回她一个微信:“你这个行为就像口口声声喊着要减肥,却大吃大喝一顿,还美其名曰‘没有吃饱怎么有力气减肥呢’?”</p>
<p>让我意外,其实也意料之中的是,第二个周末,第三个周末,她总是有事,最后我只好独自一个人把最初定下的学习计划执行下去。</p>
<p>起初,她还有些负罪感,但次数多了也就轻易地,自我放纵了。</p>
<p>时间好像还有很多,所以眼前的诱惑,相比很久以后的考试来说,总是更有吸引力一些,也更重要一些。甚至,还会偶尔劝诫自己“人生苦短,不如快活”。</p>
<p>到最后,临到考前一个月,她才开始急了,临时抱佛脚各种狂背,可是那些法律条款和实操的内容,真不是一时半会儿就能背下来的。</p>
<p>压力太大,她一焦虑,效率低下,就又没有学习的动力了。最后索性连考场也没去。</p>
<p>是的,自制力差的人,永远都有最后一道护身符:大不了重头再来咯。</p>
<p>第二年,她一个人报考,考前依旧信誓旦旦:“去年没完成的计划,今年誓死也要完成。”</p>
<p>然而,第二年依旧,乃至第三年。</p>
<p>没有自制力的人,往往容易拖延症爆发,总是觉得时间还有,偶尔开个小差做点别的并不影响大局,直到deadline逼近时才乱了阵脚,才意识到自己过高地估计了自己hold住场面的能力。</p>
<p>其实我们没有完成的那些事,并不如我们放弃的那么轻松,它们在我们看来其实很重要,没写完的论文,没做完的工作,没有看完的书,没有认真听的报告,没有背的单词,而我们在开小差的时候,也并不是心无旁骛地快乐,心好像被悬着,我们真的有负罪感,没法好好地玩耍。</p>
<h2 id="u4E09"><a href="#u4E09" class="headerlink" title="三"></a>三</h2><p>真正地有自制力,是一种怎样的体验?<br> <br>学生时期,我们身边都有这样的学霸,他好像从来不用做作业,上课也不是埋头苦做笔记,下了课更不会呆在座位上,他们可以跟学渣一起聊热门的电视剧,讨论流行的八卦,他们……好像真的没有认真地学习,但我们永远不知道的是: 他们在家专注地写作业和复习,一个小时的学习效率顶别人两三个小时。自制力强,所以效率高;自制力强,所以学得快,玩儿得也嗨。<br> <br>毕业后,职场上我们身边也有这样的同事,他们好像上班也跟你一起聊天八卦,也偶尔偷偷淘宝刷微博,做PPT的时候也一样抱怨,赶不出方案时也一样抓狂,可是,和你不同的是,在最后他们好像总是被上天眷顾了一样,ppt做得比你好看,方案创意比你厉害,销售单子拿的比你多……你气不过,暗自嘟囔“他凭什么?”<br> <br>是啊,你刷微博是在看娱乐八卦和搞笑图片,别人是在找创意灵感;你抱怨这不行那不行的时候是在发脾气,别人却是在寻找解决问题的办法;你跟别人闲聊是真的在撩骚,而别人是通过聊天找到对方的销售需求……<br> <br><strong>自制力强的人,永远分得清楚主次,拎得清什么是本职,什么是玩乐。Deadline在没有自制力的人那里,是压力;在有自制力的人那里,是动力。这就是本质的区别。</strong></p>
<h2 id="u56DB"><a href="#u56DB" class="headerlink" title="四"></a>四</h2><p>你是不是也有这样的经历:<br> <br>家里书架上都摆满了你想看的书,可是一两个月前,你兴冲冲翻开的那本,现在还是停留在最初的几页;<br> <br>你下载了背英语单词的App扇贝,你原本是踌躇满志地制订了背考研单词的计划,一天背100个单词,几十天就搞定,可是单词你背了又忘,忘了又背,中间断了N天。<br> <br>你办了健身卡说是要去学游泳,可是别人的健身卡都要续费了,你的健身卡套餐却是在不用就要过期了……<br> <br>为什么开始的开始,我们本来是兴冲冲要去做的事,到后来总是不了了之地烂尾?<br> <br>或许,我们缺乏自制力的原因之一就是,其实你内心深处,就是不在意,不那么想做,所以才会动力缺缺,一直拖延,一旦有什么别的事情干扰,你的专注力就无法维持。<br> <br>而什么是努力?吃喝玩乐睡,用不着努力,这些事是本能,是消遣。<br> <br>称得上努力的事,都是反本能反人性的:为了完成一个课题,你会起早贪黑;为了做那份你最想做的工作,上下班路上四五个小时你也无所谓;为了看完你想看的书,你会放弃参加无效的社交聚会……<br> <br><strong>亦舒曾说过,爱得不够,才借口多多。简直真理,套用过来,你不想做一件事,才会给自己找这样那样的理由。</strong><br> <br>所以,当我们在谈努力的时候,请扪心自问一下,你到底有多想做那件事?到底有多想成功?为了做成那件事,你到底能做到怎样的付出和拼命?<br> <br>因为没有自制力的人是没有资格谈努力的。</p>
</span>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>