-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1560 lines (1267 loc) · 143 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>
<head>
<meta charset="utf-8">
<title>Auto</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/favicon.png">
<link rel="stylesheet" href="/css/style.css">
<meta name="generator" content="Hexo 5.3.0"></head>
<body>
<div id="container">
<div id="wrap">
<header id="header">
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">
<a href="/" id="logo">Auto</a>
</h1>
<h2 id="subtitle-wrap">
<a href="/" id="subtitle">A modern stylish theme for Hexo</a>
</h2>
</div>
<div id="header-inner" class="inner">
<nav id="main-nav">
<a id="main-nav-toggle" class="nav-icon"></a>
<a class="main-nav-link" href="/">Home</a>
<a class="main-nav-link" href="/archives">Archives</a>
<a class="main-nav-link" href="/categories">Categories</a>
<a class="main-nav-link" href="/tags">Tags</a>
<a class="main-nav-link" href="/about">About</a>
</nav>
</div>
</div>
</header>
<div class="outer">
<section id="main">
<article id="post-kubernetes" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2021/02/12/kubernetes/" class="article-date">
<time class="dt-published" datetime="2021-02-12T23:54:03.000Z" itemprop="datePublished">2021-02-12</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/Kubernetes/">Kubernetes</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2021/02/12/kubernetes/">Kubernetes (K8s)</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p><a target="_blank" rel="noopener" href="https://pkg.go.dev/k8s.io/kubernetes"><img src="https://pkg.go.dev/badge/k8s.io/kubernetes.svg" alt="GoPkg Widget"></a> <a target="_blank" rel="noopener" href="https://bestpractices.coreinfrastructure.org/projects/569"><img src="https://bestpractices.coreinfrastructure.org/projects/569/badge" alt="CII Best Practices"></a></p>
<img src="https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png" width="100">
<hr>
<p>Kubernetes, also known as K8s, is an open source system for managing <a target="_blank" rel="noopener" href="https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/">containerized applications</a><br>across multiple hosts. It provides basic mechanisms for deployment, maintenance,<br>and scaling of applications.</p>
<p>Kubernetes builds upon a decade and a half of experience at Google running<br>production workloads at scale using a system called <a target="_blank" rel="noopener" href="https://research.google.com/pubs/pub43438.html">Borg</a>,<br>combined with best-of-breed ideas and practices from the community.</p>
<p>Kubernetes is hosted by the Cloud Native Computing Foundation (<a target="_blank" rel="noopener" href="https://www.cncf.io/about">CNCF</a>).<br>If your company wants to help shape the evolution of<br>technologies that are container-packaged, dynamically scheduled,<br>and microservices-oriented, consider joining the CNCF.<br>For details about who’s involved and how Kubernetes plays a role,<br>read the CNCF <a target="_blank" rel="noopener" href="https://cncf.io/news/announcement/2015/07/new-cloud-native-computing-foundation-drive-alignment-among-container">announcement</a>.</p>
<hr>
<h2 id="To-start-using-K8s"><a href="#To-start-using-K8s" class="headerlink" title="To start using K8s"></a>To start using K8s</h2><p>See our documentation on <a target="_blank" rel="noopener" href="https://kubernetes.io/">kubernetes.io</a>.</p>
<p>Try our <a target="_blank" rel="noopener" href="https://kubernetes.io/docs/tutorials/kubernetes-basics">interactive tutorial</a>.</p>
<p>Take a free course on <a target="_blank" rel="noopener" href="https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615">Scalable Microservices with Kubernetes</a>.</p>
<p>To use Kubernetes code as a library in other applications, see the <a target="_blank" rel="noopener" href="https://git.k8s.io/kubernetes/staging/README.md">list of published components</a>.<br>Use of the <code>k8s.io/kubernetes</code> module or <code>k8s.io/kubernetes/...</code> packages as libraries is not supported.</p>
<h2 id="To-start-developing-K8s"><a href="#To-start-developing-K8s" class="headerlink" title="To start developing K8s"></a>To start developing K8s</h2><p>The <a target="_blank" rel="noopener" href="https://git.k8s.io/community">community repository</a> hosts all information about<br>building Kubernetes from source, how to contribute code<br>and documentation, who to contact about what, etc.</p>
<p>If you want to build Kubernetes right away there are two options:</p>
<h5 id="You-have-a-working-Go-environment"><a href="#You-have-a-working-Go-environment" class="headerlink" title="You have a working Go environment."></a>You have a working <a target="_blank" rel="noopener" href="https://golang.org/doc/install">Go environment</a>.</h5><figure class="highlight plain"><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">mkdir -p $GOPATH/src/k8s.io</span><br><span class="line">cd $GOPATH/src/k8s.io</span><br><span class="line">git clone https://github.com/kubernetes/kubernetes</span><br><span class="line">cd kubernetes</span><br><span class="line">make</span><br></pre></td></tr></table></figure>
<h5 id="You-have-a-working-Docker-environment"><a href="#You-have-a-working-Docker-environment" class="headerlink" title="You have a working Docker environment."></a>You have a working <a target="_blank" rel="noopener" href="https://docs.docker.com/engine">Docker environment</a>.</h5><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/kubernetes/kubernetes</span><br><span class="line">cd kubernetes</span><br><span class="line">make quick-release</span><br></pre></td></tr></table></figure>
<p>For the full story, head over to the <a target="_blank" rel="noopener" href="https://git.k8s.io/community/contributors/devel#readme">developer’s documentation</a>.</p>
<h2 id="Support"><a href="#Support" class="headerlink" title="Support"></a>Support</h2><p>If you need support, start with the <a target="_blank" rel="noopener" href="https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/">troubleshooting guide</a>,<br>and work your way through the process that we’ve outlined.</p>
<p>That said, if you have questions, reach out to us<br><a target="_blank" rel="noopener" href="https://git.k8s.io/community/communication">one way or another</a>.</p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2021/02/12/kubernetes/" data-id="cklsy6ytt0009rd956gfbcvue" data-title="Kubernetes (K8s)" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Docker/" rel="tag">Docker</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Go/" rel="tag">Go</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Kubernetes/" rel="tag">Kubernetes</a></li></ul>
</footer>
</div>
</article>
<article id="post-php" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2021/02/11/php/" class="article-date">
<time class="dt-published" datetime="2021-02-11T23:00:00.000Z" itemprop="datePublished">2021-02-11</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/PHP/">PHP</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2021/02/11/php/">PHP</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<div align="center">
<a target="_blank" rel="noopener" href="https://php.net">
<img
alt="PHP"
src="https://www.php.net/images/logos/new-php-logo.svg"
width="150">
</a>
</div>
<h1 id="The-PHP-Interpreter"><a href="#The-PHP-Interpreter" class="headerlink" title="The PHP Interpreter"></a>The PHP Interpreter</h1><p>PHP is a popular general-purpose scripting language that is especially suited to<br>web development. Fast, flexible and pragmatic, PHP powers everything from your<br>blog to the most popular websites in the world. PHP is distributed under the<br><a href="LICENSE">PHP License v3.01</a>.</p>
<p><a target="_blank" rel="noopener" href="https://travis-ci.org/php/php-src"><img src="https://travis-ci.org/php/php-src.svg?branch=master" alt="Build status"></a><br><a target="_blank" rel="noopener" href="https://ci.appveyor.com/project/php/php-src"><img src="https://ci.appveyor.com/api/projects/status/meyur6fviaxgdwdy/branch/master?svg=true" alt="Build status"></a><br><a target="_blank" rel="noopener" href="https://dev.azure.com/phpazuredevops/php/_build/latest?definitionId=1&branchName=master"><img src="https://dev.azure.com/phpazuredevops/php/_apis/build/status/php.php-src?branchName=master" alt="Build Status"></a><br><a target="_blank" rel="noopener" href="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:php"><img src="https://oss-fuzz-build-logs.storage.googleapis.com/badges/php.svg" alt="Fuzzing Status"></a></p>
<h2 id="Documentation"><a href="#Documentation" class="headerlink" title="Documentation"></a>Documentation</h2><p>The PHP manual is available at <a target="_blank" rel="noopener" href="https://php.net/docs">php.net/docs</a>.</p>
<h2 id="Installation"><a href="#Installation" class="headerlink" title="Installation"></a>Installation</h2><h3 id="Prebuilt-packages-and-binaries"><a href="#Prebuilt-packages-and-binaries" class="headerlink" title="Prebuilt packages and binaries"></a>Prebuilt packages and binaries</h3><p>Prebuilt packages and binaries can be used to get up and running fast with PHP.</p>
<p>For Windows, the PHP binaries can be obtained from<br><a target="_blank" rel="noopener" href="https://windows.php.net/">windows.php.net</a>. After extracting the archive the<br><code>*.exe</code> files are ready to use.</p>
<p>For other systems, see the <a target="_blank" rel="noopener" href="https://php.net/install">installation chapter</a>.</p>
<h3 id="Building-PHP-source-code"><a href="#Building-PHP-source-code" class="headerlink" title="Building PHP source code"></a>Building PHP source code</h3><p><em>For Windows, see <a target="_blank" rel="noopener" href="https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2">Build your own PHP on Windows</a>.</em></p>
<p>For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For<br>a default build, you will additionally need libxml2 and libsqlite3.</p>
<p>On Ubuntu, you can install these using:</p>
<pre><code>sudo apt install -y pkg-config build-essential autoconf bison re2c \
libxml2-dev libsqlite3-dev
</code></pre>
<p>On Fedora, you can install these using:</p>
<pre><code>sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel
</code></pre>
<p>Generate configure:</p>
<pre><code>./buildconf
</code></pre>
<p>Configure your build. <code>--enable-debug</code> is recommended for development, see<br><code>./configure --help</code> for a full list of options.</p>
<pre><code># For development
./configure --enable-debug
# For production
./configure
</code></pre>
<p>Build PHP. To speed up the build, specify the maximum number of jobs using <code>-j</code>:</p>
<pre><code>make -j4
</code></pre>
<p>The number of jobs should usually match the number of available cores, which<br>can be determined using <code>nproc</code>.</p>
<h2 id="Testing-PHP-source-code"><a href="#Testing-PHP-source-code" class="headerlink" title="Testing PHP source code"></a>Testing PHP source code</h2><p>PHP ships with an extensive test suite, the command <code>make test</code> is used after<br>successful compilation of the sources to run this test suite.</p>
<p>It is possible to run tests using multiple cores by setting <code>-jN</code> in<br><code>TEST_PHP_ARGS</code>:</p>
<pre><code>make TEST_PHP_ARGS=-j4 test
</code></pre>
<p>Shall run <code>make test</code> with a maximum of 4 concurrent jobs: Generally the maximum<br>number of jobs should not exceed the number of cores available.</p>
<p>The <a target="_blank" rel="noopener" href="https://qa.php.net/">qa.php.net</a> site provides more detailed info about<br>testing and quality assurance.</p>
<h2 id="Installing-PHP-built-from-source"><a href="#Installing-PHP-built-from-source" class="headerlink" title="Installing PHP built from source"></a>Installing PHP built from source</h2><p>After a successful build (and test), PHP may be installed with:</p>
<pre><code>make install
</code></pre>
<p>Depending on your permissions and prefix, <code>make install</code> may need super user<br>permissions.</p>
<h2 id="PHP-extensions"><a href="#PHP-extensions" class="headerlink" title="PHP extensions"></a>PHP extensions</h2><p>Extensions provide additional functionality on top of PHP. PHP consists of many<br>essential bundled extensions. Additional extensions can be found in the PHP<br>Extension Community Library - <a target="_blank" rel="noopener" href="https://pecl.php.net/">PECL</a>.</p>
<h2 id="Contributing"><a href="#Contributing" class="headerlink" title="Contributing"></a>Contributing</h2><p>The PHP source code is located in the Git repository at<br><a target="_blank" rel="noopener" href="https://git.php.net/">git.php.net</a>. Contributions are most welcome by forking<br>the <a target="_blank" rel="noopener" href="https://github.com/php/php-src">GitHub mirror repository</a> and sending a<br>pull request.</p>
<p>Discussions are done on GitHub, but depending on the topic can also be relayed<br>to the official PHP developer mailing list <a href="mailto:internals@lists.php.net">internals@lists.php.net</a>.</p>
<p>New features require an RFC and must be accepted by the developers. See<br><a target="_blank" rel="noopener" href="https://wiki.php.net/rfc">Request for comments - RFC</a> and<br><a target="_blank" rel="noopener" href="https://wiki.php.net/rfc/voting">Voting on PHP features</a> for more information<br>on the process.</p>
<p>Bug fixes <strong>do not</strong> require an RFC but require a bug tracker ticket. Open a<br>ticket at <a target="_blank" rel="noopener" href="https://bugs.php.net/">bugs.php.net</a> and reference the bug id using<br><code>#NNNNNN</code>.</p>
<pre><code>Fix #55371: get_magic_quotes_gpc() throws deprecation warning
After removing magic quotes, the get_magic_quotes_gpc function caused a
deprecated warning. get_magic_quotes_gpc can be used to detect the
magic_quotes behavior and therefore should not raise a warning at any time.
The patch removes this warning.
</code></pre>
<p>Pull requests are not merged directly on GitHub. All PRs will be pulled and<br>pushed through <a target="_blank" rel="noopener" href="https://git.php.net/">git.php.net</a>. See<br><a target="_blank" rel="noopener" href="https://wiki.php.net/vcs/gitworkflow">Git workflow</a> for more details.</p>
<h3 id="Guidelines-for-contributors"><a href="#Guidelines-for-contributors" class="headerlink" title="Guidelines for contributors"></a>Guidelines for contributors</h3><p>See further documents in the repository for more information on how to<br>contribute:</p>
<ul>
<li><a href="/CONTRIBUTING.md">Contributing to PHP</a></li>
<li><a href="/CODING_STANDARDS.md">PHP coding standards</a></li>
<li><a href="/docs/mailinglist-rules.md">Mailinglist rules</a></li>
<li><a href="/docs/release-process.md">PHP release process</a></li>
</ul>
<h2 id="Credits"><a href="#Credits" class="headerlink" title="Credits"></a>Credits</h2><p>For the list of people who’ve put work into PHP, please see the<br><a target="_blank" rel="noopener" href="https://php.net/credits.php">PHP credits page</a>.</p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2021/02/11/php/" data-id="cklsy6ytx000erd9561b746uv" data-title="PHP" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/php/" rel="tag">php</a></li></ul>
</footer>
</div>
</article>
<article id="post-about" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2021/02/02/about/" class="article-date">
<time class="dt-published" datetime="2021-02-02T23:00:00.000Z" itemprop="datePublished">2021-02-02</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2021/02/02/about/">About</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<h3 id="Preview"><a href="#Preview" class="headerlink" title="Preview"></a><a target="_blank" rel="noopener" href="https://autoload.github.io/">Preview</a></h3><h2 id="Install"><a href="#Install" class="headerlink" title="Install"></a>Install</h2><h3 id="For-hexo-lt-5-0"><a href="#For-hexo-lt-5-0" class="headerlink" title="For hexo < 5.0"></a>For hexo < 5.0</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/autoload/hexo-theme-auto.git themes/auto</span><br></pre></td></tr></table></figure>
<h3 id="For-hexo-gt-5-0"><a href="#For-hexo-gt-5-0" class="headerlink" title="For hexo >= 5.0"></a>For hexo >= 5.0</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm i hexo-theme-ayer -S</span><br></pre></td></tr></table></figure>
<ul>
<li>If this theme is newly installed, a <code>_config.auto.yml</code> file will be generated in the root directory after the installation is complete, and you can directly edit the <code>_config.auto.yml</code> file for configuration.</li>
<li>If it is a theme upgrade, you can use the configuration method of hexo < 5.0, or you can move the original configuration file to the root directory and rename it to <code>_config.auto.yml</code>.</li>
</ul>
<h2 id="Enable"><a href="#Enable" class="headerlink" title="Enable"></a>Enable</h2><p>Modify <code>theme</code> setting in <code>_config.yml</code> to <code>auto</code></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">theme:</span> <span class="string">auto</span></span><br></pre></td></tr></table></figure>
<h2 id="Update"><a href="#Update" class="headerlink" title="Update"></a>Update</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> themes/auto</span><br><span class="line">git pull</span><br></pre></td></tr></table></figure>
<h2 id="Multi-Language-Support"><a href="#Multi-Language-Support" class="headerlink" title="Multi Language Support"></a>Multi Language Support</h2><p>zh-CN(Simplified Chinese) en(English) zh-TW(traditional Chinese) ja(Japanese) es(Spanish) de(German) fr(French) ru(Russian) ko(Korean) vi(Vietnamese) nl(Dutch) no(Norwegian) pt(Portuguese)</p>
<p>English is default languge, if you want to change, modify <code>language</code> option in <code>_config.yml</code> file in your blog’s root folder.</p>
<h2 id="Configuration"><a href="#Configuration" class="headerlink" title="Configuration"></a>Configuration</h2><figure class="highlight yml"><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><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Menu-Sidebar</span></span><br><span class="line"><span class="attr">menu:</span></span><br><span class="line"> <span class="attr">Home:</span> <span class="string">/</span></span><br><span class="line"> <span class="attr">Archives:</span> <span class="string">/archives</span></span><br><span class="line"> <span class="attr">Categories:</span> <span class="string">/categories</span></span><br><span class="line"> <span class="attr">Tags:</span> <span class="string">/tags</span></span><br><span class="line"> <span class="attr">About:</span> <span class="string">/about</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Sidebar</span></span><br><span class="line"><span class="attr">sidebar:</span> <span class="string">right</span></span><br><span class="line"><span class="attr">widgets:</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">tag</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">recent_posts</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">category</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">archive</span></span><br></pre></td></tr></table></figure>
<hr>
<br/>
<h2 id="License"><a href="#License" class="headerlink" title="License"></a>License</h2><p>MIT License</p>
<p>Copyright © 2020 <a target="_blank" rel="noopener" href="http://autoload.github.io/">David Wan</a></p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2021/02/02/about/" data-id="cklsy6yth0001rd95a0lc46x5" data-title="About" class="article-share-link">Share</a>
</footer>
</div>
</article>
<article id="post-redis" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2021/01/12/redis/" class="article-date">
<time class="dt-published" datetime="2021-01-12T23:00:00.000Z" itemprop="datePublished">2021-01-12</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/Redis/">Redis</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2021/01/12/redis/">Redis</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p>This README is just a fast <em>quick start</em> document. You can find more detailed documentation at <a target="_blank" rel="noopener" href="https://redis.io/">redis.io</a>.</p>
<h2 id="What-is-Redis"><a href="#What-is-Redis" class="headerlink" title="What is Redis?"></a>What is Redis?</h2><p>Redis is often referred to as a <em>data structures</em> server. What this means is that Redis provides access to mutable data structures via a set of commands, which are sent using a <em>server-client</em> model with TCP sockets and a simple protocol. So different processes can query and modify the same data structures in a shared way.</p>
<p>Data structures implemented into Redis have a few special properties:</p>
<ul>
<li>Redis cares to store them on disk, even if they are always served and modified into the server memory. This means that Redis is fast, but that it is also non-volatile.</li>
<li>The implementation of data structures emphasizes memory efficiency, so data structures inside Redis will likely use less memory compared to the same data structure modelled using a high-level programming language.</li>
<li>Redis offers a number of features that are natural to find in a database, like replication, tunable levels of durability, clustering, and high availability.</li>
</ul>
<p>Another good example is to think of Redis as a more complex version of memcached, where the operations are not just SETs and GETs, but operations that work with complex data types like Lists, Sets, ordered data structures, and so forth.</p>
<p>If you want to know more, this is a list of selected starting points:</p>
<ul>
<li>Introduction to Redis data types. <a target="_blank" rel="noopener" href="http://redis.io/topics/data-types-intro">http://redis.io/topics/data-types-intro</a></li>
<li>Try Redis directly inside your browser. <a target="_blank" rel="noopener" href="http://try.redis.io/">http://try.redis.io</a></li>
<li>The full list of Redis commands. <a target="_blank" rel="noopener" href="http://redis.io/commands">http://redis.io/commands</a></li>
<li>There is much more inside the official Redis documentation. <a target="_blank" rel="noopener" href="http://redis.io/documentation">http://redis.io/documentation</a></li>
</ul>
<h2 id="Building-Redis"><a href="#Building-Redis" class="headerlink" title="Building Redis"></a>Building Redis</h2><p>Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD.<br>We support big endian and little endian architectures, and both 32 bit<br>and 64 bit systems.</p>
<p>It may compile on Solaris derived systems (for instance SmartOS) but our<br>support for this platform is <em>best effort</em> and Redis is not guaranteed to<br>work as well as in Linux, OSX, and *BSD.</p>
<p>It is as simple as:</p>
<pre><code>% make
</code></pre>
<p>To build with TLS support, you’ll need OpenSSL development libraries (e.g.<br>libssl-dev on Debian/Ubuntu) and run:</p>
<pre><code>% make BUILD_TLS=yes
</code></pre>
<p>To build with systemd support, you’ll need systemd development libraries (such<br>as libsystemd-dev on Debian/Ubuntu or systemd-devel on CentOS) and run:</p>
<pre><code>% make USE_SYSTEMD=yes
</code></pre>
<p>To append a suffix to Redis program names, use:</p>
<pre><code>% make PROG_SUFFIX="-alt"
</code></pre>
<p>You can run a 32 bit Redis binary using:</p>
<pre><code>% make 32bit
</code></pre>
<p>After building Redis, it is a good idea to test it using:</p>
<pre><code>% make test
</code></pre>
<p>If TLS is built, running the tests with TLS enabled (you will need <code>tcl-tls</code><br>installed):</p>
<pre><code>% ./utils/gen-test-certs.sh
% ./runtest --tls
</code></pre>
<h2 id="Fixing-build-problems-with-dependencies-or-cached-build-options"><a href="#Fixing-build-problems-with-dependencies-or-cached-build-options" class="headerlink" title="Fixing build problems with dependencies or cached build options"></a>Fixing build problems with dependencies or cached build options</h2><p>Redis has some dependencies which are included in the <code>deps</code> directory.<br><code>make</code> does not automatically rebuild dependencies even if something in<br>the source code of dependencies changes.</p>
<p>When you update the source code with <code>git pull</code> or when code inside the<br>dependencies tree is modified in any other way, make sure to use the following<br>command in order to really clean everything and rebuild from scratch:</p>
<pre><code>make distclean
</code></pre>
<p>This will clean: jemalloc, lua, hiredis, linenoise.</p>
<p>Also if you force certain build options like 32bit target, no C compiler<br>optimizations (for debugging purposes), and other similar build time options,<br>those options are cached indefinitely until you issue a <code>make distclean</code><br>command.</p>
<h2 id="Fixing-problems-building-32-bit-binaries"><a href="#Fixing-problems-building-32-bit-binaries" class="headerlink" title="Fixing problems building 32 bit binaries"></a>Fixing problems building 32 bit binaries</h2><p>If after building Redis with a 32 bit target you need to rebuild it<br>with a 64 bit target, or the other way around, you need to perform a<br><code>make distclean</code> in the root directory of the Redis distribution.</p>
<p>In case of build errors when trying to build a 32 bit binary of Redis, try<br>the following steps:</p>
<ul>
<li>Install the package libc6-dev-i386 (also try g++-multilib).</li>
<li>Try using the following command line instead of <code>make 32bit</code>:<br><code>make CFLAGS="-m32 -march=native" LDFLAGS="-m32"</code></li>
</ul>
<h2 id="Allocator"><a href="#Allocator" class="headerlink" title="Allocator"></a>Allocator</h2><p>Selecting a non-default memory allocator when building Redis is done by setting<br>the <code>MALLOC</code> environment variable. Redis is compiled and linked against libc<br>malloc by default, with the exception of jemalloc being the default on Linux<br>systems. This default was picked because jemalloc has proven to have fewer<br>fragmentation problems than libc malloc.</p>
<p>To force compiling against libc malloc, use:</p>
<pre><code>% make MALLOC=libc
</code></pre>
<p>To compile against jemalloc on Mac OS X systems, use:</p>
<pre><code>% make MALLOC=jemalloc
</code></pre>
<h2 id="Monotonic-clock"><a href="#Monotonic-clock" class="headerlink" title="Monotonic clock"></a>Monotonic clock</h2><p>By default, Redis will build using the POSIX clock_gettime function as the<br>monotonic clock source. On most modern systems, the internal processor clock<br>can be used to improve performance. Cautions can be found here:<br> <a target="_blank" rel="noopener" href="http://oliveryang.net/2015/09/pitfalls-of-TSC-usage/">http://oliveryang.net/2015/09/pitfalls-of-TSC-usage/</a></p>
<p>To build with support for the processor’s internal instruction clock, use:</p>
<pre><code>% make CFLAGS="-DUSE_PROCESSOR_CLOCK"
</code></pre>
<h2 id="Verbose-build"><a href="#Verbose-build" class="headerlink" title="Verbose build"></a>Verbose build</h2><p>Redis will build with a user-friendly colorized output by default.<br>If you want to see a more verbose output, use the following:</p>
<pre><code>% make V=1
</code></pre>
<h2 id="Running-Redis"><a href="#Running-Redis" class="headerlink" title="Running Redis"></a>Running Redis</h2><p>To run Redis with the default configuration, just type:</p>
<pre><code>% cd src
% ./redis-server
</code></pre>
<p>If you want to provide your redis.conf, you have to run it using an additional<br>parameter (the path of the configuration file):</p>
<pre><code>% cd src
% ./redis-server /path/to/redis.conf
</code></pre>
<p>It is possible to alter the Redis configuration by passing parameters directly<br>as options using the command line. Examples:</p>
<pre><code>% ./redis-server --port 9999 --replicaof 127.0.0.1 6379
% ./redis-server /etc/redis/6379.conf --loglevel debug
</code></pre>
<p>All the options in redis.conf are also supported as options using the command<br>line, with exactly the same name.</p>
<h2 id="Running-Redis-with-TLS"><a href="#Running-Redis-with-TLS" class="headerlink" title="Running Redis with TLS:"></a>Running Redis with TLS:</h2><p>Please consult the <a href="TLS.md">TLS.md</a> file for more information on<br>how to use Redis with TLS.</p>
<h2 id="Playing-with-Redis"><a href="#Playing-with-Redis" class="headerlink" title="Playing with Redis"></a>Playing with Redis</h2><p>You can use redis-cli to play with Redis. Start a redis-server instance,<br>then in another terminal try the following:</p>
<pre><code>% cd src
% ./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis>
</code></pre>
<p>You can find the list of all the available commands at <a target="_blank" rel="noopener" href="http://redis.io/commands">http://redis.io/commands</a>.</p>
<h2 id="Installing-Redis"><a href="#Installing-Redis" class="headerlink" title="Installing Redis"></a>Installing Redis</h2><p>In order to install Redis binaries into /usr/local/bin, just use:</p>
<pre><code>% make install
</code></pre>
<p>You can use <code>make PREFIX=/some/other/directory install</code> if you wish to use a<br>different destination.</p>
<p>Make install will just install binaries in your system, but will not configure<br>init scripts and configuration files in the appropriate place. This is not<br>needed if you just want to play a bit with Redis, but if you are installing<br>it the proper way for a production system, we have a script that does this<br>for Ubuntu and Debian systems:</p>
<pre><code>% cd utils
% ./install_server.sh
</code></pre>
<p><em>Note</em>: <code>install_server.sh</code> will not work on Mac OSX; it is built for Linux only.</p>
<p>The script will ask you a few questions and will setup everything you need<br>to run Redis properly as a background daemon that will start again on<br>system reboots.</p>
<p>You’ll be able to stop and start Redis using the script named<br><code>/etc/init.d/redis_<portnumber></code>, for instance <code>/etc/init.d/redis_6379</code>.</p>
<h2 id="Code-contributions"><a href="#Code-contributions" class="headerlink" title="Code contributions"></a>Code contributions</h2><p>Note: By contributing code to the Redis project in any form, including sending<br>a pull request via Github, a code fragment or patch via private email or<br>public discussion groups, you agree to release your code under the terms<br>of the BSD license that you can find in the <a target="_blank" rel="noopener" href="https://github.com/redis/redis/blob/unstable/COPYING">COPYING</a> file included in the Redis<br>source distribution.</p>
<p>Please see the <a target="_blank" rel="noopener" href="https://github.com/redis/redis/blob/unstable/CONTRIBUTING">CONTRIBUTING</a> file in this source distribution for more<br>information, including details on our process for security bugs/vulnerabilities.</p>
<h1 id="Redis-internals"><a href="#Redis-internals" class="headerlink" title="Redis internals"></a>Redis internals</h1><p>If you are reading this README you are likely in front of a Github page<br>or you just untarred the Redis distribution tar ball. In both the cases<br>you are basically one step away from the source code, so here we explain<br>the Redis source code layout, what is in each file as a general idea, the<br>most important functions and structures inside the Redis server and so forth.<br>We keep all the discussion at a high level without digging into the details<br>since this document would be huge otherwise and our code base changes<br>continuously, but a general idea should be a good starting point to<br>understand more. Moreover most of the code is heavily commented and easy<br>to follow.</p>
<h2 id="Source-code-layout"><a href="#Source-code-layout" class="headerlink" title="Source code layout"></a>Source code layout</h2><p>The Redis root directory just contains this README, the Makefile which<br>calls the real Makefile inside the <code>src</code> directory and an example<br>configuration for Redis and Sentinel. You can find a few shell<br>scripts that are used in order to execute the Redis, Redis Cluster and<br>Redis Sentinel unit tests, which are implemented inside the <code>tests</code><br>directory.</p>
<p>Inside the root are the following important directories:</p>
<ul>
<li><code>src</code>: contains the Redis implementation, written in C.</li>
<li><code>tests</code>: contains the unit tests, implemented in Tcl.</li>
<li><code>deps</code>: contains libraries Redis uses. Everything needed to compile Redis is inside this directory; your system just needs to provide <code>libc</code>, a POSIX compatible interface and a C compiler. Notably <code>deps</code> contains a copy of <code>jemalloc</code>, which is the default allocator of Redis under Linux. Note that under <code>deps</code> there are also things which started with the Redis project, but for which the main repository is not <code>redis/redis</code>.</li>
</ul>
<p>There are a few more directories but they are not very important for our goals<br>here. We’ll focus mostly on <code>src</code>, where the Redis implementation is contained,<br>exploring what there is inside each file. The order in which files are<br>exposed is the logical one to follow in order to disclose different layers<br>of complexity incrementally.</p>
<p>Note: lately Redis was refactored quite a bit. Function names and file<br>names have been changed, so you may find that this documentation reflects the<br><code>unstable</code> branch more closely. For instance, in Redis 3.0 the <code>server.c</code><br>and <code>server.h</code> files were named <code>redis.c</code> and <code>redis.h</code>. However the overall<br>structure is the same. Keep in mind that all the new developments and pull<br>requests should be performed against the <code>unstable</code> branch.</p>
<h2 id="server-h"><a href="#server-h" class="headerlink" title="server.h"></a>server.h</h2><p>The simplest way to understand how a program works is to understand the<br>data structures it uses. So we’ll start from the main header file of<br>Redis, which is <code>server.h</code>.</p>
<p>All the server configuration and in general all the shared state is<br>defined in a global structure called <code>server</code>, of type <code>struct redisServer</code>.<br>A few important fields in this structure are:</p>
<ul>
<li><code>server.db</code> is an array of Redis databases, where data is stored.</li>
<li><code>server.commands</code> is the command table.</li>
<li><code>server.clients</code> is a linked list of clients connected to the server.</li>
<li><code>server.master</code> is a special client, the master, if the instance is a replica.</li>
</ul>
<p>There are tons of other fields. Most fields are commented directly inside<br>the structure definition.</p>
<p>Another important Redis data structure is the one defining a client.<br>In the past it was called <code>redisClient</code>, now just <code>client</code>. The structure<br>has many fields, here we’ll just show the main ones:</p>
<pre><code>struct client {
int fd;
sds querybuf;
int argc;
robj **argv;
redisDb *db;
int flags;
list *reply;
char buf[PROTO_REPLY_CHUNK_BYTES];
... many other fields ...
}
</code></pre>
<p>The client structure defines a <em>connected client</em>:</p>
<ul>
<li>The <code>fd</code> field is the client socket file descriptor.</li>
<li><code>argc</code> and <code>argv</code> are populated with the command the client is executing, so that functions implementing a given Redis command can read the arguments.</li>
<li><code>querybuf</code> accumulates the requests from the client, which are parsed by the Redis server according to the Redis protocol and executed by calling the implementations of the commands the client is executing.</li>
<li><code>reply</code> and <code>buf</code> are dynamic and static buffers that accumulate the replies the server sends to the client. These buffers are incrementally written to the socket as soon as the file descriptor is writeable.</li>
</ul>
<p>As you can see in the client structure above, arguments in a command<br>are described as <code>robj</code> structures. The following is the full <code>robj</code><br>structure, which defines a <em>Redis object</em>:</p>
<pre><code>typedef struct redisObject {
unsigned type:4;
unsigned encoding:4;
unsigned lru:LRU_BITS; /* lru time (relative to server.lruclock) */
int refcount;
void *ptr;
} robj;
</code></pre>
<p>Basically this structure can represent all the basic Redis data types like<br>strings, lists, sets, sorted sets and so forth. The interesting thing is that<br>it has a <code>type</code> field, so that it is possible to know what type a given<br>object has, and a <code>refcount</code>, so that the same object can be referenced<br>in multiple places without allocating it multiple times. Finally the <code>ptr</code><br>field points to the actual representation of the object, which might vary<br>even for the same type, depending on the <code>encoding</code> used.</p>
<p>Redis objects are used extensively in the Redis internals, however in order<br>to avoid the overhead of indirect accesses, recently in many places<br>we just use plain dynamic strings not wrapped inside a Redis object.</p>
<h2 id="server-c"><a href="#server-c" class="headerlink" title="server.c"></a>server.c</h2><p>This is the entry point of the Redis server, where the <code>main()</code> function<br>is defined. The following are the most important steps in order to startup<br>the Redis server.</p>
<ul>
<li><code>initServerConfig()</code> sets up the default values of the <code>server</code> structure.</li>
<li><code>initServer()</code> allocates the data structures needed to operate, setup the listening socket, and so forth.</li>
<li><code>aeMain()</code> starts the event loop which listens for new connections.</li>
</ul>
<p>There are two special functions called periodically by the event loop:</p>
<ol>
<li><code>serverCron()</code> is called periodically (according to <code>server.hz</code> frequency), and performs tasks that must be performed from time to time, like checking for timed out clients.</li>
<li><code>beforeSleep()</code> is called every time the event loop fired, Redis served a few requests, and is returning back into the event loop.</li>
</ol>
<p>Inside server.c you can find code that handles other vital things of the Redis server:</p>
<ul>
<li><code>call()</code> is used in order to call a given command in the context of a given client.</li>
<li><code>activeExpireCycle()</code> handles eviction of keys with a time to live set via the <code>EXPIRE</code> command.</li>
<li><code>performEvictions()</code> is called when a new write command should be performed but Redis is out of memory according to the <code>maxmemory</code> directive.</li>
<li>The global variable <code>redisCommandTable</code> defines all the Redis commands, specifying the name of the command, the function implementing the command, the number of arguments required, and other properties of each command.</li>
</ul>
<h2 id="networking-c"><a href="#networking-c" class="headerlink" title="networking.c"></a>networking.c</h2><p>This file defines all the I/O functions with clients, masters and replicas<br>(which in Redis are just special clients):</p>
<ul>
<li><code>createClient()</code> allocates and initializes a new client.</li>
<li>the <code>addReply*()</code> family of functions are used by command implementations in order to append data to the client structure, that will be transmitted to the client as a reply for a given command executed.</li>
<li><code>writeToClient()</code> transmits the data pending in the output buffers to the client and is called by the <em>writable event handler</em> <code>sendReplyToClient()</code>.</li>
<li><code>readQueryFromClient()</code> is the <em>readable event handler</em> and accumulates data read from the client into the query buffer.</li>
<li><code>processInputBuffer()</code> is the entry point in order to parse the client query buffer according to the Redis protocol. Once commands are ready to be processed, it calls <code>processCommand()</code> which is defined inside <code>server.c</code> in order to actually execute the command.</li>
<li><code>freeClient()</code> deallocates, disconnects and removes a client.</li>
</ul>
<h2 id="aof-c-and-rdb-c"><a href="#aof-c-and-rdb-c" class="headerlink" title="aof.c and rdb.c"></a>aof.c and rdb.c</h2><p>As you can guess from the names, these files implement the RDB and AOF<br>persistence for Redis. Redis uses a persistence model based on the <code>fork()</code><br>system call in order to create a thread with the same (shared) memory<br>content of the main Redis thread. This secondary thread dumps the content<br>of the memory on disk. This is used by <code>rdb.c</code> to create the snapshots<br>on disk and by <code>aof.c</code> in order to perform the AOF rewrite when the<br>append only file gets too big.</p>
<p>The implementation inside <code>aof.c</code> has additional functions in order to<br>implement an API that allows commands to append new commands into the AOF<br>file as clients execute them.</p>
<p>The <code>call()</code> function defined inside <code>server.c</code> is responsible for calling<br>the functions that in turn will write the commands into the AOF.</p>
<h2 id="db-c"><a href="#db-c" class="headerlink" title="db.c"></a>db.c</h2><p>Certain Redis commands operate on specific data types; others are general.<br>Examples of generic commands are <code>DEL</code> and <code>EXPIRE</code>. They operate on keys<br>and not on their values specifically. All those generic commands are<br>defined inside <code>db.c</code>.</p>
<p>Moreover <code>db.c</code> implements an API in order to perform certain operations<br>on the Redis dataset without directly accessing the internal data structures.</p>
<p>The most important functions inside <code>db.c</code> which are used in many command<br>implementations are the following:</p>
<ul>
<li><code>lookupKeyRead()</code> and <code>lookupKeyWrite()</code> are used in order to get a pointer to the value associated to a given key, or <code>NULL</code> if the key does not exist.</li>
<li><code>dbAdd()</code> and its higher level counterpart <code>setKey()</code> create a new key in a Redis database.</li>
<li><code>dbDelete()</code> removes a key and its associated value.</li>
<li><code>emptyDb()</code> removes an entire single database or all the databases defined.</li>
</ul>
<p>The rest of the file implements the generic commands exposed to the client.</p>
<h2 id="object-c"><a href="#object-c" class="headerlink" title="object.c"></a>object.c</h2><p>The <code>robj</code> structure defining Redis objects was already described. Inside<br><code>object.c</code> there are all the functions that operate with Redis objects at<br>a basic level, like functions to allocate new objects, handle the reference<br>counting and so forth. Notable functions inside this file:</p>
<ul>
<li><code>incrRefCount()</code> and <code>decrRefCount()</code> are used in order to increment or decrement an object reference count. When it drops to 0 the object is finally freed.</li>
<li><code>createObject()</code> allocates a new object. There are also specialized functions to allocate string objects having a specific content, like <code>createStringObjectFromLongLong()</code> and similar functions.</li>
</ul>
<p>This file also implements the <code>OBJECT</code> command.</p>
<h2 id="replication-c"><a href="#replication-c" class="headerlink" title="replication.c"></a>replication.c</h2><p>This is one of the most complex files inside Redis, it is recommended to<br>approach it only after getting a bit familiar with the rest of the code base.<br>In this file there is the implementation of both the master and replica role<br>of Redis.</p>
<p>One of the most important functions inside this file is <code>replicationFeedSlaves()</code> that writes commands to the clients representing replica instances connected<br>to our master, so that the replicas can get the writes performed by the clients:<br>this way their data set will remain synchronized with the one in the master.</p>
<p>This file also implements both the <code>SYNC</code> and <code>PSYNC</code> commands that are<br>used in order to perform the first synchronization between masters and<br>replicas, or to continue the replication after a disconnection.</p>
<h2 id="Other-C-files"><a href="#Other-C-files" class="headerlink" title="Other C files"></a>Other C files</h2><ul>
<li><code>t_hash.c</code>, <code>t_list.c</code>, <code>t_set.c</code>, <code>t_string.c</code>, <code>t_zset.c</code> and <code>t_stream.c</code> contains the implementation of the Redis data types. They implement both an API to access a given data type, and the client command implementations for these data types.</li>
<li><code>ae.c</code> implements the Redis event loop, it’s a self contained library which is simple to read and understand.</li>
<li><code>sds.c</code> is the Redis string library, check <a target="_blank" rel="noopener" href="http://github.com/antirez/sds">http://github.com/antirez/sds</a> for more information.</li>
<li><code>anet.c</code> is a library to use POSIX networking in a simpler way compared to the raw interface exposed by the kernel.</li>
<li><code>dict.c</code> is an implementation of a non-blocking hash table which rehashes incrementally.</li>
<li><code>scripting.c</code> implements Lua scripting. It is completely self-contained and isolated from the rest of the Redis implementation and is simple enough to understand if you are familiar with the Lua API.</li>
<li><code>cluster.c</code> implements the Redis Cluster. Probably a good read only after being very familiar with the rest of the Redis code base. If you want to read <code>cluster.c</code> make sure to read the <a target="_blank" rel="noopener" href="http://redis.io/topics/cluster-spec">Redis Cluster specification</a>.</li>
</ul>
<h2 id="Anatomy-of-a-Redis-command"><a href="#Anatomy-of-a-Redis-command" class="headerlink" title="Anatomy of a Redis command"></a>Anatomy of a Redis command</h2><p>All the Redis commands are defined in the following way:</p>
<pre><code>void foobarCommand(client *c) {
printf("%s",c->argv[1]->ptr); /* Do something with the argument. */
addReply(c,shared.ok); /* Reply something to the client. */
}
</code></pre>
<p>The command is then referenced inside <code>server.c</code> in the command table:</p>
<pre><code>{"foobar",foobarCommand,2,"rtF",0,NULL,0,0,0,0,0},
</code></pre>
<p>In the above example <code>2</code> is the number of arguments the command takes,<br>while <code>"rtF"</code> are the command flags, as documented in the command table<br>top comment inside <code>server.c</code>.</p>
<p>After the command operates in some way, it returns a reply to the client,<br>usually using <code>addReply()</code> or a similar function defined inside <code>networking.c</code>.</p>
<p>There are tons of command implementations inside the Redis source code<br>that can serve as examples of actual commands implementations. Writing<br>a few toy commands can be a good exercise to get familiar with the code base.</p>
<p>There are also many other files not described here, but it is useless to<br>cover everything. We just want to help you with the first steps.<br>Eventually you’ll find your way inside the Redis code base :-)</p>
<p>Enjoy!</p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2021/01/12/redis/" data-id="cklsy6yul001mrd9592izf7s0" data-title="Redis" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/C/" rel="tag">C</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/NoSQL/" rel="tag">NoSQL</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/redis/" rel="tag">redis</a></li></ul>
</footer>
</div>
</article>
<article id="post-postman" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2021/01/11/postman/" class="article-date">
<time class="dt-published" datetime="2021-01-11T23:00:00.000Z" itemprop="datePublished">2021-01-11</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/Postman/">Postman</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2021/01/11/postman/">Postman</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p><a target="_blank" rel="noopener" href="https://www.postman.com/"><img src="https://assets.getpostman.com/common-share/postman-logo-horizontal-320x132.png" /></a><br /><br><em>Manage all of your organization’s APIs in Postman, with the industry’s most complete API development environment.</em></p>
<h1 id="Postman-App-Support"><a href="#Postman-App-Support" class="headerlink" title="Postman App Support"></a>Postman App Support</h1><p>If you have a feature request, a new integration idea or you would like to file a bug report, please use this <a target="_blank" rel="noopener" href="https://github.com/postmanlabs/postman-app-support/issues">Github issue tracker</a>. </p>
<p>We <em>recommend</em> that you search the issue tracker to check if someone else has already reported the issue and whether there is a known solution that you can use. This would be the fastest way for you to find a solution to any issue that you are currently facing.</p>
<p>If you are adding a bug report, please add detailed steps to reproduce the bug, the Postman version you’re using, and your OS version. Any additional files (collections, data dumps, console errors, screenshots) would be very helpful and would help us to narrow down the issue as quickly as possible. </p>
<p>We have compiled a quick set of <a href="#guidelines-for-reporting-issues">guidelines for reporting issues</a>.</p>
<blockquote>
<p><strong>Account Specific Queries:</strong><br /><br>If you have any billing or account-specific queries, reach out to us at <a href="mailto:[email protected]">[email protected]</a>.</p>
</blockquote>
<p>We are also there as <a target="_blank" rel="noopener" href="https://www.twitter.com/getpostman">@getpostman</a> on Twitter. Feel free to drop in a line wherever it is easiest for you. Twitter would be the best place for you to stay updated with the latest news, features, and releases regarding Postman.</p>
<h3 id="The-Community"><a href="#The-Community" class="headerlink" title="The Community"></a>The Community</h3><img src="https://avatars1.githubusercontent.com/u/3220138?v=3&s=120" align="right" />
<a target="_blank" rel="noopener" href="https://community.postman.com">The Postman Community Forum</a> offers you different ways to engage with other Postman enthusiasts. Feel free to drop by and say hello.<br />
<p>Sign in using your Postman account to participate in the discussions. Don’t want to log in? Then lurk on the sidelines and absorb all the knowledge.</p>
<h3 id="Product-Roadmap"><a href="#Product-Roadmap" class="headerlink" title="Product Roadmap"></a>Product Roadmap</h3><p>If you are curious about the features and enhancements planned for upcoming releases, check out <a target="_blank" rel="noopener" href="https://trello.com/b/4N7PnHAz/postman-roadmap-for-developers">Postman’s roadmap</a>.</p>
<p>Want early access to these features? Some of the enhancements are available in our latest Canary builds available for download on OSX (<a target="_blank" rel="noopener" href="https://dl.pstmn.io/download/channel/canary/osx_64">x64</a>) / Windows (<a target="_blank" rel="noopener" href="https://dl.pstmn.io/download/channel/canary/windows_32">x86</a> or <a target="_blank" rel="noopener" href="https://dl.pstmn.io/download/channel/canary/windows_64">x64</a>) / Linux (<a target="_blank" rel="noopener" href="https://dl.pstmn.io/download/channel/canary/linux_32">x86</a> or <a target="_blank" rel="noopener" href="https://dl.pstmn.io/download/channel/canary/linux_64">x64</a>). </p>
<h3 id="Documentation-and-Tutorials"><a href="#Documentation-and-Tutorials" class="headerlink" title="Documentation and Tutorials"></a>Documentation and Tutorials</h3><p>If you are looking for more information regarding features, installation, and usage of the app, head over to the <a target="_blank" href="https://learning.postman.com/">documentation section on our website</a>. You can also have a look at our blog at <a target="_blank" href="https://blog.postman.com">https://blog.postman.com</a> for interesting tutorials, development stories, and platform updates.</p>
<p><img src="https://assets.postman.com/postman-docs/postman-app-default-v8.jpg" alt="[screenshot](https://assets.postman.com/postman-docs/postman-app-default-v8.jpg"></p>
<h2 id="Guidelines-for-reporting-issues"><a href="#Guidelines-for-reporting-issues" class="headerlink" title="Guidelines for reporting issues"></a>Guidelines for reporting issues</h2><p>We have put together a short set of guidelines you can follow while adding an issue to our <a target="_blank" rel="noopener" href="https://github.com/postmanlabs/postman-app-support/issues">GitHub issue tracker</a>. Following this should help speedy resolution of issues.</p>
<ol>
<li><p>This issue tracker is only for Postman App related issues, along with other services accessible from the app.<br>If you have Newman specific issues, a better place to report them would be the Newman issue tracker at <a target="_blank" rel="noopener" href="https://github.com/postmanlabs/newman/issues">https://github.com/postmanlabs/newman/issues</a></p>
</li>
<li><p>If you are facing a Postman Cloud-related issue (such as sync, cloud-api, documenter, etc) and you want to include personal information such as your username or collection names, then mail us at <a href="mailto:[email protected]">[email protected]</a>.</p>
</li>
<li><p>If you want to report a security issue in any of Postman’s services or products, read our <a target="_blank" rel="noopener" href="https://www.postman.com/vulnerability-reporting">security reporting guidelines and policy</a> for more details.</p>
</li>
<li><p>Answer to questions along the lines of “How do I… in Postman” should be in our online documentation at <a target="_blank" rel="noopener" href="https://learning.postman.com/">https://learning.postman.com/</a>. If you are unable to find a how-to guide in our online documentation, feel free to ask your question on our <a target="_blank" rel="noopener" href="https://community.postman.com/">Postman Community Forum</a>.</p>
</li>
<li><p>Before reporting an issue use the search feature on the issues page to check if there are issues similar to yours. A lot of issues are duplicates, and it is hard to keep track of them or respond when the issues are solved. If you find your issue already reported, feel free to add a “thumbs up” reaction and we will keep a note of it.</p>
</li>
<li><p>When reporting a new issue in the issue tracker, check whether it helps to answer the following questions:</p>
<ul>
<li><p>Which Postman App and Operating System version you are using. You can check this out in <em>Settings -> About</em> section.</p>
</li>
<li><p>Is the bug reproducible every time, or do you see it occasionally?</p>
</li>
<li><p>Did you first encounter it recently, or has it always been there?</p>
</li>
<li><p>If it is a UI issue, a screenshot or GIF will help tremendously. (Tip: For quick gifs, check out <a target="_blank" rel="noopener" href="http://www.cockos.com/licecap/">http://www.cockos.com/licecap/</a>)</p>
</li>
<li><p>If the issue is related to a script in the sandbox, attach the full code snippet and ensure that this is formatted correctly using the code block <a target="_blank" rel="noopener" href="https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks">markdown syntax</a> </p>
</li>
<li><p>Do you have the <a target="_blank" rel="noopener" href="https://learning.postman.com/docs/postman/sending-api-requests/capturing-http-requests/">Postman Interceptor</a> switched on? (applicable for the Chrome app)</p>
</li>
<li><p>If the request/response flow is not working, be sure to check and include details from the DevTools window (More on this at <a target="_blank" rel="noopener" href="https://learning.postman.com/docs/postman/sending-api-requests/debugging-and-logs/">https://learning.postman.com/docs/postman/sending-api-requests/debugging-and-logs/</a>).</p>
</li>
</ul>
<h1 id="We-are-hiring"><a href="#We-are-hiring" class="headerlink" title="We are hiring!"></a>We are hiring!</h1></li>
</ol>
<p>Want to help us solve <a target="_blank" rel="noopener" href="https://github.com/postmanlabs/postman-app-support/issues">these issues</a>? <a target="_blank" rel="noopener" href="https://www.postman.com/jobs/">We are hiring</a> engineers! Postman has grown a lot since it started as a side-project. More than 10 million people use Postman within thousands of companies across the world for everything API related. We are working hard to meet the expectations of the Postman community. If you want to build something amazing with us, <a target="_blank" rel="noopener" href="https://www.postman.com/jobs/">reach out</a>!</p>
<h2 id="About-Postman"><a href="#About-Postman" class="headerlink" title="About Postman"></a>About Postman</h2><p>Postman is a collaboration platform for API development. Postman’s features simplify each step of building an API and streamline collaboration so you can create better APIs—faster.</p>
<p>Read more on our website: <a target="_blank" rel="noopener" href="https://www.postman.com/">https://www.postman.com/</a></p>
<hr>
<p>If you have issues or code contribution pertaining to Postman legacy version, head over to the <a target="_blank" rel="noopener" href="https://github.com/postmanlabs/postman-chrome-extension-legacy">postmanlabs/postman-chrome-extension-legacy</a> repository.</p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2021/01/11/postman/" data-id="ckm5y3l9g0000x895c96i6mrk" data-title="Postman" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/postman/" rel="tag">postman</a></li></ul>
</footer>
</div>
</article>
<article id="post-laravel" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2020/12/12/laravel/" class="article-date">
<time class="dt-published" datetime="2020-12-12T23:00:00.000Z" itemprop="datePublished">2020-12-12</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/Laravel/">Laravel</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2020/12/12/laravel/">Laravel</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
<p align="center">
<a target="_blank" rel="noopener" href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a target="_blank" rel="noopener" href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a target="_blank" rel="noopener" href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a target="_blank" rel="noopener" href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
<h2 id="About-Laravel"><a href="#About-Laravel" class="headerlink" title="About Laravel"></a>About Laravel</h2><p>Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://laravel.com/docs/routing">Simple, fast routing engine</a>.</li>
<li><a target="_blank" rel="noopener" href="https://laravel.com/docs/container">Powerful dependency injection container</a>.</li>
<li>Multiple back-ends for <a target="_blank" rel="noopener" href="https://laravel.com/docs/session">session</a> and <a target="_blank" rel="noopener" href="https://laravel.com/docs/cache">cache</a> storage.</li>
<li>Expressive, intuitive <a target="_blank" rel="noopener" href="https://laravel.com/docs/eloquent">database ORM</a>.</li>
<li>Database agnostic <a target="_blank" rel="noopener" href="https://laravel.com/docs/migrations">schema migrations</a>.</li>
<li><a target="_blank" rel="noopener" href="https://laravel.com/docs/queues">Robust background job processing</a>.</li>
<li><a target="_blank" rel="noopener" href="https://laravel.com/docs/broadcasting">Real-time event broadcasting</a>.</li>
</ul>
<p>Laravel is accessible, powerful, and provides tools required for large, robust applications.</p>
<h2 id="Learning-Laravel"><a href="#Learning-Laravel" class="headerlink" title="Learning Laravel"></a>Learning Laravel</h2><p>Laravel has the most extensive and thorough <a target="_blank" rel="noopener" href="https://laravel.com/docs">documentation</a> and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.</p>
<p>If you don’t feel like reading, <a target="_blank" rel="noopener" href="https://laracasts.com/">Laracasts</a> can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.</p>
<h2 id="Laravel-Sponsors"><a href="#Laravel-Sponsors" class="headerlink" title="Laravel Sponsors"></a>Laravel Sponsors</h2><p>We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel <a target="_blank" rel="noopener" href="https://patreon.com/taylorotwell">Patreon page</a>.</p>
<h3 id="Premium-Partners"><a href="#Premium-Partners" class="headerlink" title="Premium Partners"></a>Premium Partners</h3><ul>
<li><strong><a target="_blank" rel="noopener" href="https://vehikl.com/">Vehikl</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://tighten.co/">Tighten Co.</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://kirschbaumdevelopment.com/">Kirschbaum Development Group</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://64robots.com/">64 Robots</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://cubettech.com/">Cubet Techno Labs</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://cyber-duck.co.uk/">Cyber-Duck</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://www.many.co.uk/">Many</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://www.webdock.io/en">Webdock, Fast VPS Hosting</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://devsquad.com/">DevSquad</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://www.curotec.com/">Curotec</a></strong></li>
<li><strong><a target="_blank" rel="noopener" href="https://op.gg/">OP.GG</a></strong></li>
</ul>
<h2 id="Contributing"><a href="#Contributing" class="headerlink" title="Contributing"></a>Contributing</h2><p>Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the <a target="_blank" rel="noopener" href="https://laravel.com/docs/contributions">Laravel documentation</a>.</p>
<h2 id="Code-of-Conduct"><a href="#Code-of-Conduct" class="headerlink" title="Code of Conduct"></a>Code of Conduct</h2><p>In order to ensure that the Laravel community is welcoming to all, please review and abide by the <a target="_blank" rel="noopener" href="https://laravel.com/docs/contributions#code-of-conduct">Code of Conduct</a>.</p>
<h2 id="Security-Vulnerabilities"><a href="#Security-Vulnerabilities" class="headerlink" title="Security Vulnerabilities"></a>Security Vulnerabilities</h2><p>If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via <a href="mailto:[email protected]">[email protected]</a>. All security vulnerabilities will be promptly addressed.</p>
<h2 id="License"><a href="#License" class="headerlink" title="License"></a>License</h2><p>The Laravel framework is open-sourced software licensed under the <a target="_blank" rel="noopener" href="https://opensource.org/licenses/MIT">MIT license</a>.</p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2020/12/12/laravel/" data-id="cklsy6ytu000ard95a1v711tc" data-title="Laravel" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/laravel/" rel="tag">laravel</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/php/" rel="tag">php</a></li></ul>
</footer>
</div>
</article>
<article id="post-yii2" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2020/11/12/yii2/" class="article-date">
<time class="dt-published" datetime="2020-11-12T23:00:00.000Z" itemprop="datePublished">2020-11-12</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/Yii2/">Yii2</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2020/11/12/yii2/">Yii2</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p align="center">
<a href="https://www.yiiframework.com/" target="_blank">
<img src="https://www.yiiframework.com/files/logo/yii.png" width="400" alt="Yii Framework" />
</a>
</p>
<p>Yii 2 is a modern framework designed to be a solid foundation for your PHP application.</p>
<p>It is fast, secure and efficient and works right out of the box pre-configured with reasonable defaults.<br>The framework is easy to adjust to meet your needs, because Yii has been designed to be flexible.</p>
<p><a target="_blank" rel="noopener" href="https://packagist.org/packages/yiisoft/yii2"><img src="https://img.shields.io/packagist/v/yiisoft/yii2.svg" alt="Latest Stable Version"></a><br><a target="_blank" rel="noopener" href="https://packagist.org/packages/yiisoft/yii2"><img src="https://img.shields.io/packagist/dt/yiisoft/yii2.svg" alt="Total Downloads"></a><br><a target="_blank" rel="noopener" href="https://github.com/yiisoft/yii2/actions"><img src="https://github.com/yiisoft/yii2/workflows/build/badge.svg" alt="Build Status"></a><br><a target="_blank" rel="noopener" href="https://scrutinizer-ci.com/g/yiisoft/yii2/"><img src="https://scrutinizer-ci.com/g/yiisoft/yii2/badges/coverage.png?s=31d80f1036099e9d6a3e4d7738f6b000b3c3d10e" alt="Code Coverage"></a><br><a target="_blank" rel="noopener" href="https://scrutinizer-ci.com/g/yiisoft/yii2/"><img src="https://scrutinizer-ci.com/g/yiisoft/yii2/badges/quality-score.png?s=b1074a1ff6d0b214d54fa5ab7abbb90fc092471d" alt="Scrutinizer Quality Score"></a></p>
<h2 id="Installation"><a href="#Installation" class="headerlink" title="Installation"></a>Installation</h2><ul>
<li>The minimum required PHP version of Yii is PHP 5.4.</li>
<li>It works best with PHP 7.</li>
<li><a target="_blank" rel="noopener" href="https://www.yiiframework.com/doc-2.0/guide-start-installation.html">Follow the Definitive Guide</a><br>in order to get step by step instructions.</li>
</ul>
<h2 id="Documentation"><a href="#Documentation" class="headerlink" title="Documentation"></a>Documentation</h2><ul>
<li>A <a target="_blank" rel="noopener" href="https://www.yiiframework.com/doc/guide/2.0">Definitive Guide</a> and<br>a <a target="_blank" rel="noopener" href="https://www.yiiframework.com/doc/api/2.0">Class Reference</a> cover every detail<br>of the framework.</li>
<li>There is a <a target="_blank" rel="noopener" href="https://www.yiiframework.com/doc/download/yii-guide-2.0-en.pdf">PDF version</a> of the Definitive Guide<br>and a <a target="_blank" rel="noopener" href="http://stuff.cebe.cc/yii2docs/">Definitive Guide Mirror</a> which is updated every 15 minutes.</li>
<li>For Yii 1.1 users, there is <a target="_blank" rel="noopener" href="https://www.yiiframework.com/doc/guide/2.0/en/intro-upgrade-from-v1">Upgrading from Yii 1.1</a><br>to get an idea of what has changed in 2.0.</li>
</ul>
<h2 id="Community"><a href="#Community" class="headerlink" title="Community"></a>Community</h2><ul>
<li>Participate in <a target="_blank" rel="noopener" href="https://www.yiiframework.com/forum/">discussions at forums</a>.</li>
<li><a target="_blank" rel="noopener" href="https://join.slack.com/t/yii/shared_invite/MjIxMjMxMTk5MTU1LTE1MDE3MDAwMzMtM2VkMTMyMjY1Ng">Community Slack</a> and <a target="_blank" rel="noopener" href="https://www.yiiframework.com/chat/">Chat in IRC</a>.</li>
<li>Follow us on <a target="_blank" rel="noopener" href="https://www.facebook.com/groups/yiitalk/">Facebook</a>, <a target="_blank" rel="noopener" href="https://twitter.com/yiiframework">Twitter</a><br>and <a target="_blank" rel="noopener" href="https://github.com/yiisoft/yii2">GitHub</a>.</li>
<li>Check <a target="_blank" rel="noopener" href="https://github.com/yiisoft/yii2/wiki/communities">other communities</a>.</li>
</ul>
<h2 id="Contributing"><a href="#Contributing" class="headerlink" title="Contributing"></a>Contributing</h2><p>The framework is <a href="LICENSE.md">Open Source</a> powered by <a target="_blank" rel="noopener" href="https://github.com/yiisoft/yii2/graphs/contributors">an excellent community</a>.</p>
<p>You may join us and:</p>
<ul>
<li><a href="docs/internals/report-an-issue.md">Report an issue</a></li>
<li><a href="docs/internals/translation-workflow.md">Translate documentation or messages</a></li>
<li><a target="_blank" rel="noopener" href="https://www.yiiframework.com/forum/index.php/forum/42-general-discussions-for-yii-20/">Give us feedback or start a design discussion</a></li>
<li><a href="docs/internals/git-workflow.md">Contribute to the core code or fix bugs</a></li>
<li><a href="#sponsoring">Become a sponsor</a></li>
</ul>
<h3 id="Reporting-Security-issues"><a href="#Reporting-Security-issues" class="headerlink" title="Reporting Security issues"></a>Reporting Security issues</h3><p>Please refer to a <a target="_blank" rel="noopener" href="https://www.yiiframework.com/security/">special page at the website</a><br>describing proper workflow for security issue reports.</p>
<h3 id="Directory-Structure"><a href="#Directory-Structure" class="headerlink" title="Directory Structure"></a>Directory Structure</h3><figure class="highlight plain"><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></pre></td><td class="code"><pre><span class="line">build/ internally used build tools</span><br><span class="line">docs/ documentation</span><br><span class="line">framework/ core framework code</span><br><span class="line">tests/ tests of the core framework code</span><br></pre></td></tr></table></figure>
<h3 id="Spreading-the-Word"><a href="#Spreading-the-Word" class="headerlink" title="Spreading the Word"></a>Spreading the Word</h3><p>Acknowledging or citing Yii 2 is as important as direct contributions.</p>
<p><strong>In presentations</strong></p>
<p>If you are giving a presentation or talk featuring work that makes use of Yii 2 and would like to acknowledge it,<br>we suggest using <a target="_blank" rel="noopener" href="https://www.yiiframework.com/logo/">our logo</a> on your title slide.</p>
<p><strong>In projects</strong></p>
<p>If you are using Yii 2 as part of an OpenSource project, a way to acknowledge it is to<br><a target="_blank" rel="noopener" href="https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat">use a special badge</a> in your README: </p>
<p><img src="https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat" alt="Yii2"></p>
<p>If your code is hosted at GitHub, you can place the following in your README.md file to get the badge:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](https://www.yiiframework.com/)</span><br></pre></td></tr></table></figure>
<h3 id="Sponsoring"><a href="#Sponsoring" class="headerlink" title="Sponsoring"></a>Sponsoring</h3><p>Support this project by becoming a sponsor or a backer. </p>
<p><a target="_blank" rel="noopener" href="https://opencollective.com/yiisoft"><img src="https://opencollective.com/yiisoft/sponsors/badge.svg" alt="OpenCollective sponsors"></a> <a target="_blank" rel="noopener" href="https://opencollective.com/yiisoft"><img src="https://opencollective.com/yiisoft/backers/badge.svg" alt="OpenCollective backers"></a></p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2020/11/12/yii2/" data-id="cklsy6yu0000ird956dcifdve" data-title="Yii2" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/php/" rel="tag">php</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/yii2/" rel="tag">yii2</a></li></ul>
</footer>
</div>
</article>
<article id="post-react" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2020/10/12/react/" class="article-date">
<time class="dt-published" datetime="2020-10-12T22:00:00.000Z" itemprop="datePublished">2020-10-12</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/React/">React</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2020/10/12/react/">React</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<h1 id="React-middot"><a href="#React-middot" class="headerlink" title="React · "></a><a target="_blank" rel="noopener" href="https://reactjs.org/">React</a> · <a target="_blank" rel="noopener" href="https://github.com/facebook/react/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license"></a> <a target="_blank" rel="noopener" href="https://www.npmjs.com/package/react"><img src="https://img.shields.io/npm/v/react.svg?style=flat" alt="npm version"></a> <a target="_blank" rel="noopener" href="https://circleci.com/gh/facebook/react"><img src="https://circleci.com/gh/facebook/react.svg?style=shield&circle-token=:circle-token" alt="CircleCI Status"></a> <a target="_blank" rel="noopener" href="https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a></h1><p>React is a JavaScript library for building user interfaces.</p>
<ul>
<li><strong>Declarative:</strong> React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.</li>
<li><strong>Component-Based:</strong> Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.</li>
<li><strong>Learn Once, Write Anywhere:</strong> We don’t make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using <a target="_blank" rel="noopener" href="https://reactnative.dev/">React Native</a>.</li>
</ul>
<p><a target="_blank" rel="noopener" href="https://reactjs.org/docs/getting-started.html">Learn how to use React in your own project</a>.</p>
<h2 id="Installation"><a href="#Installation" class="headerlink" title="Installation"></a>Installation</h2><p>React has been designed for gradual adoption from the start, and <strong>you can use as little or as much React as you need</strong>:</p>
<ul>
<li>Use <a target="_blank" rel="noopener" href="https://reactjs.org/docs/getting-started.html#online-playgrounds">Online Playgrounds</a> to get a taste of React.</li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/docs/add-react-to-a-website.html">Add React to a Website</a> as a <code><script></code> tag in one minute.</li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/docs/create-a-new-react-app.html">Create a New React App</a> if you’re looking for a powerful JavaScript toolchain.</li>
</ul>
<p>You can use React as a <code><script></code> tag from a <a target="_blank" rel="noopener" href="https://reactjs.org/docs/cdn-links.html">CDN</a>, or as a <code>react</code> package on <a target="_blank" rel="noopener" href="https://www.npmjs.com/package/react">npm</a>.</p>
<h2 id="Documentation"><a href="#Documentation" class="headerlink" title="Documentation"></a>Documentation</h2><p>You can find the React documentation <a target="_blank" rel="noopener" href="https://reactjs.org/docs">on the website</a>. </p>
<p>Check out the <a target="_blank" rel="noopener" href="https://reactjs.org/docs/getting-started.html">Getting Started</a> page for a quick overview.</p>
<p>The documentation is divided into several sections:</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/tutorial/tutorial.html">Tutorial</a></li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/docs/hello-world.html">Main Concepts</a></li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/docs/jsx-in-depth.html">Advanced Guides</a></li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/docs/react-api.html">API Reference</a></li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/community/support.html">Where to Get Support</a></li>
<li><a target="_blank" rel="noopener" href="https://reactjs.org/docs/how-to-contribute.html">Contributing Guide</a></li>
</ul>
<p>You can improve it by sending pull requests to <a target="_blank" rel="noopener" href="https://github.com/reactjs/reactjs.org">this repository</a>.</p>
<h2 id="Examples"><a href="#Examples" class="headerlink" title="Examples"></a>Examples</h2><p>We have several examples <a target="_blank" rel="noopener" href="https://reactjs.org/">on the website</a>. Here is the first one to get you started:</p>
<figure class="highlight jsx"><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><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">HelloMessage</span>(<span class="params">{ name }</span>) </span>{</span><br><span class="line"> <span class="keyword">return</span> <span class="xml"><span class="tag"><<span class="name">div</span>></span>Hello {name}<span class="tag"></<span class="name">div</span>></span></span>;</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">ReactDOM.render(</span><br><span class="line"> <HelloMessage name=<span class="string">"Taylor"</span> />,</span><br><span class="line"> <span class="built_in">document</span>.getElementById(<span class="string">'container'</span>)</span><br><span class="line">);</span><br></pre></td></tr></table></figure>
<p>This example will render “Hello Taylor” into a container on the page.</p>
<p>You’ll notice that we used an HTML-like syntax; <a target="_blank" rel="noopener" href="https://reactjs.org/docs/introducing-jsx.html">we call it JSX</a>. JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. If you’re using React as a <code><script></code> tag, read <a target="_blank" rel="noopener" href="https://reactjs.org/docs/add-react-to-a-website.html#optional-try-react-with-jsx">this section</a> on integrating JSX; otherwise, the <a target="_blank" rel="noopener" href="https://reactjs.org/docs/create-a-new-react-app.html">recommended JavaScript toolchains</a> handle it automatically.</p>
<h2 id="Contributing"><a href="#Contributing" class="headerlink" title="Contributing"></a>Contributing</h2><p>The main purpose of this repository is to continue evolving React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React.</p>
<h3 id="Code-of-Conduct"><a href="#Code-of-Conduct" class="headerlink" title="Code of Conduct"></a><a target="_blank" rel="noopener" href="https://code.fb.com/codeofconduct">Code of Conduct</a></h3><p>Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read <a target="_blank" rel="noopener" href="https://code.fb.com/codeofconduct">the full text</a> so that you can understand what actions will and will not be tolerated.</p>
<h3 id="Contributing-Guide"><a href="#Contributing-Guide" class="headerlink" title="Contributing Guide"></a><a target="_blank" rel="noopener" href="https://reactjs.org/contributing/how-to-contribute.html">Contributing Guide</a></h3><p>Read our <a target="_blank" rel="noopener" href="https://reactjs.org/contributing/how-to-contribute.html">contributing guide</a> to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React.</p>
<h3 id="Good-First-Issues"><a href="#Good-First-Issues" class="headerlink" title="Good First Issues"></a>Good First Issues</h3><p>To help you get your feet wet and get you familiar with our contribution process, we have a list of <a target="_blank" rel="noopener" href="https://github.com/facebook/react/labels/good%20first%20issue">good first issues</a> that contain bugs which have a relatively limited scope. This is a great place to get started.</p>
<h3 id="License"><a href="#License" class="headerlink" title="License"></a>License</h3><p>React is <a href="./LICENSE">MIT licensed</a>.</p>
</div>
<footer class="article-footer">
<a data-url="http://example.com/2020/10/12/react/" data-id="cklsy6ytw000drd956ad4achs" data-title="React" class="article-share-link">Share</a>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/javascript/" rel="tag">javascript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/react/" rel="tag">react</a></li></ul>
</footer>
</div>
</article>
<article id="post-vue" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<div class="article-meta">
<a href="/2020/09/12/vue/" class="article-date">
<time class="dt-published" datetime="2020-09-12T22:00:00.000Z" itemprop="datePublished">2020-09-12</time>
</a>
<div class="article-category">
<a class="article-category-link" href="/categories/Vue/">Vue</a>
</div>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="p-name article-title" href="/2020/09/12/vue/">Vue</a>
</h1>
</header>
<div class="e-content article-entry" itemprop="articleBody">
<p align="center"><a href="https://vuejs.org" target="_blank" rel="noopener noreferrer"><img width="100" src="https://vuejs.org/images/logo.png" alt="Vue logo"></a></p>
<p align="center">
<a target="_blank" rel="noopener" href="https://circleci.com/gh/vuejs/vue/tree/dev"><img src="https://img.shields.io/circleci/project/github/vuejs/vue/dev.svg?sanitize=true" alt="Build Status"></a>
<a target="_blank" rel="noopener" href="https://codecov.io/github/vuejs/vue?branch=dev"><img src="https://img.shields.io/codecov/c/github/vuejs/vue/dev.svg?sanitize=true" alt="Coverage Status"></a>
<a target="_blank" rel="noopener" href="https://npmcharts.com/compare/vue?minimal=true"><img src="https://img.shields.io/npm/dm/vue.svg?sanitize=true" alt="Downloads"></a>
<a target="_blank" rel="noopener" href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/v/vue.svg?sanitize=true" alt="Version"></a>
<a target="_blank" rel="noopener" href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/l/vue.svg?sanitize=true" alt="License"></a>
<a target="_blank" rel="noopener" href="https://chat.vuejs.org/"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true" alt="Chat"></a>
<br>
<a target="_blank" rel="noopener" href="https://app.saucelabs.com/builds/50f8372d79f743a3b25fb6ca4851ca4c"><img src="https://app.saucelabs.com/buildstatus/vuejs" alt="Build Status"></a>
</p>
<h2 align="center">Supporting Vue.js</h2>
<p>Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome <a target="_blank" rel="noopener" href="https://github.com/vuejs/vue/blob/dev/BACKERS.md">backers</a>. If you’d like to join them, please consider:</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://www.patreon.com/evanyou">Become a backer or sponsor on Patreon</a>.</li>
<li><a target="_blank" rel="noopener" href="https://opencollective.com/vuejs">Become a backer or sponsor on Open Collective</a>.</li>
<li><a target="_blank" rel="noopener" href="https://vuejs.org/support-vuejs/#One-time-Donations">One-time donation via PayPal or crypto-currencies.</a></li>
</ul>
<h4 id="What’s-the-difference-between-Patreon-and-OpenCollective"><a href="#What’s-the-difference-between-Patreon-and-OpenCollective" class="headerlink" title="What’s the difference between Patreon and OpenCollective?"></a>What’s the difference between Patreon and OpenCollective?</h4><p>Funds donated via Patreon go directly to support Evan You’s full-time work on Vue.js. Funds donated via OpenCollective are managed with transparent expenses and will be used for compensating work and expenses for core team members or sponsoring community events. Your name/logo will receive proper recognition and exposure by donating on either platform.</p>
<h3 align="center">Special Sponsors</h3>
<!--special start-->
<p align="center">
<a href="https://autocode.com/" target="_blank">
<img width="260px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/autocode.svg?sanitize=true">
</a>
</p>
<!--special end-->
<h3 align="center">Platinum Sponsors</h3>
<!--platinum start-->
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://vueschool.io/?utm_source=Vuejs.org&utm_medium=Banner&utm_campaign=Sponsored%20Banner&utm_content=V1" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vueschool.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://vehikl.com/" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vehikl.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://retool.com/?utm_source=sponsor&utm_campaign=vue" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/retool.png">
</a>
</td>
<td align="center" valign="middle">
<a href="https://passionatepeople.io/" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/passionate_people.png">
</a>
</td>
</tr><tr></tr>
<tr>
<td align="center" valign="middle">
<a href="https://www.storyblok.com" target="_blank">
<img width="222px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/storyblok.png">
</a>