-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f97141
commit 31288bf
Showing
21 changed files
with
213 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ React | |
:maxdepth: 1 | ||
|
||
intro_react.rst | ||
nextjs/index | ||
react-native/index | ||
|
||
.. only:: subproject and html | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.. _nextjs: | ||
|
||
================================= | ||
Next.js | ||
================================= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
intro_nextjs.rst | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. _intro_nextjs: | ||
|
||
================= | ||
Next.js 简介 | ||
================= | ||
|
||
Next.js 是基于 :ref:`react` 的最大的全功能web应用扩展框架,并且集成了一个快速构建的 基于 :ref:`rust` 的 :ref:`javascript` 工具。根据 `Top Software Repos on GitHub <https://ght.creativemaybeno.dev/>`_ 统计,Next.js也是GitHub上排名第14的软件仓库(以Star计算),可见这个web框架的流行程度。 | ||
|
||
.. note:: | ||
|
||
`阮一峰的网络日志 <https://www.ruanyifeng.com/blog/>`_ 曾经推荐过一篇 `How I Built My Blog <https://www.joshwcomeau.com/blog/how-i-built-my-blog/>`_ 介绍如何采用Next.js构建blog的文章,非常详细和精彩。 | ||
|
||
参考 | ||
====== | ||
|
||
- `nextjs.org <https://nextjs.org/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _react-native: | ||
|
||
================================= | ||
React Native | ||
================================= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ JavaScript 快速起步 | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
js_basic.rst | ||
first_js.rst | ||
js_var_const.rst | ||
css.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
.. _js_basic: | ||
|
||
==================== | ||
JavaScript基础知识 | ||
==================== | ||
|
||
.. note:: | ||
|
||
本文知识不足一哂,仅仅是我学习过程笔记(以加强记忆) | ||
|
||
注释 | ||
======= | ||
|
||
JavaScript注释方法有2种: | ||
|
||
- 单行注释 ``//`` | ||
- 多行注释 ``/* */`` | ||
|
||
大小写 | ||
========== | ||
|
||
ECMAScript (即JavaScript) 中的一切都区分大小写。也就是不论变量、函数名还是操作符,都区分大小写。 | ||
|
||
标识符 | ||
====== | ||
|
||
- 标识符,即 变量、函数、属性或函数参数。 | ||
- 标识符由一个或多个字符组成,首字母必须是字母、下划线( ``_`` )或美元符号( ``$`` );其他字符则可以包含数字 ( **不能使用减号** ``-`` ,这点和 :ref:`shell` 不同,切记) | ||
- 推荐采用驼峰命名方法,即 **第一个单词首字母小写,后面每个单词的首字母大写** (虽然不是强制,但是是 **最佳实践** ,我个人觉得也许可以在Shell中也使用类似命名方法) | ||
- 和所有语言一样,关键字、保留字、 ``true`` 、 ``false`` 和 ``null`` 不能作为标识符 | ||
|
||
语句 | ||
======= | ||
|
||
- ECMAScript 的语句以 **分号** ( ``;`` )结尾(同 :ref:`clang` ) | ||
- 多条语句可以合并到一个C语言风格的代码块中: | ||
|
||
.. literalinclude:: js_basic/js_multi_lines.js | ||
:language: javascript | ||
:caption: JavaScript使用C语言风格代码块 | ||
|
||
变量 | ||
======= | ||
|
||
ECMAScript的变量是 **松散类型** ,也就是变量可以保存任何类型的数据。 | ||
|
||
有3个关键字可以声明变量: | ||
|
||
- ``var`` : 函数作用域有效 | ||
- ``const`` | ||
- ``let`` : 代码块作用域有效(也就是 ``let`` 作用域更小,类似在 ``if ... {...}`` 这样的代码块中有效) | ||
|
||
- 定义多个变量的方法: | ||
|
||
.. literalinclude:: js_basic/js_multi_var.js | ||
:language: javascript | ||
:caption: 定义多个变量 | ||
|
||
变量作用域 | ||
------------ | ||
|
||
- **使用var操作符定义的变量会成为包含它的函数的局部变量** : 也就是说,如果在一个函数内部使用 ``var`` 定义一个变量。则这个变量在函数退出时被销毁。 | ||
- 如果在函数内部省略 ``var`` 操作符,则创建的变量是 **全局变量** | ||
|
||
.. warning:: | ||
|
||
在局部作用域定义全局变量会导致程序很难维护。在严格模式下,如果给未声明的变量赋值,会导致抛出 ``ReferenceError`` | ||
|
||
- 函数作用域内部通过 ``var`` 定义变量,则这个变量定义语句在作用域内部任何位置都是一样的,ECMAScript会自动将所有变量定义语句都拉到函数作用域的顶部;并且多次使用 ``var`` 声明同一个变量也没有问题(最后一个生效) | ||
|
||
- ``let`` 定义的变量只在代码块部分有效,而且不会自动提升到代码块顶部;也就是说如果 ``let`` 定义变量的语句在使用这个变量的语句之后,就会触发 ``ReferenceError`` | ||
|
||
- 合理使用 ``let`` 申明块变量可以 **避免循环定义的迭代变量渗透到循环体外部** : | ||
|
||
.. literalinclude:: js_basic/let_var.js | ||
:language: javascript | ||
:caption: 在循环体内部使用 ``let`` 定义变量,避免变量泄漏 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if (test) { | ||
test = false; | ||
console.log(test); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var message = "hi", | ||
found = false, | ||
age = 29; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
for (let i = 0; i < 5; ++i) { | ||
// 这里变量 i 只在for循环内部有效,可以避免循坏体外部使用变量 i 时候误被这里的循环变量i 污染 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
source/linux/gentoo_linux/install_gentoo_on_mbp/eselect_profile_list_output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
Available profile symlink targets: | ||
[1] default/linux/amd64/17.1 (stable) * | ||
[1] default/linux/amd64/17.1 (stable) | ||
[2] default/linux/amd64/17.1/selinux (stable) | ||
[3] default/linux/amd64/17.1/hardened (stable) | ||
[4] default/linux/amd64/17.1/hardened/selinux (stable) | ||
[5] default/linux/amd64/17.1/desktop (stable) | ||
[6] default/linux/amd64/17.1/desktop/gnome (stable) | ||
[7] default/linux/amd64/17.1/desktop/gnome/systemd (stable) | ||
[8] default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr (stable) | ||
[9] default/linux/amd64/17.1/desktop/plasma (stable) | ||
[10] default/linux/amd64/17.1/desktop/plasma/systemd (stable) | ||
... | ||
[15] default/linux/amd64/17.1/no-multilib (stable) * | ||
[16] default/linux/amd64/17.1/no-multilib/hardened (stable) | ||
[17] default/linux/amd64/17.1/no-multilib/hardened/selinux (stable) | ||
[18] default/linux/amd64/17.1/no-multilib/systemd (dev) | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cd /mnt/gentoo | ||
|
||
# stage3-amd64-openrc-20230220T081656Z.tar.xz 已经存放到这个目录下 | ||
# 2023年9月,我重新部署时采用纯64位系统,所以采用 stage3-amd64-nomultilib-openrc-20230903T170202Z.tar.xz | ||
tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.. _bash_string: | ||
|
||
================== | ||
Bash字符串处理 | ||
================== | ||
|
||
字符串大小写 | ||
============== | ||
|
||
字符串大小写转换在Bash中有非常巧妙的方法,无需第三方工具,内置提供了参数扩展: | ||
|
||
.. literalinclude:: bash_string/bash_upper_lower_case | ||
:language: bash | ||
:caption: 使用bash内置参数扩展实现字符串大小写转换 | ||
|
||
参考 | ||
====== | ||
|
||
- `Matching Uppercase and Lowercase Letters With Regex in Shell <https://www.baeldung.com/linux/shell-case-insensitive-matching>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$ string="leVel" | ||
$ echo "${string,,}" | ||
level | ||
$ echo "${string^^}" | ||
LEVEL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters