diff --git a/docs/c.html b/docs/c.html index 61397e77..3dee019f 100644 --- a/docs/c.html +++ b/docs/c.html @@ -1540,18 +1540,23 @@

Docker 运行环境

    -
  • 安装 Docker
  • -
  • 创建 Dockerfile 文件 +
  • +

    安装 Docker

    +
  • +
  • +

    创建 Dockerfile 文件

    FROM alpine:3.14
     RUN apk add --no-cache gcc musl-dev
     RUN apk add --no-cache g++
     
  • -
  • 生成本地 myalpine 镜像 +
  • +

    生成本地 myalpine 镜像

    docker build -t myalpine .
     
  • -
  • 运行映像,把当前路径 ($PWD) 映射至容器的 /test 目录,用 gcc 编译程序,exit返回 +
  • +

    运行映像,把当前路径 ($PWD) 映射至容器的 /test 目录,用 gcc 编译程序,exit返回

    docker run -it -v $PWD:/test myalpine
     root@b1a38bd7107a:/# cd test
     root@b1a38bd7107a:/test# gcc -o hello hello.c
    diff --git a/docs/colors-named.html b/docs/colors-named.html
    index 6468e2c1..c7c3ef6e 100644
    --- a/docs/colors-named.html
    +++ b/docs/colors-named.html
    @@ -43,6 +43,7 @@
     

Named Colors

+
diff --git a/docs/css.html b/docs/css.html index c8fca741..0a2de5bf 100644 --- a/docs/css.html +++ b/docs/css.html @@ -137,11 +137,11 @@ justify-content: flex-start; } -

查看: Flexbox | Flex Tricks

+

查看: Flexbox | Flex Tricks

Grid 布局

#container {
   display: grid;
-  grid: repeat(2, 60px) / auto-flow 80px;
+s  grid: repeat(2, 60px) / auto-flow 80px;
 }
 #container > div {
   background-color: #8ca0ff;
@@ -149,7 +149,7 @@
   height: 50px;
 }
 
-

查看: Grid Layout

+

查看: Grid Layout

变量和计数器

counter-set: subsection;
 counter-increment: subsection;
@@ -334,7 +334,7 @@
 
 
 
-
选择器说明
a:link 链接正常 #
a:active 链接处于点击状态 #
a:hover 鼠标悬停链接 #
a:visited 访问链接 #
+
选择器说明
a:link链接正常 #
a:active链接处于点击状态 #
a:hover鼠标悬停链接 #
a:visited访问链接 #

/* 未访问链接 */
 a:link { color: blue; }        
diff --git a/docs/djiango.html b/docs/djiango.html
index 5993c1ed..2a182cb1 100644
--- a/docs/djiango.html
+++ b/docs/djiango.html
@@ -54,12 +54,14 @@
 

入门

    -
  • 创建虚拟环境 +
  • +

    创建虚拟环境

    $ py -m venv myproject # Windows
     $ python -m venv myproject # Unix/MacOS
     
  • -
  • 其中包含子文件夹和文件,如下所示 +
  • +

    其中包含子文件夹和文件,如下所示

    myproject
      ├┈Include
      ├┈Lib
    @@ -67,21 +69,24 @@
      ╰┈pyvenv.cfg
     
  • -
  • 以下命令来激活环境 +
  • +

    以下命令来激活环境

    # Windows:
     myproject\Scripts\activate.bat
     # Unix/MacOS:
     source myproject/bin/activate
     
  • -
  • 提示符中看到以下结果: +
  • +

    提示符中看到以下结果:

    # Windows:
     (myproject) C:\Users\Your Name>
     # Unix/MacOS:
     (myproject) ... $
     
  • -
  • 安装 Django +
  • +

    安装 Django

    # Windows:
     (myproject) C:\Users\Name>py -m pip install Django
     # Unix/MacOS:
    diff --git a/docs/docker.html b/docs/docker.html
    index 0b9c1ec1..62c9f22b 100644
    --- a/docs/docker.html
    +++ b/docs/docker.html
    @@ -369,7 +369,7 @@
     
     
     
    -
    Docker 语法说明
    docker search search_word在 docker hub 中搜索镜像。
    docker pull user/image 从 docker hub 下载镜像。
    docker login 向 docker hub 进行身份验证
    docker push user/image 将镜像上传到 docker hub。
    +
    Docker 语法说明
    docker search search_word在 docker hub 中搜索镜像。
    docker pull user/image从 docker hub 下载镜像。
    docker login向 docker hub 进行身份验证
    docker push user/image将镜像上传到 docker hub。

镜像仓库命令

登录到镜像仓库

@@ -1040,8 +1040,8 @@

PostgreSQL

$ docker run --name my-postgres \
   -e POSTGRES_PASSWORD=mysecretpassword \
-	-e PGDATA=/var/lib/postgresql/data/pgdata \
-	-v $HOME/nginx/mount:/var/lib/postgresql/data \
+  -e PGDATA=/var/lib/postgresql/data/pgdata \
+  -v $HOME/nginx/mount:/var/lib/postgresql/data \
   -d postgres
 

媒体管理工具 Dim

diff --git a/docs/electron.html b/docs/electron.html index a2be9f63..ba69df0a 100644 --- a/docs/electron.html +++ b/docs/electron.html @@ -50,11 +50,12 @@

Electron 是一个使用 JavaScript、HTML 和 CSS 构建桌面应用程序的框架

创建你的应用程序

    -
  • 安装 +
  • +

    安装

    mkdir my-app && cd my-app
     npm init
     
    -在项目根目录会生成 package.json +

    在项目根目录会生成 package.json

    {
       "name": "my-app",
       "version": "1.0.0",
    @@ -65,21 +66,26 @@
     }
     
  • -
  • 安装依赖包 +
  • +

    安装依赖包

    npm install --save-dev electron
     
  • -
  • 添加开发模式打开您的应用命令 +
  • +

    添加开发模式打开您的应用命令

    "scripts": {
       "start": "electron ."
     }
     
  • -
  • 运行命令,启动应用程序 +
  • +

    运行命令,启动应用程序

    npm start
     
    -入口都是 main 文件。这个文件控制了主进程,它运行在一个完整的Node.js环境中
  • -
  • 创建 index.html 页面 +

    入口都是 main 文件。这个文件控制了主进程,它运行在一个完整的Node.js环境中

    +
  • +
  • +

    创建 index.html 页面

    <!DOCTYPE html>
     <html>
       <head>
    @@ -94,7 +100,8 @@
     </html>
     
  • -
  • 窗口中打开您的页面 +
  • +

    窗口中打开您的页面

    const {
       app,
       BrowserWindow
    @@ -1156,7 +1163,7 @@
     
     
     
    -
    :-:-
    width 整数窗口的宽度(以像素为单位)。默认值 (800)
    height 整数窗口的高度(以像素为单位)。默认值 (600)
    x 整数 (可选)窗口相对于屏幕左侧偏移量。默认值窗口居中
    y 整数 (可选)窗口相对于屏幕顶端偏移量。默认值窗口居中
    useContentSize boolean(宽)(高) 设置为web页面的尺寸。默认值 (false)
    center boolean窗口是否在屏幕居中。默认值 (false)
    minHeight 整数窗口的最小高度。默认值 (0)
    maxWidth 整数窗口的最大宽度。默认值不限
    maxHeight 整数窗口的最大高度。默认值不限
    resizable boolean窗口大小是否可调整。默认值 (true)
    movable boolean (win/mac)窗口是否可移动。默认值 (true)
    minimizable boolean (win/mac)窗口是否可最小化。默认值 (true)
    maximizable boolean (win/mac)窗口是否最大化。默认值 (true)
    closable boolean (win/mac)窗口是否可关闭。默认值 (true)
    focusable boolean窗口是否可以聚焦. 默认值 (true)。在 Windows 中设置 (focusable: false) 也意味着设置了 (skipTaskbar: true) 在 Linux 中设置 (focusable: false) 时窗口停止与 wm 交互, 并且窗口将始终置顶
    alwaysOnTop boolean窗口是否永远在别的窗口的上面。默认值 (false)
    fullscreen boolean窗口是否全屏。为 (false) 时 macOS 上按钮将被隐藏或禁用。默认值 (false)
    fullscreenable boolean窗口是否可以进入全屏状态。macOS上,最大化/缩放按钮是否可用 默认值 (true)
    simpleFullscreen boolean (mac)在 macOS 上使用 pre-Lion 全屏。默认值 (false)
    skipTaskbar boolean (win/mac)是否在任务栏中显示窗口。默认值 (false)
    kiosk boolean窗口是否进入kiosk模式。默认值 (false)
    title string默认窗口标题 默认为 ("Electron") 。如果由 (loadURL()) 加载的HTML文件中含有标签 (<title>) ,此属性将被忽略
    icon NativeImage/string窗口图标。在 Windows 上推荐使用 (ICO) 图标来获得最佳的视觉效果, 默认使用可执行文件的图标
    show boolean窗口是否在创建时显示。默认值 (true)
    paintWhenInitiallyHidden boolean(show)(false) 并且渲染器刚刚被创建时,它是否应激活。为了让 (document.visibilityState)(show: false) 的情况下第一次加载时正确地工作,你应该把这个设置成 (false)。设置为 (false) 将会导致 (ready-to-show) 事件不触发。默认值 (true)
    frame boolean设置为 (false) 时可以创建一个无边框窗口,默认值 (true)
    parent BrowserWindow指定父窗口 默认值 (null)
    modal boolean当前是否为模态窗口。只有当窗口是子窗口时才起作用。默认值 (false)
    acceptFirstMouse boolean (mac)点击 非活动窗口是否会穿透到 web contents。默认值 (false)
    disableAutoHideCursor boolean是否在打字时隐藏光标。默认值 (false)
    autoHideMenuBar boolean自动隐藏菜单栏,除非按了_(Alt)_键。默认值 (false)
    enableLargerThanScreen boolean (mac)使窗口尺寸可大于屏幕的大小。其他操作系统默认允许大于屏幕的窗口。默认值 (false)
    backgroundColor string窗口背景色,格式为 Hex, RGB, RGBA, HSL, HSLA 或 CSS 命名颜色。如果 (transparent) 设置为 (true),则支持 #AARRGGBB 格式的透明。默认值 (#FFF)(白色)
    hasShadow boolean窗口是否有阴影. 默认值 (true)
    opacity number (win/mac)设置窗口的初始透明度,在 0.0(全透明)和 1.0(完全不透明)之间 。 目前仅在 Windows 和 macOS上实现。
    darkTheme boolean强制窗口使用深色主题,只在部分GTK+3桌面环境下有效。 默认值 (false).
    transparent boolean使窗口 透明。 默认值 (false). 在Windows上,仅在无边框窗口下起作用。
    type string窗口的类型, 默认为普通窗口. 更多信息见下文
    visualEffectState string (mac)在 macOS 上指定外观应如何响应窗口活动状态。 必须与 (vibrancy) 属性一起使用。 可能的值有
    visualEffectState.followWindow当窗口处于激活状态时,后台应自动显示为激活状态,当窗口处于非激活状态时,后台应自动显示为非激活状态。 默认为该值。
    visualEffectState.active后台应一直显示为激活状态。
    visualEffectState.inactive后台应一直显示为非激活状态。
    titleBarStyle string (win/mac)窗口标题栏样式。默认值 (default)
    titleBarStyle.default分别返回 mac 或者 win 的标准标题栏
    titleBarStyle.hidden在一个隐藏的标题栏和一个全尺寸大小的内容窗口中取得结果。 在 macOS 内, 窗口将一直拥有位于左上的标准窗口控制器 (“traffic lights”)。 在 Windows上,当与 (titleBarOverlay: true) 合并时,它将激活窗口控件叠加(详情请参阅 (titleBarOverlay)),否则将不会显示窗口控件。
    titleBarStyle.hiddenInset (mac)隐藏标题栏,使用窗口边缘稍微小的红绿灯按钮替代。
    titleBarStyle.customButtonsOnHover (mac)隐藏的标题栏的全尺寸的内容窗口, 红绿灯按钮在鼠标悬停在窗口左上方时显示。**注意:**此选项目前是实验性的。
    trafficLightPosition Point (mac)在无边框窗口中设置灯绿灯按钮位置。
    roundedCorners boolean (mac)无边框窗口在 macOS 上,是否应该有圆角。 默认值为 (true)。 属性设置为 (false) ,将阻止窗口是可全屏的。
    fullscreenWindowTitle boolean (mac) 已弃用titleBarStyle 设置为 (hiddenInset) 时,在 macOS 全屏模式下标题栏显示标题。默认值为 (false).
    thickFrame boolean对 Windows 上的无框窗口使用 (WS_THICKFRAME) 样式,会增加标准窗口框架。 设置为 (false) 时将移除窗口的阴影和动画. 默认值为 (true)
    vibrancy string (mac)为窗口添加一种类型的动态效果,仅 macOS。 可以是 (appearance-based)(light)(dark)(titlebar)(selection)(menu)(popover)(sidebar)(medium-light)(ultra-dark)(header)(sheet)(window)(hud)(fullscreen-ui)(tooltip)(content)(under-window)(under-page)。 请注意 (appearance-based)(light)(dark)(medium-light)(ultra-dark) 已弃用,在 macOS Catalina (10.15) 中已经移除。
    zoomToPageWidth boolean (mac)在 macOS 上控制,当按住 option 点击工具栏绿色红绿灯按钮或点击窗口 > 放大菜单项的行为。 如果为 (true),窗口为将会缩放到适合宽度,若为 (false) 将会放大到屏幕宽度。 这也会影响,直接调用 (maximize()) 的行为。 默认值为 (false).
    tabbingIdentifier string (mac)选项卡组名称,允许在原生选择卡中打开窗口,macOS 10.12+ 支持。 Windows 中,有相同选项卡标识的将会组合在一起。 这会添加一个原生新增选项卡按钮到你窗口的选项卡栏,同时 (app) 和窗口允许接收 (new-window-for-tab) 事件。
    webPreferences Object网页功能设置。
    webPreferences.devTools boolean是否开启 DevTools. 如果设置为 (false), 则无法使用 (BrowserWindow.webContents.openDevTools ()) 打开 DevTools。 默认值为 (true)
    webPreferences.nodeIntegration boolean是否启用Node integration. 默认值为 (false).
    webPreferences.nodeIntegrationInWorker boolean是否在Web工作器中启用了Node集成. 默认值为 (false). 更多内容参见 多线程
    webPreferences.nodeIntegrationInSubFrames boolean 实验性是否允许在子页面(iframe)或子窗口(child window)中集成Node.js; 预先加载的脚本会被注入到每一个iframe,你可以用 (process.isMainFrame) 来判断当前是否处于主框架(main frame)中。
    webPreferences.preload string在页面运行其他脚本之前预先加载指定的脚本 无论页面是否集成Node, 此脚本都可以访问所有Node API 脚本路径为文件的绝对路径。 当 node integration 关闭时, 预加载的脚本将从全局范围重新引入node的全局引用标志参考示例
    webPreferences.sandbox boolean如果设置该参数, 沙箱的渲染器将与窗口关联, 使它与Chromium OS-level 的沙箱兼容, 并禁用 Node. js 引擎。 它与 (nodeIntegration) 的选项不同,且预加载脚本的 API 也有限制。更多详情
    webPreferences.sessionSession 设置页面的 session 而不是直接忽略 Session 对象, 也可用 (partition) 选项来代替,它接受一个 partition 字符串. 同时设置了_(session)_ 和 _(partition)_时, (session) 的优先级更高. 默认使用默认的 session.
    webPreferences.partitionstring (optional) - 通过 session 的 partition 字符串来设置界面session. 如果 (partition)(persist:)开头, 该页面将使用持续的 session,并在所有页面生效,且使用同一个(partition). 如果没有 (persist:) 前缀, 页面将使用 in-memory session. 通过分配相同的 (partition), 多个页可以共享同一会话。 默认使用默认的 session.
    webPreferences.zoomFactor number页面的默认缩放系数, (3.0) 表示 (300%)。 默认值为 (1.0).
    webPreferences.javascript boolean是否启用 JavaScript 支持。 默认值为 (true)
    webPreferences.webSecurity boolean当设置为 (false), 它将禁用同源策略 (通常用来测试网站), 如果此选项不是由开发者设置的,还会把 _(allowRunningInsecureContent)_设置为 (true). 默认值为 (true)
    webPreferences.allowRunningInsecureContent boolean允许一个 https 页面运行来自http url的JavaScript, CSS 或 plugins。 默认值为 (false)
    webPreferences.images boolean允许加载图片。 默认值为 (true)
    webPreferences.imageAnimationPolicy string指定如何运行图像动画 (比如: GIF等). 可以是 (animate), (animateOnce)(noAnimation)。默认值为 (animate)
    webPreferences.textAreasAreResizable boolean允许调整 TextArea 元素大小。 默认值为 (true)
    webPreferences.webgl boolean启用 WebGL 支持。 默认值为 (true)
    webPreferences.plugins boolean是否应该启用插件。 默认值为 (false)
    webPreferences.experimentalFeatures boolean启用 Chromium 的实验功能。 默认值为 (false)
    webPreferences.scrollBounce boolean (mac)启用滚动回弹(橡皮筋)效果。 默认值为 (false)
    webPreferences.enableBlinkFeaturesstring(逗号) 分隔的需要启用的特性列表,譬如 (CSSVariables,KeyboardEventKey)RuntimeEnabledFeatures.json5 文件中查看被支持的所有特性
    webPreferences.disableBlinkFeatures string(,) 分隔的禁用特性列表, 如 (CSSVariables,KeyboardEventKey)RuntimeEnabledFeatures.json5 文件中查看被支持的所有特性
    defaultFontFamily Object为 font-family 设置默认字体
    defaultFontFamily.standard string默认值为 (Times New Roman)
    defaultFontFamily.serif string默认值为 (Times New Roman)
    defaultFontFamily.sansSerif string默认值为 (Arial)
    defaultFontFamily.monospace string默认值为 (Courier New)
    defaultFontFamily.cursive string默认值为 (Script)
    defaultFontFamily.fantasy string默认值为 (Impact)
    defaultFontSize Integer默认值为 (16)
    defaultMonospaceFontSize Integer默认值为 (13)
    minimumFontSize Integer默认值为 (0)
    defaultEncoding string默认值为 (ISO-8859-1)
    backgroundThrottling boolean是否在页面成为背景时限制动画和计时器。 这也会影响到 Visibility API。默认值为 (true)
    offscreen boolean是否绘制和渲染可视区域外的窗口。默认值为 (false)。更多详情, 请参见 offscreen rendering tutorial
    contextIsolation boolean是否在独立 JavaScript 环境中运行 Electron API和指定的_(preload)_ 脚本。默认为 (true)(预加载)脚本所运行的上下文环境只能访问其自身专用的 (文档) 和全局 (窗口),其自身一系列内置的JavaScript ((Array), (Object), (JSON), 等等) 也是如此,这些对于已加载的内容都是不可见的。 Electron API 将只在_(预加载)脚本中可用,在已加载页面中不可用。 这个选项应被用于加载可能不被信任的远程内容时来确保加载的内容无法篡改(预加载)_脚本和任何正在使用的Electron api。 该选项使用的是与Chrome内容脚本相同的技术。你可以在开发者工具Console选项卡内顶部组合框中选择 'Electron Isolated Context'条目来访问这个上下文
    webviewTag boolean是否启用 (<webview>) tag标签。默认值为 (false)注意:(< webview>) 配置的 (preload) 脚本在执行时将启用节点集成, 因此应确保远程或不受信任的内容无法创建恶意的 (preload) 脚本 。 可以使用 webContents 上的 (will-attach-webview) 事件对 (preload) 脚本进行剥离, 并验证或更改 (<webview>) 的初始设置
    additionalArguments string[]strin一个将被附加到当前应用程序的渲染器进程中_(process.argv)_的字符串列表。可用于将少量的数据传递到渲染器进程预加载脚本中。
    safeDialogs boolean是否启用浏览器样式的持续对话框保护。 默认值为 (false)
    safeDialogsMessage string当持续对话框保护被触发时显示的消息。 如果没有定义,那么将使用缺省的消息。注意:当前缺省消息是英文,并没有本地化
    disableDialogs boolean是否完全禁用对话框。 覆盖 (safeDialogs)。 默认值为 (false)
    navigateOnDragDrop boolean将文件或链接拖放到页面上时是否触发页面跳转。 默认值为 (false)
    autoplayPolicy string窗口中内容要使用的自动播放策略,值可以是 (no-user-gesture-required), (user-gesture-required), (document-user-activation-required)。默认为 (no-user-gesture-required)
    disableHtmlFullscreenWindowResize boolean是否阻止窗口在进入 HTML 全屏时调整大小。默认值为 (false)
    accessibleTitle string仅提供给如屏幕读取器等辅助工具的替代标题字符串。此字符串不直接对用户可见
    spellcheck boolean是否启用内置拼写检查器。 默认值为 (true)
    enableWebSQL boolean是否启用 WebSQL api。 默认值为 (true)
    v8CacheOptions string强制 blink 使用 v8 代码缓存策略。 可接受的值为:
    v8CacheOptions.none禁用代码缓存
    v8CacheOptions.code基于启发式代码缓存
    v8CacheOptions.bypassHeatCheck绕过启发式代码缓存,但使用懒编译。
    v8CacheOptions.bypassHeatCheckAndEagerCompile与上面相同,除了编译是及时的。 默认策略是 (code)
    enablePreferredSizeMode boolean是否启用首选大小模式。 首选大小是包含文档布局所需的最小大小--无需滚动。 启用该属性将导致在首选大小发生变化时,在 (WebContents) 上触发 (preferred-size-changed) 事件。默认值为 (false)
    titleBarOverlay Object/Boolean当在 macOS 使用无框窗口结合 (win.setWindowButtonVisibility(true)) 或使用 (titleBarStyle) 以便标准窗口控制 (在 macOS为 "traffic lights") 可见,此属性将启用 Window Controls Overlay JavaScript APIsCSS Environment Variables。指定 (true) 将导致覆盖默认系统颜色。 默认值为 (false)
    color String (win)启用窗口控制时覆盖面的 CSS 颜色 默认是系统颜色
    symbolColor String (win)启用时窗口控制中符号的 CSS 颜色 默认是系统颜色
    height Integer (win/mac)标题栏和 Window Controls Overlay,以像素为单位。 默认值为系统高度
    +
    :-:-
    width 整数窗口的宽度(以像素为单位)。默认值 (800)
    height 整数窗口的高度(以像素为单位)。默认值 (600)
    x 整数 (可选)窗口相对于屏幕左侧偏移量。默认值窗口居中
    y 整数 (可选)窗口相对于屏幕顶端偏移量。默认值窗口居中
    useContentSize boolean(宽)(高) 设置为web页面的尺寸。默认值 (false)
    center boolean窗口是否在屏幕居中。默认值 (false)
    minHeight 整数窗口的最小高度。默认值 (0)
    maxWidth 整数窗口的最大宽度。默认值不限
    maxHeight 整数窗口的最大高度。默认值不限
    resizable boolean窗口大小是否可调整。默认值 (true)
    movable boolean (win/mac)窗口是否可移动。默认值 (true)
    minimizable boolean (win/mac)窗口是否可最小化。默认值 (true)
    maximizable boolean (win/mac)窗口是否最大化。默认值 (true)
    closable boolean (win/mac)窗口是否可关闭。默认值 (true)
    focusable boolean窗口是否可以聚焦. 默认值 (true)。在 Windows 中设置 (focusable: false) 也意味着设置了 (skipTaskbar: true) 在 Linux 中设置 (focusable: false) 时窗口停止与 wm 交互, 并且窗口将始终置顶
    alwaysOnTop boolean窗口是否永远在别的窗口的上面。默认值 (false)
    fullscreen boolean窗口是否全屏。为 (false) 时 macOS 上按钮将被隐藏或禁用。默认值 (false)
    fullscreenable boolean窗口是否可以进入全屏状态。macOS上,最大化/缩放按钮是否可用 默认值 (true)
    simpleFullscreen boolean (mac)在 macOS 上使用 pre-Lion 全屏。默认值 (false)
    skipTaskbar boolean (win/mac)是否在任务栏中显示窗口。默认值 (false)
    kiosk boolean窗口是否进入kiosk模式。默认值 (false)
    title string默认窗口标题 默认为 ("Electron") 。如果由 (loadURL()) 加载的HTML文件中含有标签 (<title>) ,此属性将被忽略
    icon NativeImage/string窗口图标。在 Windows 上推荐使用 (ICO) 图标来获得最佳的视觉效果, 默认使用可执行文件的图标
    show boolean窗口是否在创建时显示。默认值 (true)
    paintWhenInitiallyHidden boolean(show)(false) 并且渲染器刚刚被创建时,它是否应激活。为了让 (document.visibilityState)(show: false) 的情况下第一次加载时正确地工作,你应该把这个设置成 (false)。设置为 (false) 将会导致 (ready-to-show) 事件不触发。默认值 (true)
    frame boolean设置为 (false) 时可以创建一个无边框窗口,默认值 (true)
    parent BrowserWindow指定父窗口 默认值 (null)
    modal boolean当前是否为模态窗口。只有当窗口是子窗口时才起作用。默认值 (false)
    acceptFirstMouse boolean (mac)点击 非活动窗口是否会穿透到 web contents。默认值 (false)
    disableAutoHideCursor boolean是否在打字时隐藏光标。默认值 (false)
    autoHideMenuBar boolean自动隐藏菜单栏,除非按了_(Alt)_键。默认值 (false)
    enableLargerThanScreen boolean (mac)使窗口尺寸可大于屏幕的大小。其他操作系统默认允许大于屏幕的窗口。默认值 (false)
    backgroundColor string窗口背景色,格式为 Hex, RGB, RGBA, HSL, HSLA 或 CSS 命名颜色。如果 (transparent) 设置为 (true),则支持 #AARRGGBB 格式的透明。默认值 (#FFF)(白色)
    hasShadow boolean窗口是否有阴影. 默认值 (true)
    opacity number (win/mac)设置窗口的初始透明度,在 0.0(全透明)和 1.0(完全不透明)之间 。 目前仅在 Windows 和 macOS上实现。
    darkTheme boolean强制窗口使用深色主题,只在部分GTK+3桌面环境下有效。 默认值 (false).
    transparent boolean使窗口 透明。 默认值 (false). 在Windows上,仅在无边框窗口下起作用。
    type string窗口的类型, 默认为普通窗口. 更多信息见下文
    visualEffectState string (mac)在 macOS 上指定外观应如何响应窗口活动状态。 必须与 (vibrancy) 属性一起使用。 可能的值有
    visualEffectState.followWindow当窗口处于激活状态时,后台应自动显示为激活状态,当窗口处于非激活状态时,后台应自动显示为非激活状态。 默认为该值。
    visualEffectState.active后台应一直显示为激活状态。
    visualEffectState.inactive后台应一直显示为非激活状态。
    titleBarStyle string (win/mac)窗口标题栏样式。默认值 (default)
    titleBarStyle.default分别返回 mac 或者 win 的标准标题栏
    titleBarStyle.hidden在一个隐藏的标题栏和一个全尺寸大小的内容窗口中取得结果。 在 macOS 内, 窗口将一直拥有位于左上的标准窗口控制器 (“traffic lights”)。 在 Windows上,当与 (titleBarOverlay: true) 合并时,它将激活窗口控件叠加(详情请参阅 (titleBarOverlay)),否则将不会显示窗口控件。
    titleBarStyle.hiddenInset (mac)隐藏标题栏,使用窗口边缘稍微小的红绿灯按钮替代。
    titleBarStyle.customButtonsOnHover (mac)隐藏的标题栏的全尺寸的内容窗口, 红绿灯按钮在鼠标悬停在窗口左上方时显示。**注意:**此选项目前是实验性的。
    trafficLightPosition Point (mac)在无边框窗口中设置灯绿灯按钮位置。
    roundedCorners boolean (mac)无边框窗口在 macOS 上,是否应该有圆角。 默认值为 (true)。 属性设置为 (false) ,将阻止窗口是可全屏的。
    fullscreenWindowTitle boolean (mac) 已弃用titleBarStyle 设置为 (hiddenInset) 时,在 macOS 全屏模式下标题栏显示标题。默认值为 (false).
    thickFrame boolean对 Windows 上的无框窗口使用 (WS_THICKFRAME) 样式,会增加标准窗口框架。 设置为 (false) 时将移除窗口的阴影和动画. 默认值为 (true)
    vibrancy string (mac)为窗口添加一种类型的动态效果,仅 macOS。 可以是 (appearance-based)(light)(dark)(titlebar)(selection)(menu)(popover)(sidebar)(medium-light)(ultra-dark)(header)(sheet)(window)(hud)(fullscreen-ui)(tooltip)(content)(under-window)(under-page)。 请注意 (appearance-based)(light)(dark)(medium-light)(ultra-dark) 已弃用,在 macOS Catalina (10.15) 中已经移除。
    zoomToPageWidth boolean (mac)在 macOS 上控制,当按住 option 点击工具栏绿色红绿灯按钮或点击窗口 > 放大菜单项的行为。 如果为 (true),窗口为将会缩放到适合宽度,若为 (false) 将会放大到屏幕宽度。 这也会影响,直接调用 (maximize()) 的行为。 默认值为 (false).
    tabbingIdentifier string (mac)选项卡组名称,允许在原生选择卡中打开窗口,macOS 10.12+ 支持。 Windows 中,有相同选项卡标识的将会组合在一起。 这会添加一个原生新增选项卡按钮到你窗口的选项卡栏,同时 (app) 和窗口允许接收 (new-window-for-tab) 事件。
    webPreferences Object网页功能设置。
    webPreferences.devTools boolean是否开启 DevTools. 如果设置为 (false), 则无法使用 (BrowserWindow.webContents.openDevTools ()) 打开 DevTools。 默认值为 (true)
    webPreferences.nodeIntegration boolean是否启用Node integration. 默认值为 (false).
    webPreferences.nodeIntegrationInWorker boolean是否在Web工作器中启用了Node集成. 默认值为 (false). 更多内容参见 多线程
    webPreferences.nodeIntegrationInSubFrames boolean 实验性是否允许在子页面(iframe)或子窗口(child window)中集成Node.js; 预先加载的脚本会被注入到每一个iframe,你可以用 (process.isMainFrame) 来判断当前是否处于主框架(main frame)中。
    webPreferences.preload string在页面运行其他脚本之前预先加载指定的脚本 无论页面是否集成Node, 此脚本都可以访问所有Node API 脚本路径为文件的绝对路径。 当 node integration 关闭时, 预加载的脚本将从全局范围重新引入node的全局引用标志参考示例
    webPreferences.sandbox boolean如果设置该参数, 沙箱的渲染器将与窗口关联, 使它与Chromium OS-level 的沙箱兼容, 并禁用 Node. js 引擎。 它与 (nodeIntegration) 的选项不同,且预加载脚本的 API 也有限制。更多详情
    webPreferences.sessionSession 设置页面的 session 而不是直接忽略 Session 对象, 也可用 (partition) 选项来代替,它接受一个 partition 字符串. 同时设置了_(session)_ 和 _(partition)_时, (session) 的优先级更高. 默认使用默认的 session.
    webPreferences.partitionstring (optional) - 通过 session 的 partition 字符串来设置界面session. 如果 (partition)(persist:)开头, 该页面将使用持续的 session,并在所有页面生效,且使用同一个(partition). 如果没有 (persist:) 前缀, 页面将使用 in-memory session. 通过分配相同的 (partition), 多个页可以共享同一会话。 默认使用默认的 session.
    webPreferences.zoomFactor number页面的默认缩放系数, (3.0) 表示 (300%)。 默认值为 (1.0).
    webPreferences.javascript boolean是否启用 JavaScript 支持。 默认值为 (true)
    webPreferences.webSecurity boolean当设置为 (false), 它将禁用同源策略 (通常用来测试网站), 如果此选项不是由开发者设置的,还会把 _(allowRunningInsecureContent)_设置为 (true). 默认值为 (true)
    webPreferences.allowRunningInsecureContent boolean允许一个 https 页面运行来自http url的JavaScript, CSS 或 plugins。 默认值为 (false)
    webPreferences.images boolean允许加载图片。 默认值为 (true)
    webPreferences.imageAnimationPolicy string指定如何运行图像动画 (比如: GIF等). 可以是 (animate), (animateOnce)(noAnimation)。默认值为 (animate)
    webPreferences.textAreasAreResizable boolean允许调整 TextArea 元素大小。 默认值为 (true)
    webPreferences.webgl boolean启用 WebGL 支持。 默认值为 (true)
    webPreferences.plugins boolean是否应该启用插件。 默认值为 (false)
    webPreferences.experimentalFeatures boolean启用 Chromium 的实验功能。 默认值为 (false)
    webPreferences.scrollBounce boolean (mac)启用滚动回弹(橡皮筋)效果。 默认值为 (false)
    webPreferences.enableBlinkFeaturesstring(逗号) 分隔的需要启用的特性列表,譬如 (CSSVariables,KeyboardEventKey)RuntimeEnabledFeatures.json5 文件中查看被支持的所有特性
    webPreferences.disableBlinkFeatures string(,) 分隔的禁用特性列表, 如 (CSSVariables,KeyboardEventKey)RuntimeEnabledFeatures.json5 文件中查看被支持的所有特性
    defaultFontFamily Object为 font-family 设置默认字体
    defaultFontFamily.standard string默认值为 (Times New Roman)
    defaultFontFamily.serif string默认值为 (Times New Roman)
    defaultFontFamily.sansSerif string默认值为 (Arial)
    defaultFontFamily.monospace string默认值为 (Courier New)
    defaultFontFamily.cursive string默认值为 (Script)
    defaultFontFamily.fantasy string默认值为 (Impact)
    defaultFontSize Integer默认值为 (16)
    defaultMonospaceFontSize Integer默认值为 (13)
    minimumFontSize Integer默认值为 (0)
    defaultEncoding string默认值为 (ISO-8859-1)
    backgroundThrottling boolean是否在页面成为背景时限制动画和计时器。 这也会影响到 Visibility API。默认值为 (true)
    offscreen boolean是否绘制和渲染可视区域外的窗口。默认值为 (false)。更多详情, 请参见 offscreen rendering tutorial
    contextIsolation boolean是否在独立 JavaScript 环境中运行 Electron API和指定的_(preload)_ 脚本。默认为 (true)(预加载)脚本所运行的上下文环境只能访问其自身专用的 (文档) 和全局 (窗口),其自身一系列内置的JavaScript ((Array), (Object), (JSON), 等等) 也是如此,这些对于已加载的内容都是不可见的。 Electron API 将只在_(预加载)脚本中可用,在已加载页面中不可用。 这个选项应被用于加载可能不被信任的远程内容时来确保加载的内容无法篡改(预加载)_脚本和任何正在使用的Electron api。 该选项使用的是与Chrome内容脚本相同的技术。你可以在开发者工具Console选项卡内顶部组合框中选择 'Electron Isolated Context'条目来访问这个上下文
    webviewTag boolean是否启用 (<webview>) tag标签。默认值为 (false)注意:(< webview>) 配置的 (preload) 脚本在执行时将启用节点集成, 因此应确保远程或不受信任的内容无法创建恶意的 (preload) 脚本 。 可以使用 webContents 上的 (will-attach-webview) 事件对 (preload) 脚本进行剥离, 并验证或更改 (<webview>) 的初始设置
    additionalArguments string[]strin一个将被附加到当前应用程序的渲染器进程中_(process.argv)_的字符串列表。可用于将少量的数据传递到渲染器进程预加载脚本中。
    safeDialogs boolean是否启用浏览器样式的持续对话框保护。 默认值为 (false)
    safeDialogsMessage string当持续对话框保护被触发时显示的消息。 如果没有定义,那么将使用缺省的消息。注意:当前缺省消息是英文,并没有本地化
    disableDialogs boolean是否完全禁用对话框。 覆盖 (safeDialogs)。 默认值为 (false)
    navigateOnDragDrop boolean将文件或链接拖放到页面上时是否触发页面跳转。 默认值为 (false)
    autoplayPolicy string窗口中内容要使用的自动播放策略,值可以是 (no-user-gesture-required), (user-gesture-required), (document-user-activation-required)。默认为 (no-user-gesture-required)
    disableHtmlFullscreenWindowResize boolean是否阻止窗口在进入 HTML 全屏时调整大小。默认值为 (false)
    accessibleTitle string仅提供给如屏幕读取器等辅助工具的替代标题字符串。此字符串不直接对用户可见
    spellcheck boolean是否启用内置拼写检查器。 默认值为 (true)
    enableWebSQL boolean是否启用 WebSQL api。 默认值为 (true)
    v8CacheOptions string强制 blink 使用 v8 代码缓存策略。 可接受的值为:
    v8CacheOptions.none禁用代码缓存
    v8CacheOptions.code基于启发式代码缓存
    v8CacheOptions.bypassHeatCheck绕过启发式代码缓存,但使用懒编译。
    v8CacheOptions.bypassHeatCheckAndEagerCompile与上面相同,除了编译是及时的。 默认策略是 (code)
    enablePreferredSizeMode boolean是否启用首选大小模式。 首选大小是包含文档布局所需的最小大小--无需滚动。 启用该属性将导致在首选大小发生变化时,在 (WebContents) 上触发 (preferred-size-changed) 事件。默认值为 (false)
    titleBarOverlay Object/Boolean当在 macOS 使用无框窗口结合 (win.setWindowButtonVisibility(true)) 或使用 (titleBarStyle) 以便标准窗口控制 (在 macOS为 "traffic lights") 可见,此属性将启用 Window Controls Overlay JavaScript APIsCSS Environment Variables。指定 (true) 将导致覆盖默认系统颜色。 默认值为 (false)
    color String (win)启用窗口控制时覆盖面的 CSS 颜色 默认是系统颜色
    symbolColor String (win)启用时窗口控制中符号的 CSS 颜色 默认是系统颜色
    height Integer (win/mac)标题栏和 Window Controls Overlay,以像素为单位。 默认值为系统高度

实例事件

diff --git a/docs/emmet.html b/docs/emmet.html index 8d9bf867..cf42c3d8 100644 --- a/docs/emmet.html +++ b/docs/emmet.html @@ -88,7 +88,7 @@

ID 和 CLASS 属性

-

#header

+

# header

<div id="header"></div>
 

.title

@@ -3378,7 +3378,7 @@ Alias of command

-
:-:-
acalign-content:;
ac:calign-content:center;
ac:fealign-content:flex-end;
ac:fsalign-content:flex-start;
ac:salign-content:stretch;
ac:saalign-content:space-around;
ac:sbalign-content:space-between;
aialign-items:;
ai:balign-items:baseline;
ai:calign-items:center;
ai:fealign-items:flex-end;
ai:fsalign-items:flex-start;
ai:salign-items:stretch;
apappearance:${none};
asalign-self:;
as:aalign-self:auto;
as:balign-self:baseline;
as:calign-self:center;
as:fealign-self:flex-end;
as:fsalign-self:flex-start;
as:salign-self:stretch;
bfvbackface-visibility:;
bfv:hbackface-visibility:hidden;
bfv:vbackface-visibility:visible;
bg:iefilter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop');
cm/* ${child} */
colmcolumns:;
colmccolumn-count:;
colmfcolumn-fill:;
colmgcolumn-gap:;
colmrcolumn-rule:;
colmrccolumn-rule-color:;
colmrscolumn-rule-style:;
colmrwcolumn-rule-width:;
colmscolumn-span:;
colmwcolumn-width:;
d:ib+display: inline-block;
*display: inline;
*zoom: 1;
jcjustify-content:;
jc:cjustify-content:center;
jc:fejustify-content:flex-end;
jc:fsjustify-content:flex-start;
jc:sajustify-content:space-around;
jc:sbjustify-content:space-between;
marmax-resolution:res;
mirmin-resolution:res;
op+opacity: ; filter: alpha(opacity=);
op:iefilter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
op:ms-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
ordorder:;
oriorientation:;
ori:lorientation:landscape;
ori:porientation:portrait;
tovtext-overflow:${ellipsis};
tov:ctext-overflow:clip;
tov:etext-overflow:ellipsis;
trstransition:prop time;
trsdetransition-delay:time;
trsdutransition-duration:time;
trsptransition-property:prop;
trstftransition-timing-function:tfunc;
ususer-select:${none};
wfsm-webkit-font-smoothing:${antialiased};
wfsm:a-webkit-font-smoothing:antialiased;
wfsm:n-webkit-font-smoothing:none;
wfsm:s, wfsm:sa-webkit-font-smoothing:subpixel-antialiased;
wmwriting-mode:lr-tb;
wm:btlwriting-mode:bt-lr;
wm:btrwriting-mode:bt-rl;
wm:lrbwriting-mode:lr-bt;
wm:lrtwriting-mode:lr-tb;
wm:rlbwriting-mode:rl-bt;
wm:rltwriting-mode:rl-tb;
wm:tblwriting-mode:tb-lr;
wm:tbrwriting-mode:tb-rl;
+
:-:-
acalign-content:;
ac:calign-content:center;
ac:fealign-content:flex-end;
ac:fsalign-content:flex-start;
ac:salign-content:stretch;
ac:saalign-content:space-around;
ac:sbalign-content:space-between;
aialign-items:;
ai:balign-items:baseline;
ai:calign-items:center;
ai:fealign-items:flex-end;
ai:fsalign-items:flex-start;
ai:salign-items:stretch;
apappearance:${none};
asalign-self:;
as:aalign-self:auto;
as:balign-self:baseline;
as:calign-self:center;
as:fealign-self:flex-end;
as:fsalign-self:flex-start;
as:salign-self:stretch;
bfvbackface-visibility:;
bfv:hbackface-visibility:hidden;
bfv:vbackface-visibility:visible;
bg:iefilter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop');
cm/* ${child} */
colmcolumns:;
colmccolumn-count:;
colmfcolumn-fill:;
colmgcolumn-gap:;
colmrcolumn-rule:;
colmrccolumn-rule-color:;
colmrscolumn-rule-style:;
colmrwcolumn-rule-width:;
colmscolumn-span:;
colmwcolumn-width:;
d:ib+display: inline-block;
*display: inline;
*zoom: 1;
jcjustify-content:;
jc:cjustify-content:center;
jc:fejustify-content:flex-end;
jc:fsjustify-content:flex-start;
jc:sajustify-content:space-around;
jc:sbjustify-content:space-between;
marmax-resolution:res;
mirmin-resolution:res;
op+opacity: ; filter: alpha(opacity=);
op:iefilter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
op:ms-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';
ordorder:;
oriorientation:;
ori:lorientation:landscape;
ori:porientation:portrait;
tovtext-overflow:${ellipsis};
tov:ctext-overflow:clip;
tov:etext-overflow:ellipsis;
trstransition:prop time;
trsdetransition-delay:time;
trsdutransition-duration:time;
trsptransition-property:prop;
trstftransition-timing-function:tfunc;
ususer-select:${none};
wfsm-webkit-font-smoothing:${antialiased};
wfsm:a-webkit-font-smoothing:antialiased;
wfsm:n-webkit-font-smoothing:none;
wfsm:s, wfsm:sa-webkit-font-smoothing:subpixel-antialiased;
wmwriting-mode:lr-tb;
wm:btlwriting-mode:bt-lr;
wm:btrwriting-mode:bt-rl;
wm:lrbwriting-mode:lr-bt;
wm:lrtwriting-mode:lr-tb;
wm:rlbwriting-mode:rl-bt;
wm:rltwriting-mode:rl-tb;
wm:tblwriting-mode:tb-lr;
wm:tbrwriting-mode:tb-rl;

animation

@@ -3678,7 +3678,7 @@ Alias of command

<xsl:otherwise></xsl:otherwise> </xsl:choose>
-

xsl 别名 !!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{ | }

+

xsl 别名 !!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{ | }

<?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></xsl:stylesheet>
 
diff --git a/docs/expressjs.html b/docs/expressjs.html index c711dc74..1157bbbf 100644 --- a/docs/expressjs.html +++ b/docs/expressjs.html @@ -43,17 +43,20 @@

Hello World

    -
  • 创建项目,添加 package.json 配置 +
  • +

    创建项目,添加 package.json 配置

    $ mkdir myapp # 创建目录
     $ cd myapp    # 进入目录
     $ npm init -y # 初始化一个配置
     
  • -
  • 安装依赖 +
  • +

    安装依赖

    $ npm install express # 安装依赖
     
  • -
  • 入口文件 index.js 添加代码: +
  • +

    入口文件 index.js 添加代码:

    const express = require('express')
     const app = express()
     const port = 3000
    @@ -65,7 +68,8 @@
     })
     
  • -
  • 使用以下命令运行应用程序 +
  • +

    使用以下命令运行应用程序

    $ node index.js
     
  • @@ -453,7 +457,7 @@ -
    :-:-
    res.app #
    res.headersSent#
    res.locals#
    +
    :-:-
    res.app#
    res.headersSent#
    res.locals#

    方法

    diff --git a/docs/git.html b/docs/git.html index 0e9d822c..a0755be1 100644 --- a/docs/git.html +++ b/docs/git.html @@ -249,16 +249,19 @@

Git 技巧

重命名分支

    -
  • 重命名new +
  • +

    重命名new

    $ git branch -m <new>
     $ git branch -m <old> <new> #重命名分支  
     
  • -
  • 推送并重置 +
  • +

    推送并重置

    $ git push origin -u <new>
     
  • -
  • 删除远程分支 +
  • +

    删除远程分支

    $ git push origin --delete <old> #方法1
     $ git push origin :oldBranchName #方法2
     
    diff --git a/docs/golang.html b/docs/golang.html index b8531918..01e1c0c5 100644 --- a/docs/golang.html +++ b/docs/golang.html @@ -211,56 +211,56 @@

字符串函数

package main
 import (
-	"fmt"
-	s "strings"
+        "fmt"
+        s "strings"
 )
 func main() {
     /* 需要将字符串导入为 s */
-	fmt.Println(s.Contains("test", "e"))
+        fmt.Println(s.Contains("test", "e"))
     /* 内置 */
     fmt.Println(len("hello"))  // => 5
     // 输出: 101
-	fmt.Println("hello"[1])
+        fmt.Println("hello"[1])
     // 输出: e
-	fmt.Println(string("hello"[1]))
+        fmt.Println(string("hello"[1]))
 }
 

fmt.Printf

package main
 import (
-	"fmt"
-	"os"
+        "fmt"
+        "os"
 )
 type point struct {
-	x, y int
+        x, y int
 }
 func main() {
-	p := point{1, 2}
-	fmt.Printf("%v\n", p)                        // => {1 2}
-	fmt.Printf("%+v\n", p)                       // => {x:1 y:2}
-	fmt.Printf("%#v\n", p)                       // => main.point{x:1, y:2}
-	fmt.Printf("%T\n", p)                        // => main.point
-	fmt.Printf("%t\n", true)                     // => TRUE
-	fmt.Printf("%d\n", 123)                      // => 123
-	fmt.Printf("%b\n", 14)                       // => 1110
-	fmt.Printf("%c\n", 33)                       // => !
-	fmt.Printf("%x\n", 456)                      // => 1c8
-	fmt.Printf("%f\n", 78.9)                     // => 78.9
-	fmt.Printf("%e\n", 123400000.0)              // => 1.23E+08
-	fmt.Printf("%E\n", 123400000.0)              // => 1.23E+08
-	fmt.Printf("%s\n", "\"string\"")             // => "string"
-	fmt.Printf("%q\n", "\"string\"")             // => "\"string\""
-	fmt.Printf("%x\n", "hex this")               // => 6.86578E+15
-	fmt.Printf("%p\n", &p)                       // => 0xc00002c040
-	fmt.Printf("|%6d|%6d|\n", 12, 345)           // => |    12|   345|
-	fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45)     // => |  1.20|  3.45|
-	fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45)   // => |1.20  |3.45  |
-	fmt.Printf("|%6s|%6s|\n", "foo", "b")        // => |   foo|     b|
-	fmt.Printf("|%-6s|%-6s|\n", "foo", "b")      // => |foo   |b     |
-	s := fmt.Sprintf("a %s", "string")
-	fmt.Println(s)
-	fmt.Fprintf(os.Stderr, "an %s\n", "error")
+        p := point{1, 2}
+        fmt.Printf("%v\n", p)                        // => {1 2}
+        fmt.Printf("%+v\n", p)                       // => {x:1 y:2}
+        fmt.Printf("%#v\n", p)                       // => main.point{x:1, y:2}
+        fmt.Printf("%T\n", p)                        // => main.point
+        fmt.Printf("%t\n", true)                     // => TRUE
+        fmt.Printf("%d\n", 123)                      // => 123
+        fmt.Printf("%b\n", 14)                       // => 1110
+        fmt.Printf("%c\n", 33)                       // => !
+        fmt.Printf("%x\n", 456)                      // => 1c8
+        fmt.Printf("%f\n", 78.9)                     // => 78.9
+        fmt.Printf("%e\n", 123400000.0)              // => 1.23E+08
+        fmt.Printf("%E\n", 123400000.0)              // => 1.23E+08
+        fmt.Printf("%s\n", "\"string\"")             // => "string"
+        fmt.Printf("%q\n", "\"string\"")             // => "\"string\""
+        fmt.Printf("%x\n", "hex this")               // => 6.86578E+15
+        fmt.Printf("%p\n", &p)                       // => 0xc00002c040
+        fmt.Printf("|%6d|%6d|\n", 12, 345)           // => |    12|   345|
+        fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45)     // => |  1.20|  3.45|
+        fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45)   // => |1.20  |3.45  |
+        fmt.Printf("|%6s|%6s|\n", "foo", "b")        // => |   foo|     b|
+        fmt.Printf("|%-6s|%-6s|\n", "foo", "b")      // => |foo   |b     |
+        s := fmt.Sprintf("a %s", "string")
+        fmt.Println(s)
+        fmt.Fprintf(os.Stderr, "an %s\n", "error")
 }
 

另见:fmt

@@ -399,16 +399,16 @@
package main
 import (
-	"fmt"
+        "fmt"
 )
 type Vertex struct {
-	X int
-	Y int
+        X int
+        Y int
 }
 func main() {
-	v := Vertex{1, 2}
-	v.X = 4
-	fmt.Println(v.X, v.Y) // => 4 2
+        v := Vertex{1, 2}
+        v.X = 4
+        fmt.Println(v.X, v.Y) // => 4 2
 }
 

参见:结构(Structs)

@@ -585,22 +585,22 @@
package main
 import (
-	"fmt"
-	"time"
+        "fmt"
+        "time"
 )
 func f(from string) {
-	for i := 0; i < 3; i++ {
-		fmt.Println(from, ":", i)
-	}
+        for i := 0; i < 3; i++ {
+                fmt.Println(from, ":", i)
+        }
 }
 func main() {
-	f("direct")
-	go f("goroutine")
-	go func(msg string) {
-		fmt.Println(msg)
-	}("going")
-	time.Sleep(time.Second)
-	fmt.Println("done")
+        f("direct")
+        go f("goroutine")
+        go func(msg string) {
+                fmt.Println(msg)
+        }("going")
+        time.Sleep(time.Second)
+        fmt.Println("done")
 }
 

参见:Goroutines, Channels

@@ -608,23 +608,23 @@
package main
 import (
-	"fmt"
-	"sync"
-	"time"
+        "fmt"
+        "sync"
+        "time"
 )
 func w(id int, wg *sync.WaitGroup) {
-	defer wg.Done()
-	fmt.Printf("%d starting\n", id)
-	time.Sleep(time.Second)
-	fmt.Printf("%d done\n", id)
+        defer wg.Done()
+        fmt.Printf("%d starting\n", id)
+        time.Sleep(time.Second)
+        fmt.Printf("%d done\n", id)
 }
 func main() {
-	var wg sync.WaitGroup
-	for i := 1; i <= 5; i++ {
-		wg.Add(1)
-		go w(i, &wg)
-	}
-	wg.Wait()
+        var wg sync.WaitGroup
+        for i := 1; i <= 5; i++ {
+                wg.Add(1)
+                go w(i, &wg)
+        }
+        wg.Wait()
 }
 

参见:WaitGroup

diff --git a/docs/grep.html b/docs/grep.html index 9d3d020f..73162015 100644 --- a/docs/grep.html +++ b/docs/grep.html @@ -275,7 +275,7 @@ -
:-:-
^ 行的开头
$ 行结束
^$空行
\<词的开头
\>词尾
+
:-:-
^行的开头
$行结束
^$空行
\<词的开头
\>词尾

更多示例

搜索命令行历史记录

history | grep git
diff --git a/docs/html.html b/docs/html.html
index 72a7f508..b2fabb7d 100644
--- a/docs/html.html
+++ b/docs/html.html
@@ -652,16 +652,16 @@
 

↓ 预览

- +
- +

- +

HTML <form> 元素用于收集信息并将其发送到外部源。

Form 属性

@@ -841,7 +841,7 @@

Input 属性

输入标记是一个空元素,用于标识要从用户处获取的特定类型的字段信息。

-
<input type="text" name="?" value="?" minlength="6"	 required />
+
<input type="text" name="?" value="?" minlength="6"  required />
 

diff --git a/docs/htop.html b/docs/htop.html index a69fb8a4..7a090bea 100644 --- a/docs/htop.html +++ b/docs/htop.html @@ -134,7 +134,7 @@
:-:-
R运行中
S休眠
T追踪/停止
Z僵尸
D磁盘睡眠
- +

交互式命令

@@ -231,7 +231,7 @@
:-:-
F1, h, ?转到帮助屏幕
F10, q退出
Space标记或取消标记进程
U取消标记所有进程(删除所有使用 Space 键添加的标记)
s跟踪进程系统调用:如果安装了 strace(1),按下此键会将其附加到当前选定的进程,呈现进程发出的系统调用的实时更新
l显示进程打开的文件:如果安装了 lsof(1),按下该键将显示进程打开的文件描述符列表
F2, S转到设置屏幕,您可以在其中配置屏幕顶部显示的仪表,设置各种显示选项,在配色方案中进行选择,并选择显示的列,以何种顺序显示
F3, /逐步搜索所有显示进程的命令行。当前选定(突出显示)的命令将在您键入时更新。在搜索模式下,按 F3 将循环匹配出现的事件
F4, \增量进程过滤:输入部分进程命令行,仅显示名称匹配的进程。要取消过滤,请再次输入过滤选项并按 Esc
F5, t树视图:按父级组织进程,并将它们之间的关系布局为树。切换键将在树和您之前选择的排序视图之间切换。选择排序视图将退出树视图
F6在排序视图上,选择一个字段进行排序,也可以通过 < 和 > 访问。当前排序字段由标题中的突出显示。在树视图中,展开或折叠当前子树。树节点中的“+”指示符表示它已折叠
F7, ]增加所选进程的优先级(从“nice”值中减去)。这只能由超级用户完成
F8, [降低选定进程的优先级(添加到“nice”值)
F9, k“杀死”进程:向一个或一组进程发送一个在菜单中选择的信号。如果进程被标记,则将信号发送到所有标记的进程。如果没有标记,则发送到当前选定的进程
+, -在树视图模式下,展开或折叠子树。
a(在多 CPU 机器上)设置 CPU 亲和性:标记允许进程使用的 CPU
u仅显示指定用户拥有的进程
F“跟随”进程:如果排序顺序导致当前选定的进程在列表中移动,则使选择栏跟随它。这对于监控进程很有用:这样,您可以使进程始终在屏幕上可见。使用移动键时,“跟随”失效。
p在适用的情况下显示运行程序的完整路径(这是一个切换键)
Ctrl-L刷新:重绘屏幕并重新计算数值
NumbersPID搜索:输入进程ID,选择突出显示将移至它
- +

排序/线程

@@ -267,7 +267,7 @@
:-:-
M内存使用情况排序 (最高兼容性键)
PCPU使用情况排序 (最高兼容性键)
T时间排序 (最高兼容性键)
I反转排序顺序
K隐藏内核线程
H隐藏用户线程
- +

滚动

@@ -315,7 +315,7 @@
:-:-
Up, Alt-k在流程列表中选择(突出)一个流程
Down, Alt-j在流程列表中选择(突出)一个流程
Left, Alt-h滚动流程列表
Right, Alt-l滚动进程列表
PgUp, PgDn将流程列表向上向下滚动一个窗口
Home滚动到流程列表的顶部
选择第一个流程
End滚动到流程列表的底部
选择最后一个流程
Ctrl-A, ^滚动到流程条目开头 (即行开头)
Ctrl-E, $滚动到流程条目末尾 (即行尾)
- +
© 2022 Kenny Wang, All rights reserved.