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

news2024/12/23 0:20:12

【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 去勾收权

在这里插入图片描述


本文完

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【氮化镓】p-GaN栅极退化的温度和结构相关性

论文总结: 本文献深入研究了带有p-GaN栅极的正常关断型(normally-off)高电子迁移率晶体管(GaN-HEMTs)在恒定电压应力下的时序退化行为。通过直流特性分析和温度依赖性分析,研究了故障时间(TTF)与应力温度和器件几何结构的依赖性。结果显示,p…

4毛5起的国产32位单片机 PY32F002A系列,多种封装可以选择

PY32F002A系列单片机可以说是现在市面上非常火的一款32位单片机了,超低的价格,不错的性能,让很多开发者都选择了它。主频最大24M,有着20Kbytes flash 和 3Kbytes SRAM,很多小产品也是足够用了。PY32F002A的SOP8封装的价…

SQLite中的动态内存分配(五)

返回:SQLite—系列文章目录 上一篇:SQLite中的原子提交(四) 下一篇:SQLite使用的临时文件(二) ​概述 SQLite使用动态内存分配来获得 用于存储各种对象的内存 (例如&#xff1a…

Nacos的搭建和使用——SpringCloud Alibaba

1. 概要说明 在使用Nacos之前,请在你的虚拟机中下载好Nacos,再进行连接本机使用 port:8848 本机访问地址:http://{虚拟机ip}:8848/nacos/ 访问账号密码:nacos/nacos 2. Nacos的作用 2.1 服务发现中心 微服务将自身注册至Nacos&am…

uniapp怎么使用接口返回的iconfont图标

uniapp怎么使用接口返回的iconfont图标 首先在你的项目中添加该图标&#xff0c;名称要对应 实际应用 item.ICONFONT_NAME“tools”; item.ICONFONT_COLOR“FA5151”; <view class"iconfont" :class"icon-item.ICONFONT_NAME" :color"item.ICON…

浅谈电商网络爬虫技术

摘 要 目前网络上存在着海量的数据资料&#xff0c;将这些数据爬取保存下来&#xff0c;并进行进一步操作&#xff0c;即可挖掘出数据的潜在价值。如今的互联网存在的缺陷是用户很难获得有用的数据资料&#xff0c;虽然传统的搜索引擎可以为用户返回大量信息&#xff0c;但是…

MySQL数据库(MySQL主从搭建|Django中实现MySQL读写分离|Django中使用MySQL连接池)

文章目录 一、MySQL主从搭建1.MySQL主从的目的&#xff1f;2.MySQL主从原理3.搭建步骤 二、Django中实现MySQL读写分离1.使用sqlite实现读写分离2.MySQL实现读写分离 三、Django中使用连接池1.使用池的目的2.Django中使用MySQL连接池 一、MySQL主从搭建 1.MySQL主从的目的&…

【vue3学习笔记(一)】vue3简介;使用vue-cli创建工程;使用vite创建工程;分析工程结构;安装开发者工具

尚硅谷Vue2.0Vue3.0全套教程丨vuejs从入门到精通 对应课程136-140节 课程 P136节 《vue3简介》笔记 课程 P137节 《使用vue-cli创建工程》笔记 官方文档&#xff1a; https://cli.vuejs.org/zh/guide/creating-a-project.html#vue-create官方文档地址 查看vue-cli版本&#x…

zotero+word优化管理参考文献

写论文&#xff0c;整理参考文献&#xff0c;管理参考文献很麻烦&#xff0c;参考文献格式罗列很麻烦&#xff0c;论文需要修改时&#xff0c;重新调整参考文献顺序很麻烦。 zoteroword可以很好的帮助解决这个问题。 Step1 zotero软件安装 默认word你已经安装好了 step2 安…

HWOD:九键输入法的转换

一、知识点 A的ASCII码是65&#xff0c;Z的ASCII码是90 a的ASCII码是97&#xff0c;z的ASCII码是122 从z到a的反循环&#xff0c;用26求余数 二、题目 1、描述 九键手机键盘上的数字与字母的对应&#xff1a; 1--1&#xff0c; abc--2, def--3, ghi--4, jkl--5, mno--6, …

ubuntu 中安装docker

1 资源地址 进入ubuntu官网下载Ubuntu23.04的版本的镜像 2 安装ubuntu 这里选择再Vmware上安装Ubuntu23.04.6 创建一个虚拟机&#xff0c;下一步下一步 注意虚拟机配置网络桥接&#xff0c;CD/DVD选择本地的镜像地址 开启此虚拟机&#xff0c;下一步下一步等待镜像安装。 3…

自动化面试常见算法题!

1、实现一个数字的反转&#xff0c;比如输入12345&#xff0c;输出54321 num 12345 num_str str(num) reversed_num_str num_str[::-1] reversed_num int(reversed_num_str) print(reversed_num) # 输出 54321代码解析&#xff1a;首先将输入的数字转换为字符串&#xff…

Tensorflow2.0笔记 - 使用compile,fit,evaluate,predict简化流程

本笔记主要用compile, fit, evalutate和predict来简化整体代码&#xff0c;使用这些高层API可以减少很多重复代码。具体内容请自行百度&#xff0c;本笔记基于FashionMnist的训练笔记&#xff0c;原始笔记如下&#xff1a; Tensorflow2.0笔记 - FashionMnist数据集训练-CSDN博…

六、保持长期高效的七个法则(二)Rules for Staying Productive Long-Term(2)

Rule #5 - If your work changes, your system should too. 准则五&#xff1a;如果你的工作变了&#xff0c;你的系统也应该改变。 For some, work will be consistent enough to not need major changes.You simply stick to the same system and you’ll get the results y…

PL/SQL概述

oracle从入门到总裁:​​​​​​https://blog.csdn.net/weixin_67859959/article/details/135209645 PL/SQL概述 PL/SQL(Procedural Language extension to SQL)是 Oracle 对标准 SQL语言的扩充&#xff0c;是专门用于各种环境下对 Oracle 数据库进行访问和开发的语言。 由…

HWOD:对n个字符串按照字典序排序

一、知识点 1、pow函数 引用头文件math.h 求x的y次方 2、链接数学库 math.h头文件对应的库名称是libm sudo find / -name libm.so -print ls /usr/lib/x86_64-linux-gnu/ 链接命令&#xff1a;gcc xxx.c -L. -lm 3、52进制 A的ASCII码是65&#xff0c;Z的ASCII…

Ubuntu 配置 kubernetes 学习环境,让外部访问 dashboard

Ubuntu 配置 kubernetes 学习环境 一、安装 1. minikube 首先下载一下 minikube&#xff0c;这是一个单机版的 k8s&#xff0c;只需要有容器环境就可以轻松启动和学习 k8s。 首先你需要有Docker、QEMU、Hyperkit等其中之一的容器环境&#xff0c;以下使用 docker 进行。 对…

OpenCV模块熟悉:点云处理相关

1. 显示--VIZ 曾经基于PCL 做过不少点云相关的开发&#xff0c;采样VTK进行有点云显示。后来基于OpenCV做了不少三维重建工作&#xff0c;总是将点云保存下来&#xff0c;然后借助CloudCompare等查看结果。如果能够将VIZ编译进来&#xff0c;预计会提升开发速度。 …

aws 入门篇 02.区域和可用区

aws入门篇 02.Region和AZ 02.区域和可用区 区域&#xff08;Region&#xff09;&#xff1a;us-east-1&#xff1a;美东1区可用区&#xff08;Availability Zones&#xff09; AWS的区域遍布世界各地 一个区域&#xff08;Region&#xff09;是由多个可用区&#xff08;AZ&am…

从根本上优雅地解决 VSCode 中的 Python 模块导入问题

整体概述&#xff1a; 在我尝试运行 test_deal_file.py 时&#xff0c;我遇到了一个 ModuleNotFoundError 错误&#xff0c;Python告诉我找不到名为 controllers 的模块。这意味着我无法从 deal_file.py 中导入 read_excel 函数。 为了解决这个问题&#xff0c;我尝试了几种方法…