当前位置: 首页 > news >正文

企业权限管理(十)-用户详情

用户详情

UserController

findById方法

 

@Controller
@RequestMapping("/user")
public class UserController {@Autowiredprivate IUserService userService;//查询指定id的用户@RequestMapping("/findById.do")public ModelAndView findById(String id) throws Exception{ModelAndView mv = new ModelAndView();UserInfo userInfo = userService.findById(id);mv.addObject("user",userInfo);mv.setViewName("user-show1");System.out.println(userInfo.getUsername());return mv;}@RequestMapping("/findAll.do")public ModelAndView findAll()throws Exception{ModelAndView mv = new ModelAndView();List<UserInfo> userList=userService.findAll();mv.addObject("userList",userList);mv.setViewName("user-list");return mv;}@RequestMapping("/save.do")@PreAuthorize("authentication.principal.username == 'tom'")public String save(UserInfo userInfo) throws Exception{userService.save(userInfo);return "redirect:findAll.do";}}

UserServiceImpl

@Overridepublic UserInfo findById(String id) throws Exception {return userDao.findById(id);}

IUserDao

   @Select("select * from users where id=#{id}")@Results({@Result(id = true, property = "id", column = "id"),@Result(property = "username", column = "username"),@Result(property = "email", column = "email"),@Result(property = "password", column = "password"),@Result(property = "phoneNum", column = "phoneNum"),@Result(property = "status", column = "status"),@Result(property = "roles",column = "id",javaType = java.util.List.class,many = @Many(select = "com.itheima.ssm.dao.IRoleDao.findRoleByUserId"))})UserInfo findById(String id) throws Exception;

IRoleDao

    //根据用户id查询出所有对应的角色@Select("select * from role where id in (select roleId from users_role where userId=#{userId})")@Results({@Result(id = true, property = "id", column = "id"),@Result(property = "roleName", column = "roleName"),@Result(property = "roleDesc", column = "roleDesc"),@Result(property = "permissions",column = "id",javaType = java.util.List.class,many = @Many(select = "com.itheima.ssm.dao.IPermissionDao.findPermissionByRoleId"))})public List<Role> findRoleByUserId(String userId) throws Exception;

IPermissionDao

    @Select("select * from permission where id in (select permissionId from role_permission where roleId=#{id} )")public List<Permission> findPermissionByRoleId(String id) throws Exception;

user-show.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html><head><!-- 页面meta --><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>数据 - AdminLTE2定制版</title><meta name="description" content="AdminLTE2定制版"><meta name="keywords" content="AdminLTE2定制版"><!-- Tell the browser to be responsive to screen width --><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"><!-- Bootstrap 3.3.6 --><!-- Font Awesome --><!-- Ionicons --><!-- iCheck --><!-- Morris chart --><!-- jvectormap --><!-- Date Picker --><!-- Daterange picker --><!-- Bootstrap time Picker --><!--<link rel="stylesheet" href="${pageContext.request.contextPath}/${pageContext.request.contextPath}/${pageContext.request.contextPath}/plugins/timepicker/bootstrap-timepicker.min.css">--><!-- bootstrap wysihtml5 - text editor --><!--数据表格--><!-- 表格树 --><!-- select2 --><!-- Bootstrap Color Picker --><!-- bootstrap wysihtml5 - text editor --><!--bootstrap-markdown--><!-- Theme style --><!-- AdminLTE Skins. Choose a skin from the css/skinsfolder instead of downloading all of them to reduce the load. --><!-- Ion Slider --><!-- ion slider Nice --><!-- bootstrap slider --><!-- bootstrap-datetimepicker --><!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 9]><script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script><script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--><!-- jQuery 2.2.3 --><!-- jQuery UI 1.11.4 --><!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --><!-- Bootstrap 3.3.6 --><!-- Morris.js charts --><!-- Sparkline --><!-- jvectormap --><!-- jQuery Knob Chart --><!-- daterangepicker --><!-- datepicker --><!-- Bootstrap WYSIHTML5 --><!-- Slimscroll --><!-- FastClick --><!-- iCheck --><!-- AdminLTE App --><!-- 表格树 --><!-- select2 --><!-- bootstrap color picker --><!-- bootstrap time picker --><!--<script src="${pageContext.request.contextPath}/${pageContext.request.contextPath}/${pageContext.request.contextPath}/plugins/timepicker/bootstrap-timepicker.min.js"></script>--><!-- Bootstrap WYSIHTML5 --><!--bootstrap-markdown--><!-- CK Editor --><!-- InputMask --><!-- DataTables --><!-- ChartJS 1.0.1 --><!-- FLOT CHARTS --><!-- FLOT RESIZE PLUGIN - allows the chart to redraw when the window is resized --><!-- FLOT PIE PLUGIN - also used to draw donut charts --><!-- FLOT CATEGORIES PLUGIN - Used to draw bar charts --><!-- jQuery Knob --><!-- Sparkline --><!-- Morris.js charts --><!-- Ion Slider --><!-- Bootstrap slider --><!-- bootstrap-datetimepicker --><!-- 页面meta /--><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrap.min.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/font-awesome/css/font-awesome.min.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionicons/css/ionicons.min.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/iCheck/square/blue.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/morris/morris.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-1.2.2.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/datepicker/datepicker3.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.css"><link rel="stylesheet"href="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/datatables/dataTables.bootstrap.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.css"><link rel="stylesheet"href="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.theme.default.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/select2/select2.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/colorpicker/bootstrap-colorpicker.min.css"><link rel="stylesheet"href="${pageContext.request.contextPath}/plugins/bootstrap-markdown/css/bootstrap-markdown.min.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/adminLTE/css/AdminLTE.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/adminLTE/css/skins/_all-skins.min.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.skinNice.css"><link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/bootstrap-slider/slider.css"><link rel="stylesheet"href="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.css">
</head><body class="hold-transition skin-purple sidebar-mini"><div class="wrapper"><!-- 页面头部 --><jsp:include page="header.jsp"></jsp:include><!-- 页面头部 /--><!-- 导航侧栏 --><jsp:include page="aside.jsp"></jsp:include><!-- 导航侧栏 /--><!-- 内容区域 --><!-- @@master = admin-layout.html--><!-- @@block = content --><div class="content-wrapper"><!-- 内容头部 --><section class="content-header"><h1>用户管理<small>用户详情</small></h1><ol class="breadcrumb"><li><a href="${pageContext.request.contextPath}/index.jsp"><i class="fa fa-dashboard"></i> 首页</a></li><li><a href="${pageContext.request.contextPath}/user/findAll.do">用户管理</a></li><li class="active">用户详情</li></ol></section><!-- 内容头部 /--><!-- 正文区域 --><section class="content"><div class="box-body"><!--树表格--><div class="tab-pane" id="tab-treetable"><table id="collapse-table" class="table table-bordered table-hover dataTable"><thead><tr><th>用户</th><th>描述</th></tr></thead><tr data-tt-id="0"><td colspan="2">${user.username}</td></tr><tbody><c:forEach items="${user.roles}" var="role" varStatus="vs"><tr data-tt-id="${vs.index+1}" data-tt-parent-id="0"><td>${role.roleName}</td><td>${role.roleDesc}</td></tr><c:forEach items="${role.permissions}" var="p"><tr data-tt-id="1-1" data-tt-parent-id="${vs.index+1}"><td>${p.permissionName}</td><td>${p.url}</td></tr></c:forEach></c:forEach></tbody></table></div><!--树表格/--></div></section><!-- 正文区域 /--></div><!-- @@close --><!-- 内容区域 /--><!-- 底部导航 --><footer class="main-footer"><div class="pull-right hidden-xs"><b>Version</b> 1.0.8</div><strong>Copyright &copy; 2014-2017 <a href="http://www.itcast.cn">研究院研发部</a>.</strong> All rights reserved.</footer><!-- 底部导航 /--></div><script src="${pageContext.request.contextPath}/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/jQueryUI/jquery-ui.min.js"></script>
<script>$.widget.bridge('uibutton', $.ui.button);
</script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/raphael/raphael-min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/morris/morris.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="${pageContext.request.contextPath}/plugins/knob/jquery.knob.js"></script>
<script src="${pageContext.request.contextPath}/plugins/daterangepicker/moment.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.js"></script>
<script src="${pageContext.request.contextPath}/plugins/daterangepicker/daterangepicker.zh-CN.js"></script>
<script src="${pageContext.request.contextPath}/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="${pageContext.request.contextPath}/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/fastclick/fastclick.js"></script>
<script src="${pageContext.request.contextPath}/plugins/iCheck/icheck.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/adminLTE/js/app.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/treeTable/jquery.treetable.js"></script>
<script src="${pageContext.request.contextPath}/plugins/select2/select2.full.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.zh-CN.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/bootstrap-markdown.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/locale/bootstrap-markdown.zh.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/markdown.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-markdown/js/to-markdown.js"></script>
<script src="${pageContext.request.contextPath}/plugins/ckeditor/ckeditor.js"></script>
<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.js"></script>
<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="${pageContext.request.contextPath}/plugins/input-mask/jquery.inputmask.extensions.js"></script>
<script src="${pageContext.request.contextPath}/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/chartjs/Chart.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.resize.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.pie.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/flot/jquery.flot.categories.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/ionslider/ion.rangeSlider.min.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-slider/bootstrap-slider.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.js"></script>
<script src="${pageContext.request.contextPath}/plugins/bootstrap-datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script>$(document).ready(function () {// 选择框$(".select2").select2();// WYSIHTML5编辑器$(".textarea").wysihtml5({locale: 'zh-CN'});});// 设置激活菜单function setSidebarActive(tagUri) {var liObj = $("#" + tagUri);if (liObj.length > 0) {liObj.parent().parent().addClass("active");liObj.addClass("active");}}$(document).ready(function () {// 颜色选取器$(".my-colorpicker1").colorpicker();$(".my-colorpicker2").colorpicker();});$(document).ready(function () {// 选择框$(".select2").select2();});$(document).ready(function () {//Date picker$('#datepicker').datepicker({autoclose: true,language: 'zh-CN'});// datetime picker$('#dateTimePicker').datetimepicker({format: "mm/dd/yyyy - hh:ii",autoclose: true,todayBtn: true,language: 'zh-CN'});//Date range picker$('#reservation').daterangepicker({locale: {applyLabel: '确认',cancelLabel: '取消',fromLabel: '起始时间',toLabel: '结束时间',customRangeLabel: '自定义',firstDay: 1},opens: 'left', // 日期选择框的弹出位置separator: ' 至 '//showWeekNumbers : true,     // 是否显示第几周});//Date range picker with time picker$('#reservationtime').daterangepicker({timePicker: true,timePickerIncrement: 30,format: 'MM/DD/YYYY h:mm A',locale: {applyLabel: '确认',cancelLabel: '取消',fromLabel: '起始时间',toLabel: '结束时间',customRangeLabel: '自定义',firstDay: 1},opens: 'right', // 日期选择框的弹出位置separator: ' 至 '});//Date range as a button$('#daterange-btn').daterangepicker({locale: {applyLabel: '确认',cancelLabel: '取消',fromLabel: '起始时间',toLabel: '结束时间',customRangeLabel: '自定义',firstDay: 1},opens: 'right', // 日期选择框的弹出位置separator: ' 至 ',ranges: {'今日': [moment(), moment()],'昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],'最近7日': [moment().subtract(6, 'days'), moment()],'最近30日': [moment().subtract(29, 'days'), moment()],'本月': [moment().startOf('month'), moment().endOf('month')],'上个月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]},startDate: moment().subtract(29, 'days'),endDate: moment()},function (start, end) {$('#daterange-btn span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));});});$(document).ready(function () {/*table tree*/$("#collapse-table").treetable({expandable: true});});$(document).ready(function () {CKEDITOR.replace('editor1');// $(".textarea").wysihtml5({//     locale:'zh-CN'// });$("#markdown-textarea").markdown({language: 'zh',autofocus: false,savable: false});});$(document).ready(function () {// 激活导航位置setSidebarActive("admin-dataform");});
</script>
</body></html>

相关文章:

企业权限管理(十)-用户详情

用户详情 UserController findById方法 Controller RequestMapping("/user") public class UserController {Autowiredprivate IUserService userService;//查询指定id的用户RequestMapping("/findById.do")public ModelAndView findById(String id) thro…...

Windows 11 家庭中文版找不到组策略文件gpedit.msc

最近因为调整日期问题需要用到组策略文件gpedit.msc,但是发现找不到文件 在按键盘 winR 打开运行界面输入 gpedit.msc 回车 Windows找不到文件’gpedit.msc’。请确定文件名是否正确后&#xff0c;再试-次。 检查电脑Windows系统版本 是 Windows 11 家庭中文版 果断早网上搜…...

vue3项目中structuredClone报错

报错&#xff1a;Failed to execute structuredClone on Window: #<Object> could not be cloned 代码&#xff1a; const formData ref({"content": "", // string"id": "", // string"title": "", // …...

Android漏洞之战——整体加壳原理和脱壳技巧详解

一、前言 为了帮助更加方便的进行漏洞挖掘工作&#xff0c;前面我们通过了几篇文章详解的给大家介绍了动态调试技术、过反调试技术、Hook技术、过反Hook技术、抓包技术等&#xff0c;掌握了这些可以很方便的开展App漏洞挖掘工作&#xff0c;而最后我们还需要掌握一定的脱壳技巧…...

网络

mcq Java 传输层&#xff1a;拆分和组装&#xff0c;完成端到端的消息传递&#xff0c;流量控制&#xff0c;差错控制等 网络层&#xff1a; 寻址、路由&#xff0c;复用&#xff0c;拥塞控制&#xff0c;完成源到宿的传递。 显然A选项是错误的&#xff0c;有流量控制的是传输层…...

一直往下get的map

一直往下get的map 文档&#xff1a;一直往下get的map.note 链接&#xff1a;http://note.youdao.com/noteshare?id7b6d315d86ce9e5f8d7cac9be8e924b8&sub95F9FFDA8EB447BBA506286E261F4C88 添加链接描述 package com.example.demo.entity;import org.bson.Document; impo…...

Azure如何调整虚拟机的大小

参考 https://blog.csdn.net/m0_48468018/article/details/132267096 创建虚拟机进入资源&#xff0c;点击大小选项&#xff0c;并对大小进行调整 点击如下图的cloud shell,进入Azure CLI,使用az vm resize 进行大小调整 命令中的g对应资源组&#xff0c;n对应虚拟机名称&am…...

stm32F103R6实现流水灯参考源代码

#include "main.h" #include "gpio.h" void SystemClock_Config(void); void sleep(int a) {int i0,j0;for(i0;i<a;i){for(j0;j<2000;j);}} 真正发挥效果的是这个main函数// int main(void) {int i0;HAL_Init();SystemClock_Config();MX_GPIO_Init()…...

blender 发射体粒子

发射体粒子的基础设置 选择需要添加粒子的物体&#xff0c;点击右侧粒子属性&#xff0c;在属性面板中&#xff0c;点击加号&#xff0c;物体表面会出现很多小点点&#xff0c;点击空格键&#xff0c;粒子会自动运动&#xff0c;像下雨一样&#xff1b; bender 粒子系统分为两…...

你真的掌握了 Python 的七种参数了吗?

不知道为什么网上总有人说 Python 的参数类型有 4 种啊&#xff0c;5 种啊&#xff0c;殊不知其实有 7 种。Python 的 7 种参数分别是 默认参数、位置参数、关键字参数、可变长位置参数、可变长关键字参数、仅位置参数 和 仅关键字参数。小白可能没见过“可变长参数”&#xff…...

人大进仓数据库ksql命令基础

测试环境信息: 系统为银河麒麟V10 数据库为Kingbase ES V8 数据库安装目录为/opt/Kingbase/ES/V8 ksql命令位于/opt/Kingbase/ES/V8/Server/bin下 使用--help获取帮助 续上图 1.查看数据库列表 ./ksql -U system -l 2.查看数据库版本 ./ksql -V 3.连接指定的数据库tes…...

网站上的网页,无法通过百度和bing搜索引擎来搜索

最近搜索某公司网站上的技术资料&#xff0c;百度/bing都不能工作&#xff0c;纳闷 看了下该网站的robots.txt 明白了 User-Agent: * Disallow: / 参考&#xff1a; 网站 robots.txt 文件配置方法&#xff0c;如何禁止搜索引擎收录指定网页内容 - 知乎...

Redis与MySQL的比较:什么情况下使用Redis更合适?什么情况下使用MySQL更合适?

Redis和MySQL是两种不同类型的数据库&#xff0c;各有自己的特点和适用场景。下面是Redis和MySQL的比较以及它们适合使用的情况&#xff1a; Redis适合的场景&#xff1a; 高性能读写&#xff1a;Redis是基于内存的快速Key-Value存储&#xff0c;读写性能非常高。它适用于需要…...

34_windows环境debug Nginx 源码-配置WSL和CLion

文章目录 WSL 中安装 编译构建使用的相关软件重装默认的 ssh创建 libstdc++.so 软链接34_windows环境debug Nginx 源码-配置WSL和CLionWSL 中安装 编译构建使用的相关软件 sudo apt-get update sudo apt-get install libstdc++6 dpkg -L libstdc++6sudo apt-get install libpc…...

单词倒排(C语言详解)

题目&#xff1a;单词倒排 描述&#xff1a;对字符串中的所有单词进行倒排。 说明&#xff1a; 1、构成单词的字符只有26个大写或小写英文字母&#xff1b; 2、非构成单词的字符均视为单词间隔符&#xff1b; 3、要求倒排后的单词间隔符以一个空格表示&#xff1b;如果原字…...

一、数学建模之线性规划篇

1.定义 2.例题 3.使用软件及解题 一、定义 1.线性规划&#xff08;Linear Programming&#xff0c;简称LP&#xff09;是一种数学优化技术&#xff0c;线性规划作为运筹学的一个重要分支&#xff0c;专门研究在给定一组线性约束条件下&#xff0c;如何找到一个最优的决策&…...

【推荐】深入浅出学习Spring框架【中】

目录 1.AOP是什么? 2.案列&#xff1a; 3.spring的aop的专业术语 4.代码模拟 4.1 前置通知 3.2.后置通知 3.3.环绕通知 3.4.异常通知 3.5.过滤通知 1.AOP是什么? 面向切面编程&#xff08;Aspect-Oriented Programming&#xff09;是一种编程范式&#xff0c;它的主要…...

使用 HTML、CSS 和 JavaScript 创建多步骤表单

使用 HTML、CSS 和 JavaScript 创建多步骤表单 为了处理又长又复杂的表单&#xff0c;我们需要将它们分成多个步骤。通过一次只在屏幕上显示一些输入&#xff0c;表单会感觉更容易理解&#xff0c;并防止用户感到被大量的表单字段淹没。 在本文中&#xff0c;我将逐步指导如何…...

C语言笔试训练【第九天】

文章目录 &#x1f47f;1、下列程序的输出是&#xff08; &#xff09;&#x1f48e;2、二维数组X按行顺序存储&#xff0c;其中每个元素占1个存储单元。若 X[4][4] 的存储地址为 Oxf8b82140 , X[9][9] 的存储地址为 Oxf8b8221c ,则 X[7][7] 的存储地址为&#xff08; &#xf…...

左邻右舍裂差法求和 以及 连续自然数的立方和公式

左邻右舍裂差法求和 1 2 2 3 3 4 4 5 . . . n ( n 1 ) ? 1\times22\times33\times44\times5...n\times(n1)? 12233445...n(n1)? 看成数列 a n n 2 n , ( n ∈ N ) a_nn^2n, (n\in N^) an​n2n,(n∈N) 的前 n n n 项和 S n S_n Sn​. 原理&#xff1a;将…...

ES6从入门到精通:前言

ES6简介 ES6&#xff08;ECMAScript 2015&#xff09;是JavaScript语言的重大更新&#xff0c;引入了许多新特性&#xff0c;包括语法糖、新数据类型、模块化支持等&#xff0c;显著提升了开发效率和代码可维护性。 核心知识点概览 变量声明 let 和 const 取代 var&#xf…...

React Native 导航系统实战(React Navigation)

导航系统实战&#xff08;React Navigation&#xff09; React Navigation 是 React Native 应用中最常用的导航库之一&#xff0c;它提供了多种导航模式&#xff0c;如堆栈导航&#xff08;Stack Navigator&#xff09;、标签导航&#xff08;Tab Navigator&#xff09;和抽屉…...

SciencePlots——绘制论文中的图片

文章目录 安装一、风格二、1 资源 安装 # 安装最新版 pip install githttps://github.com/garrettj403/SciencePlots.git# 安装稳定版 pip install SciencePlots一、风格 简单好用的深度学习论文绘图专用工具包–Science Plot 二、 1 资源 论文绘图神器来了&#xff1a;一行…...

Swift 协议扩展精进之路:解决 CoreData 托管实体子类的类型不匹配问题(下)

概述 在 Swift 开发语言中&#xff0c;各位秃头小码农们可以充分利用语法本身所带来的便利去劈荆斩棘。我们还可以恣意利用泛型、协议关联类型和协议扩展来进一步简化和优化我们复杂的代码需求。 不过&#xff0c;在涉及到多个子类派生于基类进行多态模拟的场景下&#xff0c;…...

(二)TensorRT-LLM | 模型导出(v0.20.0rc3)

0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述&#xff0c;后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作&#xff0c;其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...

visual studio 2022更改主题为深色

visual studio 2022更改主题为深色 点击visual studio 上方的 工具-> 选项 在选项窗口中&#xff0c;选择 环境 -> 常规 &#xff0c;将其中的颜色主题改成深色 点击确定&#xff0c;更改完成...

【快手拥抱开源】通过快手团队开源的 KwaiCoder-AutoThink-preview 解锁大语言模型的潜力

引言&#xff1a; 在人工智能快速发展的浪潮中&#xff0c;快手Kwaipilot团队推出的 KwaiCoder-AutoThink-preview 具有里程碑意义——这是首个公开的AutoThink大语言模型&#xff08;LLM&#xff09;。该模型代表着该领域的重大突破&#xff0c;通过独特方式融合思考与非思考…...

2021-03-15 iview一些问题

1.iview 在使用tree组件时&#xff0c;发现没有set类的方法&#xff0c;只有get&#xff0c;那么要改变tree值&#xff0c;只能遍历treeData&#xff0c;递归修改treeData的checked&#xff0c;发现无法更改&#xff0c;原因在于check模式下&#xff0c;子元素的勾选状态跟父节…...

【服务器压力测试】本地PC电脑作为服务器运行时出现卡顿和资源紧张(Windows/Linux)

要让本地PC电脑作为服务器运行时出现卡顿和资源紧张的情况&#xff0c;可以通过以下几种方式模拟或触发&#xff1a; 1. 增加CPU负载 运行大量计算密集型任务&#xff0c;例如&#xff1a; 使用多线程循环执行复杂计算&#xff08;如数学运算、加密解密等&#xff09;。运行图…...

python报错No module named ‘tensorflow.keras‘

是由于不同版本的tensorflow下的keras所在的路径不同&#xff0c;结合所安装的tensorflow的目录结构修改from语句即可。 原语句&#xff1a; from tensorflow.keras.layers import Conv1D, MaxPooling1D, LSTM, Dense 修改后&#xff1a; from tensorflow.python.keras.lay…...