【JSON2WEB】11 基于 Amis 角色功能权限设置页面

【JSON2WEB】01 WEB管理信息系统架构设计

【JSON2WEB】02 JSON2WEB初步UI设计

【JSON2WEB】03 go的模板包html/template的使用

【JSON2WEB】04 amis低代码前端框架介绍

【JSON2WEB】05 前端开发三件套 HTML CSS JavaScript 速成

【JSON2WEB】06 JSON2WEB前端框架搭建

【JSON2WEB】07 Amis可视化设计器CRUD增删改查

【JSON2WEB】08 Amis的事件和校验

【JSON2WEB】09 Amis-editor的代码移植到json2web

【JSON2WEB】10 基于 Amis 做个登录页面login.html


1 角色功能权限设置设计

页面分2栏,左边角色,右边为角色功能权限。角色授权保存在数据库表中。

1.1 页面布局

角色功能
角色列表功能列表

1.2 角色表

-- Create table
create table S_ROLE
(
  p_id       VARCHAR2(17) not null,
  s_name     VARCHAR2(52),
  s_note     VARCHAR2(52),
  time_stamp TIMESTAMP(6) default CURRENT_TIMESTAMP
)

1.3 功能表

-- Create table
create table S_MENU
(
  p_id    VARCHAR2(4) not null,
  s_name  VARCHAR2(63),
  s_ename VARCHAR2(63),
  s_winp  VARCHAR2(63),
  s_note  VARCHAR2(63),
  s_parm  VARCHAR2(63)
)

1.4 角色功能权限关系表

-- Create table
create table S_ROLE_MENU
(
  pf_role    VARCHAR2(17) not null,
  pf_menu    VARCHAR2(17) not null,
  time_stamp TIMESTAMP(6) default CURRENT_TIMESTAMP
)

1.5 角色功能视图

用于功能列表显示与操作。

create or replace view 
role_menu_v -- 角色功能视图
as
select m.p_id as m_id,m.s_name ,s.pf_role,r.p_id as r_id,
  decode(length(s.pf_role),4,1,0) as b_yn
 from s_menu m
cross join s_role r --先做一个角色与功能的笛卡尔交叉,再连接角色功能表
left join s_role_menu s on s.pf_menu = m.p_id and s.pf_role = r.p_id
order by r.p_id,m.p_id;

授权的功能b_yn = 1
在这里插入图片描述

2 页面布局与设计

布局容器用分栏,角色及功能权限用2个增删改查crud。
在这里插入图片描述

2.1 角色crud增加行点击事件

行点击时刷新角色功能的数据。
在这里插入图片描述

 "onEvent": {
    "rowClick": {
      "weight": 0,
      "actions": [
        {
          "componentId": "u:1f6f2d0609fc",
          "ignoreError": false,
          "actionType": "reload",
          "dataMergeMode": "override",
          "data": {
            "where": "r_id='$event.data.item.P_ID'"
          }
        }
      ]
    }
  }

Data为我的后台查询条件,就是url上query条件。

2.2 勾选事件

勾选列定义2个值变化事件,勾选插入数据,去勾删除数据。
在这里插入图片描述

插入数据事件

勾选时执行。
在这里插入图片描述

 "actions": [
        {
          "ignoreError": false,
          "outputVar": "responseResult",
          "actionType": "ajax",
          "options": {},
          "api": {
            "url": "http://127.0.0.1:5217/rest/s_role_menu/",
            "method": "post",
            "requestAdaptor": "",
            "adaptor": "",
            "messages": {},
            "sendOn": "",
            "data": {
              "pf_role": "${R_ID}",
              "pf_menu": "${M_ID}"
            }
          },
          "expression": "${event.data.value === 1}",
          "stopPropagation": "${event.data.value===0}"
        },

删除数据事件

去勾时执行。
在这里插入图片描述

{
          "ignoreError": false,
          "outputVar": "responseResult",
          "actionType": "ajax",
          "options": {},
          "api": {
            "url": "http://127.0.0.1:5217/rest/s_role_menu/?where=pf_role='${R_ID}' and pf_menu='${M_ID}'",
            "method": "delete",
            "requestAdaptor": "",
            "adaptor": "",
            "messages": {}
          },
          "expression": "${event.data.value===0}",
          "stopPropagation": "${event.data.value===1}"
        }

2.2 角色功能crud设置

接口初始化是不拉取数据。
在这里插入图片描述

2.3 页面全部代码

{
  "type": "page",
  "title": "角色功能权限设置",
  "body": [
    {
      "type": "grid",
      "columns": [
        {
          "body": [
            {
              "id": "u:091b9d57f777",
              "type": "crud",
              "mode": "table",
              "syncLocation": false,
              "primaryField": "P_ID",
              "api": {
                "url": "http://127.0.0.1:5217/rest/s_role",
                "method": "get"
              },
              "headerToolbar": [
                {
                  "type": "button",
                  "id": "u:16551379d280",
                  "label": "新增",
                  "actionType": "drawer",
                  "level": "primary",
                  "editorSetting": {
                    "behavior": "create"
                  },
                  "drawer": {
                    "title": "新增",
                    "body": [
                      {
                        "type": "form",
                        "api": {
                          "method": "post",
                          "url": "http://127.0.0.1:5217/rest/s_role",
                          "requestAdaptor": "",
                          "adaptor": "",
                          "messages": {}
                        },
                        "body": [
                          {
                            "type": "input-text",
                            "name": "p_id",
                            "label": "P_ID",
                            "id": "u:4d1b8b17dd50",
                            "required": true
                          },
                          {
                            "type": "input-text",
                            "name": "s_name",
                            "label": "角色名称",
                            "id": "u:8cc7cb12757f",
                            "required": true
                          },
                          {
                            "type": "input-text",
                            "name": "s_note",
                            "label": "备注",
                            "id": "u:2b9c33a07acf"
                          }
                        ],
                        "id": "u:f58f36c84f4c",
                        "actions": [
                          {
                            "type": "submit",
                            "label": "提交",
                            "primary": true
                          }
                        ],
                        "feat": "Insert",
                        "dsType": "api"
                      }
                    ],
                    "id": "u:747ffedb9a7c",
                    "actions": [
                      {
                        "type": "button",
                        "actionType": "cancel",
                        "label": "取消",
                        "id": "u:ceb03306d65f"
                      },
                      {
                        "type": "button",
                        "actionType": "confirm",
                        "label": "确定",
                        "primary": true,
                        "id": "u:3d9c4d86cfb2"
                      }
                    ]
                  },
                  "icon": "fa fa-plus"
                },
                {
                  "type": "export-excel",
                  "id": "u:5d48d559aa25"
                },
                {
                  "type": "bulk-actions"
                }
              ],
              "columns": [
                {
                  "type": "text",
                  "name": "P_ID",
                  "id": "u:bbe6028ae0c5",
                  "label": "角色ID",
                  "searchable": true,
                  "visible": true,
                  "placeholder": "-"
                },
                {
                  "type": "text",
                  "name": "S_NAME",
                  "id": "u:12be864daeab",
                  "placeholder": "-",
                  "label": "名称",
                  "searchable": true,
                  "toggled": true,
                  "fixed": "",
                  "className": ""
                },
                {
                  "type": "datetime",
                  "name": "TIME_STAMP",
                  "id": "u:6bace394776e",
                  "label": "更新时间",
                  "format": "YYYY-MM-DD HH:mm:ss"
                },
                {
                  "type": "text",
                  "name": "S_NOTE",
                  "id": "u:db13008a4821",
                  "label": "备注"
                },
                {
                  "type": "operation",
                  "label": "操作",
                  "buttons": [
                    {
                      "label": "编辑",
                      "type": "button",
                      "actionType": "drawer",
                      "level": "link",
                      "editorSetting": {
                        "behavior": "update"
                      },
                      "id": "u:2d2b520123cf",
                      "drawer": {
                        "title": "编辑",
                        "body": [
                          {
                            "type": "form",
                            "api": {
                              "method": "put",
                              "url": "http://127.0.0.1:5217/rest/s_role/?where=p_id='${P_ID}'",
                              "requestAdaptor": "",
                              "adaptor": "",
                              "messages": {}
                            },
                            "body": [
                              {
                                "name": "P_ID",
                                "label": "P_ID",
                                "type": "input-text",
                                "id": "u:2593d30c1ccb",
                                "required": true
                              },
                              {
                                "label": "角色名称",
                                "name": "S_NAME",
                                "type": "input-text",
                                "id": "u:36fb4cfb08d6",
                                "showCounter": false,
                                "required": true
                              },
                              {
                                "label": "备注",
                                "name": "S_NOTE",
                                "type": "input-text",
                                "id": "u:d154d931e0a3"
                              }
                            ],
                            "id": "u:987f23c51645",
                            "actions": [
                              {
                                "type": "submit",
                                "label": "提交",
                                "primary": true
                              }
                            ],
                            "feat": "Insert",
                            "dsType": "api"
                          }
                        ],
                        "id": "u:7c6e61a902ce",
                        "actions": [
                          {
                            "type": "button",
                            "actionType": "cancel",
                            "label": "取消",
                            "id": "u:780ad561efc1"
                          },
                          {
                            "type": "button",
                            "actionType": "confirm",
                            "label": "确定",
                            "primary": true,
                            "id": "u:45527a149fd6"
                          }
                        ]
                      }
                    },
                    {
                      "label": "查看",
                      "type": "button",
                      "actionType": "drawer",
                      "level": "link",
                      "editorSetting": {
                        "behavior": "view"
                      },
                      "id": "u:e2047bc65d6b",
                      "drawer": {
                        "title": "查看详情",
                        "body": [
                          {
                            "type": "form",
                            "api": "xxx/update",
                            "body": [
                              {
                                "name": "P_ID",
                                "label": "P_ID",
                                "type": "static",
                                "id": "u:08156f086042",
                                "quickEdit": false,
                                "popOver": false,
                                "copyable": false
                              },
                              {
                                "label": "角色名称",
                                "name": "S_NAME",
                                "type": "static",
                                "id": "u:487232bc451c",
                                "quickEdit": false,
                                "popOver": false,
                                "copyable": false
                              },
                              {
                                "label": "更新时间",
                                "name": "TIME_STAMP",
                                "type": "static-datetime",
                                "id": "u:aba51eac1e1c",
                                "quickEdit": false,
                                "popOver": false,
                                "copyable": false,
                                "format": "YYYY-MM-DD HH:mm:ss"
                              },
                              {
                                "label": "备注",
                                "name": "S_NOTE",
                                "type": "static",
                                "id": "u:60c73035a649",
                                "quickEdit": false,
                                "popOver": false,
                                "copyable": false
                              }
                            ],
                            "id": "u:929916bb02e0",
                            "actions": [
                              {
                                "type": "submit",
                                "label": "提交",
                                "primary": true
                              }
                            ],
                            "feat": "Insert"
                          }
                        ],
                        "id": "u:34c165044747",
                        "actions": [
                          {
                            "type": "button",
                            "actionType": "cancel",
                            "label": "取消",
                            "id": "u:62278f468936"
                          },
                          {
                            "type": "button",
                            "actionType": "confirm",
                            "label": "确定",
                            "primary": true,
                            "id": "u:38c71e71e647"
                          }
                        ]
                      }
                    },
                    {
                      "type": "button",
                      "label": "删除",
                      "actionType": "ajax",
                      "level": "link",
                      "className": "text-danger",
                      "confirmText": "确定要删除?",
                      "api": {
                        "method": "delete",
                        "url": "http://127.0.0.1:5217/rest/s_role/?where=p_id='${P_ID}'"
                      },
                      "editorSetting": {
                        "behavior": "delete"
                      },
                      "id": "u:c08fb59a9328",
                      "onEvent": {
                        "click": {
                          "weight": 0,
                          "actions": []
                        }
                      }
                    }
                  ],
                  "id": "u:ea0dc035e0ec"
                }
              ],
              "loadDataOnce": true,
              "showHeader": true,
              "bulkActions": [],
              "itemActions": [],
              "perPageAvailable": [
                10
              ],
              "messages": {},
              "autoGenerateFilter": {
                "columnsNum": 2,
                "showBtnToolbar": true
              },
              "matchFunc": "",
              "title": "",
              "showFooter": true,
              "visible": true,
              "dsType": "api",
              "editorSetting": {
                "mock": {
                  "enable": true,
                  "maxDisplayRows": 5
                }
              },
              "onEvent": {
                "rowClick": {
                  "weight": 0,
                  "actions": [
                    {
                      "componentId": "u:1f6f2d0609fc",
                      "ignoreError": false,
                      "actionType": "reload",
                      "dataMergeMode": "override",
                      "data": {
                        "where": "r_id='$event.data.item.P_ID'"
                      }
                    }
                  ]
                }
              }
            }
          ],
          "id": "u:18b68e993a8d",
          "themeCss": {
            "baseControlClassName": {
              "border:default": {
                "top-border-style": "var(--borders-style-2)",
                "left-border-style": "var(--borders-style-2)",
                "right-border-style": "var(--borders-style-2)",
                "bottom-border-style": "var(--borders-style-2)",
                "right-border-width": "var(--borders-width-3)",
                "top-border-width": "var(--borders-width-3)",
                "left-border-width": "var(--borders-width-3)",
                "bottom-border-width": "var(--borders-width-3)"
              },
              "padding-and-margin:default": {
                "marginTop": "var(--sizes-size-5)",
                "marginRight": "var(--sizes-size-5)",
                "marginBottom": "var(--sizes-size-5)",
                "marginLeft": "var(--sizes-size-5)",
                "paddingTop": "var(--sizes-size-5)",
                "paddingRight": "var(--sizes-size-5)",
                "paddingBottom": "var(--sizes-size-5)",
                "paddingLeft": "var(--sizes-size-5)"
              }
            }
          },
          "md": 6
        },
        {
          "id": "u:d0513919f0fb",
          "md": 6,
          "body": [
            {
              "id": "u:1f6f2d0609fc",
              "type": "crud",
              "mode": "table2",
              "dsType": "api",
              "syncLocation": true,
              "primaryField": "pf_role,pf_menu",
              "loadType": "pagination",
              "api": {
                "url": "http://127.0.0.1:5217/rest/role_menu_v/",
                "method": "get",
                "requestAdaptor": "",
                "adaptor": "",
                "messages": {}
              },
              "headerToolbar": [
                {
                  "type": "flex",
                  "direction": "row",
                  "justify": "flex-start",
                  "alignItems": "stretch",
                  "style": {
                    "position": "static"
                  },
                  "items": [
                    {
                      "type": "container",
                      "align": "left",
                      "behavior": [
                        "Insert",
                        "BulkEdit",
                        "BulkDelete"
                      ],
                      "body": [],
                      "wrapperBody": false,
                      "style": {
                        "flexGrow": 1,
                        "flex": "1 1 auto",
                        "position": "static",
                        "display": "flex",
                        "flexBasis": "auto",
                        "flexDirection": "row",
                        "flexWrap": "nowrap",
                        "alignItems": "stretch",
                        "justifyContent": "flex-start"
                      },
                      "id": "u:bef09c369eab"
                    },
                    {
                      "type": "container",
                      "align": "right",
                      "behavior": [
                        "FuzzyQuery"
                      ],
                      "body": [],
                      "wrapperBody": false,
                      "style": {
                        "flexGrow": 1,
                        "flex": "1 1 auto",
                        "position": "static",
                        "display": "flex",
                        "flexBasis": "auto",
                        "flexDirection": "row",
                        "flexWrap": "nowrap",
                        "alignItems": "stretch",
                        "justifyContent": "flex-end"
                      },
                      "id": "u:b86c79951137"
                    }
                  ],
                  "id": "u:2259c57591f9"
                }
              ],
              "footerToolbar": [
                {
                  "type": "flex",
                  "direction": "row",
                  "justify": "flex-start",
                  "alignItems": "stretch",
                  "style": {
                    "position": "static"
                  },
                  "items": [
                    {
                      "type": "container",
                      "align": "left",
                      "body": [],
                      "wrapperBody": false,
                      "style": {
                        "flexGrow": 1,
                        "flex": "1 1 auto",
                        "position": "static",
                        "display": "flex",
                        "flexBasis": "auto",
                        "flexDirection": "row",
                        "flexWrap": "nowrap",
                        "alignItems": "stretch",
                        "justifyContent": "flex-start"
                      },
                      "id": "u:950df6025af1"
                    },
                    {
                      "type": "container",
                      "align": "right",
                      "body": [
                        {
                          "type": "pagination",
                          "behavior": "Pagination",
                          "layout": [
                            "total",
                            "perPage",
                            "pager"
                          ],
                          "perPage": 999,
                          "perPageAvailable": [
                            10,
                            20,
                            50,
                            100
                          ],
                          "align": "right",
                          "id": "u:cf75f0430847",
                          "size": ""
                        }
                      ],
                      "wrapperBody": false,
                      "style": {
                        "flexGrow": 1,
                        "flex": "1 1 auto",
                        "position": "static",
                        "display": "flex",
                        "flexBasis": "auto",
                        "flexDirection": "row",
                        "flexWrap": "nowrap",
                        "alignItems": "stretch",
                        "justifyContent": "flex-end"
                      },
                      "id": "u:cbf1a9ad79d2"
                    }
                  ],
                  "id": "u:3052aef717a9"
                }
              ],
              "columns": [
                {
                  "type": "checkbox",
                  "title": "勾选授权",
                  "name": "B_YN",
                  "id": "u:26ec6ff796a9",
                  "placeholder": "-",
                  "align": "center",
                  "trueValue": 1,
                  "falseValue": 0,
                  "onEvent": {
                    "change": {
                      "weight": 0,
                      "actions": [
                        {
                          "ignoreError": false,
                          "outputVar": "responseResult",
                          "actionType": "ajax",
                          "options": {},
                          "api": {
                            "url": "http://127.0.0.1:5217/rest/s_role_menu/",
                            "method": "post",
                            "requestAdaptor": "",
                            "adaptor": "",
                            "messages": {},
                            "sendOn": "",
                            "data": {
                              "pf_role": "${R_ID}",
                              "pf_menu": "${M_ID}"
                            }
                          },
                          "expression": "${event.data.value === 1}",
                          "stopPropagation": "${event.data.value===0}"
                        },
                        {
                          "ignoreError": false,
                          "outputVar": "responseResult",
                          "actionType": "ajax",
                          "options": {},
                          "api": {
                            "url": "http://127.0.0.1:5217/rest/s_role_menu/?where=pf_role='${R_ID}' and pf_menu='${M_ID}'",
                            "method": "delete",
                            "requestAdaptor": "",
                            "adaptor": "",
                            "messages": {}
                          },
                          "expression": "${event.data.value===0}",
                          "stopPropagation": "${event.data.value===1}"
                        }
                      ]
                    }
                  }
                },
                {
                  "type": "tpl",
                  "title": "功能ID",
                  "name": "M_ID",
                  "id": "u:8884f7cfc750"
                },
                {
                  "type": "tpl",
                  "title": "功能名称",
                  "name": "S_NAME",
                  "id": "u:cea732fa69f4"
                },
                {
                  "type": "tpl",
                  "title": "授权",
                  "name": "PF_ROLE",
                  "id": "u:86372060e12d"
                },
                {
                  "type": "tpl",
                  "title": "角色ID",
                  "name": "R_ID",
                  "id": "u:b29521a345f6"
                }
              ],
              "editorSetting": {
                "mock": {
                  "enable": true,
                  "maxDisplayRows": 5
                }
              },
              "placeholder": "暂无数据",
              "loadDataOnce": true,
              "perPage": 999,
              "showHeader": true,
              "lineHeight": "",
              "keepItemSelectionOnPageChange": false,
              "onEvent": {},
              "matchFunc": "",
              "messages": {},
              "initFetch": false,
              "showBadge": false
            }
          ]
        }
      ],
      "id": "u:35740fa147ea",
      "align": "left",
      "themeCss": {
        "baseControlClassName": {
          "border:default": {
            "top-border-style": "var(--borders-style-2)",
            "left-border-style": "var(--borders-style-2)",
            "right-border-style": "var(--borders-style-2)",
            "bottom-border-style": "var(--borders-style-2)",
            "top-border-width": "var(--borders-width-1)",
            "left-border-width": "var(--borders-width-1)",
            "right-border-width": "var(--borders-width-1)",
            "bottom-border-width": "var(--borders-width-1)"
          }
        }
      },
      "gap": "base",
      "valign": "top"
    }
  ],
  "id": "u:6cd046ec534c",
  "asideResizor": false,
  "pullRefresh": {
    "disabled": true
  },
  "regions": [
    "body",
    "header"
  ],
  "onEvent": {}
}

3 实操演练

Step 1 页面加载

在这里插入图片描述
功能列表不拉取数据。

Step 2 点击角色行

在这里插入图片描述

Step 3 勾选授权

在这里插入图片描述

Step 4 去勾收权

在这里插入图片描述


本文完

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/492255.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

网安小白入门课程/ Web渗透0基础就业班

想从事渗透相关工作,却不知从何学起?网上自学资料又旧又乱, 学起来时间周期长、效果差?到底学到什么程度才能找到工作? 知识又杂又乱,花了不少时间学习出来却很难成体系? 独自学习枯燥无味&a…

HomeLink项目部署和发布的完整流程

由于Java项目的配置较为繁琐,长时间不使用可能会忘记,因此我特意总结了一下配置流程。 1.软件环境: myeclipse-10.7.1-offline-installer-windows(直接安装) apache-tomcat-7.0.65-windows-x64(Tomcat下载安装以及配置-CSDN博客) JDK(Myeclipse自带…

openGauss学习笔记-252 openGauss性能调优-使用Plan Hint进行调优-Scan方式的Hint

文章目录 openGauss学习笔记-252 openGauss性能调优-使用Plan Hint进行调优-Scan方式的Hint252.1 功能描述252.2 语法格式252.3 参数说明252.4 示例 openGauss学习笔记-252 openGauss性能调优-使用Plan Hint进行调优-Scan方式的Hint 252.1 功能描述 指明scan使用的方法&#…

对 Transformer 中位置编码 Position Encoding 的理解

目录 什么是位置编码 Position Encoding 一、将绝对位置编码加在 Transformer 的输入端 (Sinusoidal 位置编码或可学习位置编码) 二、将绝对位置编码乘在 q k v (RoPE 位置编码) 三、将相对位置编码加在注意力权重 (ALiBi 位置编码) 什么是位置编码 Position Encoding Tr…

Hive3.0.0出库库表中timestamp字段读取为null

在利用sqoop1.99.7做数据迁移的时候,从mysql导出表格到hive建立对应的表格,字段中使用了timestamp类型,在读取数据的时候,发现数据为null。查找问题方法如下: 1、查询库表字段类型 命令:desc tablen…

如何避免SQL注入攻击?

🐓序言 当涉及到数据库操作时,防止SQL注入攻击至关重要。SQL注入是一种常见的网络安全威胁,攻击者通过在用户输入中插入恶意的SQL代码,从而可以执行未经授权的数据库操作。 🐓避免方式 使用参数化查询 使用参数化查询…

js实现拖放效果

dataTransfer对象 说明:dataTransfer对象用于从被拖动元素向放置目标传递字符串数据。因为这个对象是 event 的属性,所以在拖放事件的事件处理程序外部无法访问 dataTransfer。在事件处理程序内部,可以使用这个对象的属性和方法实现拖放功能…

基于Java在线玩具商城系统设计与实现(源码+部署文档)

博主介绍: ✌至今服务客户已经1000、专注于Java技术领域、项目定制、技术答疑、开发工具、毕业项目实战 ✌ 🍅 文末获取源码联系 🍅 👇🏻 精彩专栏 推荐订阅 👇🏻 不然下次找不到 Java项目精品实…

Java 基础学习(二十)Maven、XML与WebServer

1 Maven 1.1 什么是Maven 1.1.1 Maven概述 Maven是一种流行的构建工具,用于管理Java项目的构建,依赖管理和项目信息管理。它使用XML文件来定义项目结构和构建步骤,并使用插件来执行各种构建任务。Maven可以自动下载项目依赖项并管理它们的…

Spring 事务传播行为

实现原理 : Aop (TransactionInterceptor) 实现 使用spring声明式事务注意事项 同一个bean中的方法调用必须重新声明一个bean调用、否则后续方法调用的事务默认使用第一个第二个不生效 package com.cloud.person.service.impl;import com.cloud.person.dao.S1Mapper; import…

【Linux】详细分析/dev/loop的基本知识 | 空间满了的解决方法

目录 前言1. 基本知识2. 内存满了2.1 清空2.2 扩增 3. 彩蛋 前言 服务器一直down机,翻找日志文件一直找不到缘由,最终发现是挂载的内存满了,那本身这个文件就什么用呢? 1. 基本知识 /dev/loop是一种特殊的设备文件,…

Linux环境开发工具之gcc/g++

前言 我们前面介绍了yum和vim,可以在Linux上安装和卸载软件了也可以在vim上写C/C代码了!但代码写完后如何编译呢?这就是我们今天来介绍gcc和g! 本期内容介绍 gcc和g 程序的翻译过程 动静态库的链接 一、gcc和g 1.1什么是gcc和g…

mysql-->highgo迁移

1、迁移工具免安装,解压双击迁移工具,会进入如下界面:migration.rar 2、新建组–>创建新的服务 3、在创建好的服务下,新建数据库连接,建立源表和目标表 4、这一步是获取源库(Mysql数据库)与目标库(瀚高数据库&…

Web开发基本流程

Web是全球广域网,能够通过浏览器访问的网站。我们要访问网站,首先要在浏览器输入对应的域名。 浏览器也是一个程序,京东的网站也是一个程序,在京东那边电脑运行着,我们只是通过浏览器远程访问。京东的程序由三个部分组…

Thread类中start方法和run方法的源码简单解读,联系和区别

我们可以打开idea,按住ctrl将光标移至所查方法上,单击右键,即可查看这两个方法的源码: 1. start方法源码 我们从上至下分析一下: 这个threadStatus是一个int型的变量来表示线程是否开始,0为没有开始,非0为开始,因此当threadStatus不为0时,会抛出非法开始线程的异常. group对象…

VMware扩容硬盘

最近研究Oracle的备份导入导出功能,但是因为磁盘容量不够导致表空间的扩容没办法,从而没办法导入数据库的dmp文件。得想办法先扩容磁盘容量。话不多说上截图操作。 操作环境:VMware10 , Centos 6.9 VMware扩容硬盘步骤 一、关闭虚拟机&…

爬虫(Web Crawler)介绍与应用

## 摘要 本文将介绍什么是爬虫(Web Crawler)以及其在信息抓取、数据分析等领域的应用。我们将深入探讨爬虫的工作原理、设计特点以及开发过程中需要考虑的关键问题。 ## 一、什么是爬虫 爬虫是一种自动化程序或脚本,用于从互联网上抓取信息…

C++中的凸包:convexHull使用手册【c++重要方法】

最近工作中,用到了凸包,查了一些资料,差不多搞明白了,在这里做一个总结,希望可以帮助到你! 什么时候需要它? 如果你想要把一群散落的点,包裹起来。而且希望这个包裹尽可能地紧凑&a…

【c++】类和对象(四)深入了解拷贝构造函数

🔥个人主页:Quitecoder 🔥专栏:c笔记仓 朋友们大家好啊,本篇内容带大家深入了解拷贝构造函数 目录 1.拷贝构造函数1.1传值调用的无限调用1.2浅拷贝1.3深拷贝1.4深拷贝的实现 1.拷贝构造函数 拷贝构造函数是一种特殊的…

Linux/Pandora

Pandora Enumeration nmap 第一次扫描发现系统对外开放了22和80端口,端口详细信息如下 访问80端口,显示PLAY是Panda.htb的扩展,将网络监控解决方案带到家门口 尝试添加Panda.htb到/etc/hosts中,访问得到的页面却是一样的&#x…