使用Jquery+EasyUI 进行框架项目开发案例讲解之五
模块(菜单)管理源码分享
在上四篇文章
《使用Jquery+EasyUI进行框架项目开发案例讲解之一---员工管理源码分享》
《使用Jquery+EasyUI 进行框架项目开发案例讲解之二---用户管理源码分享》
《使用Jquery+EasyUI 进行框架项目开发案例讲解之三---角色管理源码分享》
《使用Jquery+EasyUI 进行框架项目开发案例讲解之三---组织机构源码分享》
我们分享了使用Jquery EasyUI来进行ASP.NET项目的开发的相关方法,每一个模块都有其共用性,细细理解与掌握,我相信使用EasyUI进行开发还是相当方便的,每篇文章,我们力求通俗易懂。
接下来我分享“模块(菜单)”模块主要的核心代码,“模块(菜单)”管理模块同样使用了EasyUI的TreeGrid控件,对于EasyUI的TreeGrid控件的具体使用方法可以参见上一篇《使用Jquery+EasyUI 进行框架项目开发案例讲解之三---组织机构源码分享》的说明,或看相关的Easy UI的帮助文件,同时,我们可以看一下如何做模块图标的选择界面,模块(菜单)主界面如下图所示:
一、“模块(菜单)”管理主界面UI的ASPX代码如下:
<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ModuleAdmin.aspx.cs" Inherits="RDIFramework.WebApp.Modules.ModuleAdmin" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div id="toolbar"> <%=base.BuildToolBarButtons()%> </div> <table id="navGrid"></table> <script type="text/javascript" src="../Scripts/Linqjs/linq.min.js"></script> <script type="text/javascript" src="../Scripts/Linqjs/linq.jquery.js"></script> <script type="text/javascript" src="../Scripts/Business/ModuleAdmin.js?v=5"></script> </asp:Content>
二:绑定当前登录用户所拥有的功能按钮列表代码如下:
private bool permissionUserModulePermission = false; private bool permissionRoleModulePermission = false; private bool permissionOrganizeModulePermission = false; private bool permissionModuleConfig = false; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { this.GetPermission(); } } /// <summary> /// 获得页面的权限 /// </summary> private void GetPermission() { this.permissionAdd = this.IsAuthorized("ModuleManagement.Add"); this.permissionEdit = this.IsAuthorized("ModuleManagement.Edit"); this.permissionDelete = this.IsAuthorized("ModuleManagement.Delete"); this.permissionExport = this.IsAuthorized("ModuleManagement.Export"); //this.permissionAccredit = this.IsAuthorized("UserManagement.Accredit"); this.permissionUserModulePermission = this.IsAuthorized("ModuleManagement.UserModulePermission"); this.permissionRoleModulePermission = this.IsAuthorized("ModuleManagement.RoleModulePermission"); this.permissionOrganizeModulePermission = this.IsAuthorized("ModuleManagement.OrganizeModulePermission") && SystemInfo.EnableOrganizePermission; this.permissionModuleConfig = this.IsAuthorized("ModuleManagement.ModuleConfig"); } /// <summary> /// 加载工具栏 /// </summary> /// <returns>工具栏HTML</returns> public override string BuildToolBarButtons() { StringBuilder sb = new StringBuilder(); string linkbtn_template = "<a id=\"a_{0}\" class=\"easyui-linkbutton\" style=\"float:left\" plain=\"true\" href=\"javascript:;\" icon=\"{1}\" {2} title=\"{3}\">{4}</a>"; sb.Append("<a id=\"a_refresh\" class=\"easyui-linkbutton\" style=\"float:left\" plain=\"true\" href=\"javascript:;\" icon=\"icon-reload\" title=\"重新加载\">刷新</a> "); sb.Append("<div class='datagrid-btn-separator'></div> "); sb.Append(string.Format(linkbtn_template, "add", "icon-tab_add", permissionAdd ? "" : "disabled=\"True\"", "新增模块(菜单)", "新增")); sb.Append(string.Format(linkbtn_template, "edit", "icon-tab_edit", permissionEdit ? "" : "disabled=\"True\"", "修改选中的模块(菜单)", "修改")); sb.Append(string.Format(linkbtn_template, "delete", "icon-tab_delete", permissionDelete ? "" : "disabled=\"True\"", "删除选中的模块(菜单)", "删除")); sb.Append("<div class='datagrid-btn-separator'></div> "); //sb.Append(string.Format(linkbtn_template, "move", "icon-shape_move_forwards", permissionMove ? "" : "disabled=\"True\"", "移动选中的模块(菜单)", "移动")); sb.Append(string.Format(linkbtn_template, "export", "icon-tab_go", permissionExport ? "" : "disabled=\"True\"", "导出模块(菜单)数据", "导出")); sb.Append("<div class='datagrid-btn-separator'></div> "); sb.Append(string.Format(linkbtn_template, "setusermodulepermission", "icon-user_key", permissionUserModulePermission ? "" : "disabled=\"True\"", "设置用户的模块(菜单)访问权限", "用户模块权限")); sb.Append(string.Format(linkbtn_template, "setrolemodulepermission", "icon-group_key", permissionRoleModulePermission ? "" : "disabled=\"True\"", "设置角色的模块(菜单)访问权限", "角色模块权限")); sb.Append("<div class='datagrid-btn-separator'></div> "); sb.Append(string.Format(linkbtn_template, "moduleconfig", "icon-table_gear", permissionRoleModulePermission ? "" : "disabled=\"True\"", "设置模块的可用性", "模块配置")); return sb.ToString(); }
三、绑定模块主wldmTreeGrid 的JS代码如下:
var grid = { databind: function (winsize) { navgrid = $('#navGrid').treegrid({ toolbar: '#toolbar', title: '模块(菜单)列表', iconCls: 'icon icon-chart_organisation', width: winsize.width, height: winsize.height, nowrap: false, rownumbers: true, //animate: true, resizable: true, collapsible: false, url: actionUrl, idField: 'Id', treeField: 'FullName', frozenColumns: [[ { title: '模块(菜单)名称', field: 'FullName', width: 200 }, { title: '编码', field: 'Code', width: 130 } ]], columns: [[ { title: 'Id', field: 'Id', hidden: true }, { title: 'ParentId', field: 'ParentId', hidden: true }, { title: '模块分类', field: 'Category', width: 100 }, { title: '图标', field: 'IconCss', width: 130, hidden: true }, { title: 'Web链接地址', field: 'NavigateUrl', width: 200 }, { title: 'WinForm程序集', field: 'AssemblyName', width: 150 }, { title: 'WinForm窗体', field: 'FormName', width: 200 }, { title: '公共', field: 'IsPublic', width: 50, align: 'center', formatter: function (v, d, i) { return '<img src="http://images.cnblogs.com/' + (v ? "checkmark.gif" : "checknomark.gif") + '" />'; } }, { title: '有效', field: 'Enabled', width: 50, align: 'center', formatter: imgcheckbox }, { title: 'AllowEdit', field: 'AllowEdit', hidden: true }, { title: 'AllowDelete', field: 'AllowDelete', hidden: true }, { title: '排序', field: 'SortCode', width: 80 }, { title: '备注', field: 'Description', width: 500 } ]] }); }, reload: function () { navgrid.treegrid('reload'); }, selected: function () { return navgrid.treegrid('getSelected'); } }; var imgcheckbox = function (cellvalue, options, rowObject) { return cellvalue ? '<img src="/css/icon/ok.png" alt="正常" title="正常" />' : '<img src="/css/icon/stop.png" alt="禁用" title="禁用" />'; }
四、添加与模块(菜单)主界面
代码如下:
add: function () { if ($(this).linkbutton('options').disabled == true) { return; } var addDialog = top.$.hDialog({ href: formUrl, title: '添加模块(菜单)', iconCls: 'icon-tab_add', width: 490, height: 550, onLoad: function () { crud.bindCtrl(); crud.bindCategory(); var row = grid.selected(); if (row) { top.$('#txt_ParentId').combotree('setValue', row.ParentId); } }, submit: function () { if (top.$('#uiform').validate().form()) { //var param = createParam('add', '0'); var vcategory = top.$('#txt_Category').combobox('getValue'); var vparentid = top.$('#txt_ParentId').combobox('getValue'); var param = 'action=Add&vcategory=' + vcategory + '&vparentid=' + vparentid + '&' + top.$('#uiform').serialize(); $.ajaxjson(actionUrl, param, function (d) { if (d.Success) { msg.ok(d.Message); addDialog.dialog('close'); grid.reload(); } else { MessageOrRedirect(d); } }); } } }); }, edit: function () { if ($(this).linkbutton('options').disabled == true) { return; } var row = grid.selected(); if (row) { var editDailog = top.$.hDialog({ href: formUrl, title: '修改模块(菜单)', iconCls: 'icon-tab_edit', width: 490, height: 550, onLoad: function () { crud.bindCtrl(row.Id); crud.bindCategory(); top.$('#txt_Code').val(row.Code); top.$('#txt_FullName').val(row.FullName); top.$('#txt_Category').combobox('setValue', row.Category); top.$('#txt_ParentId').combotree('setValue', row.ParentId); top.$('#txt_NavigateUrl').val(row.NavigateUrl); top.$('#txt_IconCss').val(row.IconCss); //top.$('#smallIcon').attr('class', "icon " + row.IconCss); top.$('#smallIcon').attr('class', row.IconCss); top.$('#txt_AssemblyName').val(row.AssemblyName); top.$('#txt_FormName').val(row.FormName); top.$('#chk_Enabled').attr('checked', row.Enabled == "1"); top.$('#chk_IsPublic').attr('checked', row.IsPublic == "1"); top.$('#chk_Expand').attr('checked', row.Expand == "1"); top.$('#chk_AllowEdit').attr('checked', row.AllowEdit == "1"); top.$('#chk_AllowDelete').attr('checked', row.AllowDelete == "1"); top.$('#txt_Description').val(row.Description); top.$('#txt_IconUrl').val(row.IconUrl); }, submit: function () { if (top.$('#uiform').validate().form()) { //保存时判断当前节点所选的父节点,不能为当前节点的子节点,这样就乱套了.... var treeParentId = top.$('#txt_ParentId').combotree('tree'); // 得到树对象 var node = treeParentId.tree('getSelected'); if (node) { var nodeParentId = treeParentId.tree('find', row.Id); var children = treeParentId.tree('getChildren', nodeParentId.target); var nodeIds = ''; var isFind = 'false'; for (var index = 0; index < children.length; index++) { if (children[index].id == node.id) { isFind = 'true'; break; } } if (isFind == 'true') { top.$.messager.alert('温馨提示', '请选择父节点元素!', 'warning'); return; } } var vcategory = top.$('#txt_Category').combobox('getValue'); var vparentid = top.$('#txt_ParentId').combobox('getValue'); var query = 'action=Edit&vcategory=' + vcategory + '&vparentid=' + vparentid + '&KeyId=' + row.Id + '&' + top.$('#uiform').serialize(); $.ajaxjson(actionUrl, query, function (d) { if (d.Success) { msg.ok(d.Message); editDailog.dialog('close'); grid.reload(); } else { MessageOrRedirect(d); } }); } } }); } else { msg.warning('请选择要修改菜单!'); return false; } return false; }
在模块(菜单)编辑与新增界面上,我们可以设置模块的图标,设置模块图标如下图所示:
这个是如何实现的呢?
首先准备图标的基页面,截取部分格式如下,保存为一个html文件,如:iconlist.htm:
<ul id="iconlist" style="margin:0px;padding:0px; list-style-type:none;"> <li title="/css/icon/accept.png"><span class="icon icon-accept"></span></li> <li title="/css/icon/add.png"><span class="icon icon-add"></span></li> <li title="/css/icon/advancedsettings.png"><span class="icon icon-advancedsettings"></span></li> <li title="/css/icon/advancedsettings2.png"><span class="icon icon-advancedsettings2"></span></li> <li title="/css/icon/anchor.png"><span class="icon icon-anchor"></span></li> <li title="/css/icon/application.png"><span class="icon icon-application"></span></li> <li title="/css/icon/application_delete.png"><span class="icon icon-application_delete"></span></li> <li title="/css/icon/application_double.png"><span class="icon icon-application_double"></span></li> <li title="/css/icon/application_edit.png"><span class="icon icon-application_edit"></span></li> <li title="/css/icon/application_error.png"><span class="icon icon-application_error"></span></li> <li title="/css/icon/application_form.png"><span class="icon icon-application_form"></span></li> <li title="/css/icon/application_form_add.png"><span class="icon icon-application_form_add"></span></li> <li title="/css/icon/application_form_delete.png"><span class="icon icon-application_form_delete"></span></li> <li title="/css/icon/application_form_edit.png"><span class="icon icon-application_form_edit"></span></li> <li title="/css/icon/application_form_magnify.png"><span class="icon icon-application_form_magnify"></span></li> <li title="/css/icon/application_get.png"><span class="icon icon-application_get"></span></li> <li title="/css/icon/application_go.png"><span class="icon icon-application_go"></span></li> <li title="/css/icon/application_home.png"><span class="icon icon-application_home"></span></li> <li title="/css/icon/application_key.png"><span class="icon icon-application_key"></span></li> <li title="/css/icon/application_lightning.png"><span class="icon icon-application_lightning"></span></li> <ul>
然后在我们的js中调用这个html做相应的处理即可了,js部分代码为:
var showIcon = function () { top.$('#selecticon').click(function () { var iconDialog = top.$.hDialog({ iconCls: 'icon-application_view_icons', href: '/css/iconlist.htm?v=' + Math.random(), title: '选取图标', width: 800, height: 600, showBtns: false, onLoad: function () { top.$('#iconlist li').attr('style', 'float:left;border:1px solid #fff;margin:2px;width:16px;cursor:pointer').click(function () { //var iconCls = top.$(this).find('span').attr('class').replace('icon ', ''); var iconCls = top.$(this).find('span').attr('class'); top.$('#txt_IconCss').val(iconCls); top.$('#txt_IconUrl').val(top.$(this).attr('title')); //top.$('#smallIcon').attr('class', "icon " + iconCls); top.$('#smallIcon').attr('class', iconCls); iconDialog.dialog('close'); }).hover(function () { top.$(this).css({ 'border': '1px solid red' }); }, function () { top.$(this).css({ 'border': '1px solid #fff' }); }); } }); }); };
五、用户模块(菜单)权限批量设置
用户模块(菜单)权限功能项用于设置那些用户可以访问那些模块,那些用户不能访问那些模块。用户模块(菜单)权限设置如下图用户模块(菜单)权限集中设置。左侧列出框架的所有有效用户,右侧为模块(菜单)项,选中相应的模块后保存,即可为当前选中用户授予模块的访问权限。
js代码如下:
userModulePermissionBatchSet: function () { //用户模块(菜单)权限批量设置 if ($(this).linkbutton('options').disabled == true) { return; } var userGrid; var curUserModuleIds = []; //当前所选用户所拥有的模块ID var setDialog = top.$.hDialog({ title: '用户模块(菜单)权限批量设置', width: 670, height: 600, iconCls: 'icon-user_key', //cache: false, href: "Modules/html/PermissionBacthSetForm.htm?n=" + Math.random(), onLoad: function () { using('panel', function () { top.$('#panelTarget').panel({ title: '模块(菜单)', iconCls: 'icon-org', height: $(window).height() - 3 }); }); userGrid = top.$('#leftnav').datagrid({ title: '所有用户', url: 'Modules/handler/UserAdminHandler.ashx', nowrap: false, //折行 //fit: true, rownumbers: true, //行号 striped: true, //隔行变色 idField: 'Id', //主键 singleSelect: true, //单选 frozenColumns: [[]], columns: [[ { title: '登录名', field: 'UserName', width: 120, align: 'left' }, { title: '用户名', field: 'RealName', width: 150, align: 'left' } ]], onLoadSuccess: function (data) { top.$('#rightnav').tree({ cascadeCheck: false, //联动选中节点 checkbox: true, lines: true, url: 'Modules/handler/ModuleAdminHandler.ashx?action=GetModuleTree', onSelect: function (node) { top.$('#rightnav').tree('getChildren', node.target); } }); top.$('#leftnav').datagrid('selectRow', 0); }, onSelect: function (rowIndex, rowData) { curUserModuleIds = []; var query = 'action=GetModuleByUserId&userid=' + rowData.Id; $.ajaxtext('handler/PermissionHandler.ashx', query, function (data) { var moduelTree = top.$('#rightnav'); moduelTree.tree('uncheckedAll'); if (data == '' || data.toString() == '[object XMLDocument]') { return; } curUserModuleIds = data.split(','); for (var i = 0; i < curUserModuleIds.length; i++) { var node = moduelTree.tree('find', curUserModuleIds[i]); if (node) moduelTree.tree("check", node.target); } }); } }); }, submit: function () { var allSelectModuledIds = permissionMgr.getUserSelectedModule().split(','); var grantModuleIds = ''; var revokeModuleIds = ''; var flagRevoke = 0; var flagGrant = 0; while (flagRevoke < curUserModuleIds.length) { if ($.inArray(curUserModuleIds[flagRevoke], allSelectModuledIds) == -1) { revokeModuleIds += curUserModuleIds[flagRevoke] + ','; //得到收回的权限列表 } ++flagRevoke; } while (flagGrant < allSelectModuledIds.length) { if ($.inArray(allSelectModuledIds[flagGrant], curUserModuleIds) == -1) { grantModuleIds += allSelectModuledIds[flagGrant] + ','; //得到授予的权限列表 } ++flagGrant; } var query = 'action=SetUserModulePermission&userid=' + top.$('#leftnav').datagrid('getSelected').Id + '&grantIds=' + grantModuleIds + "&revokeIds=" + revokeModuleIds; $.ajaxjson('handler/PermissionHandler.ashx', query, function (d) { if (d.Data > 0) { msg.ok('设置成功!'); } else { alert(d.Message); } }); } }); }
六、角色模块(菜单)权限批量设置
角色模块(菜单)操作权限用于设置那些角色拥有那些操作(功能)权限,那些角色不拥有那些操作(功能)权限。如下图所示,左侧列出框架的所有有效角色,右侧为相应的模块(菜单),选中相应的模块(菜单)后保存,即可为当前选中角色授予相应的模块(菜单)可访问的控制。
js部分代码如下:
roleModulePermissionBatchSet: function () { //角色模块(菜单)权限批量设置 if ($(this).linkbutton('options').disabled == true) { return; } var roleGrid; var curRoleModuleIds = []; //当前所选角色所拥有的模块ID var setDialog = top.$.hDialog({ title: '角色模块(菜单)权限批量设置', width: 670, height: 600, iconCls: 'icon-group_key', //cache: false, href: "Modules/html/PermissionBacthSetForm.htm?n=" + Math.random(), onLoad: function () { using('panel', function () { top.$('#panelTarget').panel({ title: '模块(菜单)', iconCls: 'icon-org', height: $(window).height() - 3 }); }); roleGrid = top.$('#leftnav').datagrid({ title: '所有角色', url: 'Modules/handler/RoleAdminHandler.ashx?action=getrolelist', nowrap: false, //折行 //fit: true, rownumbers: true, //行号 striped: true, //隔行变色 idField: 'Id', //主键 singleSelect: true, //单选 frozenColumns: [[]], columns: [[ { title: '角色编码', field: 'Code', width: 120, align: 'left' }, { title: '角色名称', field: 'RealName', width: 150, align: 'left' } ]], onLoadSuccess: function (data) { top.$('#rightnav').tree({ cascadeCheck: false, //联动选中节点 checkbox: true, lines: true, url: 'Modules/handler/ModuleAdminHandler.ashx?action=GetModuleTree', onSelect: function (node) { top.$('#rightnav').tree('getChildren', node.target); } }); top.$('#leftnav').datagrid('selectRow', 0); }, onSelect: function (rowIndex, rowData) { curRoleModuleIds = []; var query = 'action=GetModuleByRoleId&roleid=' + rowData.Id; $.ajaxtext('handler/PermissionHandler.ashx', query, function (data) { var moduelTree = top.$('#rightnav'); moduelTree.tree('uncheckedAll'); if (data == '' || data.toString() == '[object XMLDocument]') { return; } curRoleModuleIds = data.split(','); for (var i = 0; i < curRoleModuleIds.length; i++) { var node = moduelTree.tree('find', curRoleModuleIds[i]); if (node) moduelTree.tree("check", node.target); } }); } }); }, submit: function () { var allSelectModuledIds = permissionMgr.getUserSelectedModule().split(','); var grantModuleIds = ''; var revokeModuleIds = ''; var flagRevoke = 0; var flagGrant = 0; while (flagRevoke < curRoleModuleIds.length) { if ($.inArray(curRoleModuleIds[flagRevoke], allSelectModuledIds) == -1) { revokeModuleIds += curRoleModuleIds[flagRevoke] + ','; //得到收回的权限列表 } ++flagRevoke; } while (flagGrant < allSelectModuledIds.length) { if ($.inArray(allSelectModuledIds[flagGrant], curRoleModuleIds) == -1) { grantModuleIds += allSelectModuledIds[flagGrant] + ','; //得到授予的权限列表 } ++flagGrant; } var query = 'action=SetRoleModulePermission&roleid=' + top.$('#leftnav').datagrid('getSelected').Id + '&grantIds=' + grantModuleIds + "&revokeIds=" + revokeModuleIds; $.ajaxjson('handler/PermissionHandler.ashx', query, function (d) { if (d.Data > 0) { msg.ok('设置成功!'); } else { alert(d.Message); } }); } }); }
相关资源分享
1、基于.NET的快速信息化系统开发整合框架 —RDIFramework.NET—系统目录
作者: EricHu 出处: http://blog.csdn.net/chinahuyong Email: 406590790@qq.com QQ 交流:406590790 1:16653241(已满) 群2:237326100 平台博客: 【CSDN】http://blog.csdn.net/chinahuyong 【CNBLOGS】http://www.cnblogs.com/huyong 关于作者:高级工程师、信息系统项目管理师、DBA。专注于微软平台项目架构、管理和企业解决方案,多年项目开发与管理经验,曾多次组织并开发多个大型项目,精通DotNet,DB(SqlServer、Oracle等)技术。熟悉Java、Delhpi及Linux操作系统,有扎实的网络知识。在面向对象、面向服务以及数据库领域有一定的造诣。现从事DB管理与开发、WinForm、WCF、WebService、网页数据抓取以及ASP.NET等项目管理、开发、架构等工作。 如有问题或建议,请多多赐教! 本文版权归作者和CSDN博客共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,如有问题,可以通过邮箱或QQ 联系我,非常感谢。
相关推荐
`jquery_easyui_开发手册中文解析.doc` 提供了Easy UI的开发指南,用中文详细解析了如何使用该框架进行网页开发,包括安装、基础用法、组件使用等。 `Jquery_easyui_datagrid_js导出excel.doc` 专门讲解了如何利用...
主机管理项目对模块中的参数进行解析 第24周 本节题纲 上节内容回顾 ModelForm操作及验证 ajax操作-原生ajax ajax操作-JQuery的ajax ajax操作-伪ajax(iframe) ajax操作-时机选择 文件上传(3种方式)-1 文件上传...
v3开发指南v3.2.pdf详细介绍了JEECG智能开发平台的各项功能和使用方法,不仅包括了技术背景、平台介绍、开发环境搭建、代码生成器等多个方面的内容,还涉及到了查询过滤器、数据字典、表单校验、权限管理等多个具体...
- **技术背景**:本指南的编写背景是基于当前Web UI框架(如EasyUI、JqueryUI、Ext、DWZ)的成熟度以及它们在统一系统界面方面的应用。随着这些框架的不断发展和完善,代码生成器能够生成更为规范且统一的界面代码,...
基于arm64版本的docker-compose文件
台区终端电科院送检文档
埃夫特机器人Ethernet IP 通讯配置步骤
rv320e机器人重型关节行星摆线减速传动装置研发
气缸驱动爬杆机器人的设计().zip
56tgyhujikolp[
内容概要:本文档提供了基于OpenCV的数字身份验证系统的Python代码示例,涵盖人脸检测、训练和识别三个主要功能模块。首先,通过调用OpenCV的CascadeClassifier加载预训练模型,实现人脸检测并采集多张人脸图像用于后续训练。接着,利用LBPH(局部二值模式直方图)算法对面部特征进行训练,生成训练数据集。最后,在实际应用中,系统能够实时捕获视频流,对比已有的人脸数据库完成身份验证。此外,还介绍了必要的环境配置如依赖库安装、文件路径设置以及摄像头兼容性的处理。 适合人群:对计算机视觉感兴趣的研发人员,尤其是希望深入了解OpenCV库及其在人脸识别领域的应用者。 使用场景及目标:适用于构建安全认证系统的企业或机构,旨在提高出入管理的安全性和效率。具体应用场景包括但不限于门禁控制系统、考勤打卡机等。 其他说明:文中提供的代码片段仅为基本框架,可根据实际需求调整参数优化性能。同时提醒开发者注意隐私保护法规,合法合规地收集和使用个人生物识别信息。
内容概要:本文档详细介绍了Java并发编程的核心知识点,涵盖基础知识、并发理论、线程池、并发容器、并发队列及并发工具类等方面。主要内容包括但不限于:多线程应用场景及其优劣、线程与进程的区别、线程同步方法、线程池的工作原理及配置、常见并发容器的特点及使用场景、并发队列的分类及常用队列介绍、以及常用的并发工具类。文档旨在帮助开发者深入理解和掌握Java并发编程的关键技术和最佳实践。 适合人群:具备一定Java编程经验的研发人员,尤其是希望深入了解并发编程机制、提高多线程应用性能的中级及以上水平的Java开发者。 使用场景及目标:①帮助开发者理解并发编程的基本概念和技术细节;②指导开发者在实际项目中合理运用多线程和并发工具,提升应用程序的性能和可靠性;③为准备Java技术面试的候选人提供全面的知识参考。 其他说明:文档内容详尽,适合用作深度学习资料或面试复习指南。建议读者结合实际编码练习,逐步掌握并发编程技巧。文中提到的多种并发工具类和容器,均附有具体的应用场景和注意事项,有助于读者更好地应用于实际工作中。
这个数据集包含了日常步数统计、睡眠时长、活跃分钟数以及消耗的卡路里,是个人健康与健身追踪的一部分。 该数据集非常适合用于以下实践: 数据清洗:现实世界中的数据往往包含缺失值、异常值或不一致之处。例如,某些天的步数可能缺失,或者存在不切实际的数值(如10,000小时的睡眠或负数的卡路里消耗)。通过处理这些问题,可以学习如何清理和准备数据进行分析。 探索性分析(发现日常习惯中的模式):可以通过分析找出日常生活中的模式和趋势,比如一周中哪一天人们通常走得最多,或是睡眠时间与活跃程度之间的关系等。 构建可视化图表(步数趋势、睡眠与活动对比图):将数据转换成易于理解的图形形式,有助于更直观地看出数据的趋势和关联。例如,绘制步数随时间变化的趋势图,或是比较睡眠时间和活动量之间的关系图。 数据叙事(将个人风格的追踪转化为可操作的见解):通过讲述故事的方式,把从数据中得到的洞察变成具体的行动建议。例如,根据某人特定时间段内的活动水平和睡眠质量,提供改善健康状况的具体建议。
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
nginx
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
模拟知识付费小程序,可流量主运营模式
什么是普通上传 调用接口一次性完成一个文件的上传。 普通上传2个缺点 文件无法续传,比如上传了一个比较大的文件,中间突然断掉了,需要重来 大文件上传太慢 解决方案 分片上传
英二2010-2021阅读理解 Part A 题干单词(补).pdf