[XAF] How to use the Allow/Deny permissions policy in the existing project
https://www.devexpress.com/Support/Center/Question/Details/T418166
Clear
[C#]
using DevExpress.Persistent.BaseImpl.PermissionPolicy;
using DevExpress.ExpressApp.Security.Strategy;
using System.Collections.Generic;
//..
public override void UpdateDatabaseAfterUpdateSchema() {
base.UpdateDatabaseAfterUpdateSchema();
foreach (SecuritySystemUser securitySystemUser in ObjectSpace.GetObjects<SecuritySystemUser>()) {
CopyUser(securitySystemUser);
}
foreach (SecuritySystemRole securitySystemRole in ObjectSpace.GetObjects<SecuritySystemRole>()) {
CopyRole(securitySystemRole, null);
}
ObjectSpace.CommitChanges();
}
private void CopyUser(SecuritySystemUser securitySystemUser) {
PermissionPolicyUser permissionPolicyUser = ObjectSpace.FindObject<PermissionPolicyUser>(new BinaryOperator("UserName", securitySystemUser.UserName));
if (permissionPolicyUser == null) {
permissionPolicyUser = ObjectSpace.CreateObject<PermissionPolicyUser>();
permissionPolicyUser.UserName = securitySystemUser.UserName;
permissionPolicyUser.IsActive = securitySystemUser.IsActive;
permissionPolicyUser.ChangePasswordOnFirstLogon = securitySystemUser.ChangePasswordOnFirstLogon;
foreach (SecuritySystemRole securitySystemRole in securitySystemUser.Roles) {
CopyRole(securitySystemRole, permissionPolicyUser);
}
}
}
private void CopyRole(SecuritySystemRole securitySystemRole, PermissionPolicyUser permissionPolicyUser) {
PermissionPolicyRole permissionPolicyRole = ObjectSpace.FindObject<PermissionPolicyRole>(new BinaryOperator("Name", securitySystemRole.Name));
if (permissionPolicyRole == null) {
permissionPolicyRole = ObjectSpace.CreateObject<PermissionPolicyRole>();
permissionPolicyRole.Name = securitySystemRole.Name;
permissionPolicyRole.PermissionPolicy = SecurityPermissionPolicy.DenyAllByDefault;
permissionPolicyRole.IsAdministrative = securitySystemRole.IsAdministrative;
permissionPolicyRole.CanEditModel = securitySystemRole.CanEditModel;
foreach (SecuritySystemTypePermissionObject securitySystemTypePermissionObject in securitySystemRole.TypePermissions) {
CopyTypePermissions(securitySystemTypePermissionObject, securitySystemRole, permissionPolicyRole);
}
foreach (SecuritySystemRole parentRole in securitySystemRole.ParentRoles) {
CopyParentRole(parentRole, permissionPolicyRole);
}
if (permissionPolicyUser != null) {
permissionPolicyUser.Roles.Add(permissionPolicyRole);
}
}
}
private void CopyParentRole(SecuritySystemRole parentRole, PermissionPolicyRole permissionPolicyRole) {
if (parentRole.IsAdministrative) {
permissionPolicyRole.IsAdministrative = true;
} if (parentRole.CanEditModel) {
permissionPolicyRole.IsAdministrative = true;
}
foreach (SecuritySystemTypePermissionObject securitySystemTypePermissionObject in parentRole.TypePermissions) {
CopyTypePermissions(securitySystemTypePermissionObject, parentRole, permissionPolicyRole);
}
foreach (SecuritySystemRole subParentRole in parentRole.ParentRoles) {
CopyParentRole(subParentRole, permissionPolicyRole);
}
}
private void CopyTypePermissions(SecuritySystemTypePermissionObject securitySystemTypePermissionObject, SecuritySystemRole securitySystemRole, PermissionPolicyRole permissionPolicyRole) {
PermissionPolicyTypePermissionObject permissionPolicyTypePermissionObject = ObjectSpace.FindObject<PermissionPolicyTypePermissionObject>(new BinaryOperator("TargetType", securitySystemTypePermissionObject.TargetType));
permissionPolicyTypePermissionObject = ObjectSpace.CreateObject<PermissionPolicyTypePermissionObject>();
permissionPolicyTypePermissionObject.TargetType = GetTargetType(securitySystemTypePermissionObject.TargetType);
permissionPolicyTypePermissionObject.Role = permissionPolicyRole;
if (securitySystemTypePermissionObject.AllowRead) {
permissionPolicyTypePermissionObject.ReadState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowWrite) {
permissionPolicyTypePermissionObject.WriteState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowCreate) {
permissionPolicyTypePermissionObject.CreateState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowDelete) {
permissionPolicyTypePermissionObject.DeleteState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowNavigate) {
permissionPolicyTypePermissionObject.NavigateState = SecurityPermissionState.Allow;
}
foreach (SecuritySystemObjectPermissionsObject securitySystemObjectPermissionsObject in securitySystemTypePermissionObject.ObjectPermissions) {
CopyObjectPermissions(securitySystemObjectPermissionsObject, permissionPolicyTypePermissionObject);
}
foreach (SecuritySystemMemberPermissionsObject securitySystemMemberPermissionsObject in securitySystemTypePermissionObject.MemberPermissions) {
CopyMemberPermission(securitySystemMemberPermissionsObject, permissionPolicyTypePermissionObject);
}
permissionPolicyRole.TypePermissions.Add(permissionPolicyTypePermissionObject);
}
private void CopyMemberPermission(SecuritySystemMemberPermissionsObject securitySystemMemberPermissionsObject, PermissionPolicyTypePermissionObject permissionPolicyTypePermissionObject) {
PermissionPolicyMemberPermissionsObject permissionPolicyMemberPermissionsObject = ObjectSpace.CreateObject<PermissionPolicyMemberPermissionsObject>();
permissionPolicyMemberPermissionsObject.TypePermissionObject = permissionPolicyTypePermissionObject;
if (securitySystemMemberPermissionsObject.AllowRead) {
permissionPolicyMemberPermissionsObject.ReadState = SecurityPermissionState.Allow;
}
if (securitySystemMemberPermissionsObject.AllowWrite) {
permissionPolicyMemberPermissionsObject.WriteState = SecurityPermissionState.Allow;
}
permissionPolicyMemberPermissionsObject.Members = securitySystemMemberPermissionsObject.Members;
permissionPolicyMemberPermissionsObject.Criteria = securitySystemMemberPermissionsObject.Criteria;
permissionPolicyTypePermissionObject.MemberPermissions.Add(permissionPolicyMemberPermissionsObject);
}
private void CopyObjectPermissions(SecuritySystemObjectPermissionsObject securitySystemObjectPermissionsObject, PermissionPolicyTypePermissionObject permissionPolicyTypePermissionObject) {
PermissionPolicyObjectPermissionsObject permissionPolicyObjectPermissionsObject = ObjectSpace.CreateObject<PermissionPolicyObjectPermissionsObject>();
permissionPolicyObjectPermissionsObject.TypePermissionObject = permissionPolicyTypePermissionObject;
if (securitySystemObjectPermissionsObject.AllowRead) {
permissionPolicyObjectPermissionsObject.ReadState = SecurityPermissionState.Allow;
}
if (securitySystemObjectPermissionsObject.AllowWrite) {
permissionPolicyObjectPermissionsObject.WriteState = SecurityPermissionState.Allow;
}
if (securitySystemObjectPermissionsObject.AllowDelete) {
permissionPolicyObjectPermissionsObject.DeleteState = SecurityPermissionState.Allow;
}
if (securitySystemObjectPermissionsObject.AllowNavigate) {
permissionPolicyObjectPermissionsObject.NavigateState = SecurityPermissionState.Allow;
}
permissionPolicyObjectPermissionsObject.Criteria = securitySystemObjectPermissionsObject.Criteria;
permissionPolicyTypePermissionObject.ObjectPermissions.Add(permissionPolicyObjectPermissionsObject);
}
private Type GetTargetType(Type currentType) {
Type outType;
if (!SecurityAssociationClassDictionary.TryGetValue(currentType, out outType)) {
outType = currentType;
}
return outType;
}
private static Dictionary<Type, Type> SecurityAssociationClassDictionary = new Dictionary<Type, Type>(){
{ typeof(SecuritySystemUser),typeof(PermissionPolicyUser) },
{ typeof(SecuritySystemRole),typeof(PermissionPolicyRole) },
{ typeof(SecuritySystemTypePermissionObject ),typeof(PermissionPolicyTypePermissionObject ) },
{ typeof(SecuritySystemObjectPermissionsObject ),typeof(PermissionPolicyObjectPermissionsObject ) },
{ typeof(SecuritySystemMemberPermissionsObject ),typeof(PermissionPolicyMemberPermissionsObject ) }
};
//...
Close
Your email address tq.y@qq.com appears to be unreachable. Please Update Now Welcome, ytq (A807018)
Download Your Products
Log Out
Products Free Trials & Demos Buy Support My Account About Us
SUPPORT CENTER
FAQ
Training Events
Localization
Examples
Tickets
Submit a Support Ticket Type search string and press Enter
Add to Favorites
Kb
How to use the Allow/Deny permissions policy in the existing project
Tags: .NET, Frameworks (XAF & XPO), eXpressApp Framework Alexey (DevExpress Support) weeks ago
Starting with version 16.1, application administrators can allow accessing all data within the application for a specific role and simultaneously prevent the access to a few data types or members. Alternatively, an end-user can deny access to all data for a role and only allow access to a strict list of objects or members. See Security - Introduce the 'Allow' and 'Deny' modifiers for permissions. Prior to version 16.1, the SecuritySystemUser and SecuritySystemRole classes were used to create and process permissions. By default, the DenyAll policy was used, and it was necessary to add the Allow permission for objects and types. These classes are not compatible with the Allow/Deny permissions model. This topic describes how to migrate to Allow/Deny security model in the existing application. Leave a Comment
Solution Alexey (DevExpress Support) weeks ago
If you do not need to transfer existing permissions to the new permissions policy, invoke the Application Designer for the YourSolutionName.Wxx/WxxApplication.xx file and set the UserType and RoleType properties of the SecurityStrategyComplex component to the PermissionPolicyUser and PermissionPolicyRole values respectively. After that, update your code that creates predefined users, roles and the required permissions as per the Using the Security System help article. If your database already contains permissions configured by end-users, you can use the example below in the YourSolutionName.Module/DatabaseUpdate/Updater.cs file to copy them to new security classes.
NOTE: we cannot guarantee that all permissions will be converted correctly, because these classes use different permissions mechanisms. [C#]Open in popup window
using DevExpress.Persistent.BaseImpl.PermissionPolicy;
using DevExpress.ExpressApp.Security.Strategy;
using System.Collections.Generic;
//..
public override void UpdateDatabaseAfterUpdateSchema() {
base.UpdateDatabaseAfterUpdateSchema();
foreach (SecuritySystemUser securitySystemUser in ObjectSpace.GetObjects<SecuritySystemUser>()) {
CopyUser(securitySystemUser);
}
foreach (SecuritySystemRole securitySystemRole in ObjectSpace.GetObjects<SecuritySystemRole>()) {
CopyRole(securitySystemRole, null);
}
ObjectSpace.CommitChanges();
}
private void CopyUser(SecuritySystemUser securitySystemUser) {
PermissionPolicyUser permissionPolicyUser = ObjectSpace.FindObject<PermissionPolicyUser>(new BinaryOperator("UserName", securitySystemUser.UserName));
if (permissionPolicyUser == null) {
permissionPolicyUser = ObjectSpace.CreateObject<PermissionPolicyUser>();
permissionPolicyUser.UserName = securitySystemUser.UserName;
permissionPolicyUser.IsActive = securitySystemUser.IsActive;
permissionPolicyUser.ChangePasswordOnFirstLogon = securitySystemUser.ChangePasswordOnFirstLogon;
foreach (SecuritySystemRole securitySystemRole in securitySystemUser.Roles) {
CopyRole(securitySystemRole, permissionPolicyUser);
}
}
}
private void CopyRole(SecuritySystemRole securitySystemRole, PermissionPolicyUser permissionPolicyUser) {
PermissionPolicyRole permissionPolicyRole = ObjectSpace.FindObject<PermissionPolicyRole>(new BinaryOperator("Name", securitySystemRole.Name));
if (permissionPolicyRole == null) {
permissionPolicyRole = ObjectSpace.CreateObject<PermissionPolicyRole>();
permissionPolicyRole.Name = securitySystemRole.Name;
permissionPolicyRole.PermissionPolicy = SecurityPermissionPolicy.DenyAllByDefault;
permissionPolicyRole.IsAdministrative = securitySystemRole.IsAdministrative;
permissionPolicyRole.CanEditModel = securitySystemRole.CanEditModel;
foreach (SecuritySystemTypePermissionObject securitySystemTypePermissionObject in securitySystemRole.TypePermissions) {
CopyTypePermissions(securitySystemTypePermissionObject, securitySystemRole, permissionPolicyRole);
}
foreach (SecuritySystemRole parentRole in securitySystemRole.ParentRoles) {
CopyParentRole(parentRole, permissionPolicyRole);
}
if (permissionPolicyUser != null) {
permissionPolicyUser.Roles.Add(permissionPolicyRole);
}
}
}
private void CopyParentRole(SecuritySystemRole parentRole, PermissionPolicyRole permissionPolicyRole) {
if (parentRole.IsAdministrative) {
permissionPolicyRole.IsAdministrative = true;
} if (parentRole.CanEditModel) {
permissionPolicyRole.IsAdministrative = true;
}
foreach (SecuritySystemTypePermissionObject securitySystemTypePermissionObject in parentRole.TypePermissions) {
CopyTypePermissions(securitySystemTypePermissionObject, parentRole, permissionPolicyRole);
}
foreach (SecuritySystemRole subParentRole in parentRole.ParentRoles) {
CopyParentRole(subParentRole, permissionPolicyRole);
}
}
private void CopyTypePermissions(SecuritySystemTypePermissionObject securitySystemTypePermissionObject, SecuritySystemRole securitySystemRole, PermissionPolicyRole permissionPolicyRole) {
PermissionPolicyTypePermissionObject permissionPolicyTypePermissionObject = ObjectSpace.FindObject<PermissionPolicyTypePermissionObject>(new BinaryOperator("TargetType", securitySystemTypePermissionObject.TargetType));
permissionPolicyTypePermissionObject = ObjectSpace.CreateObject<PermissionPolicyTypePermissionObject>();
permissionPolicyTypePermissionObject.TargetType = GetTargetType(securitySystemTypePermissionObject.TargetType);
permissionPolicyTypePermissionObject.Role = permissionPolicyRole;
if (securitySystemTypePermissionObject.AllowRead) {
permissionPolicyTypePermissionObject.ReadState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowWrite) {
permissionPolicyTypePermissionObject.WriteState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowCreate) {
permissionPolicyTypePermissionObject.CreateState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowDelete) {
permissionPolicyTypePermissionObject.DeleteState = SecurityPermissionState.Allow;
}
if (securitySystemTypePermissionObject.AllowNavigate) {
permissionPolicyTypePermissionObject.NavigateState = SecurityPermissionState.Allow;
}
foreach (SecuritySystemObjectPermissionsObject securitySystemObjectPermissionsObject in securitySystemTypePermissionObject.ObjectPermissions) {
CopyObjectPermissions(securitySystemObjectPermissionsObject, permissionPolicyTypePermissionObject);
}
foreach (SecuritySystemMemberPermissionsObject securitySystemMemberPermissionsObject in securitySystemTypePermissionObject.MemberPermissions) {
CopyMemberPermission(securitySystemMemberPermissionsObject, permissionPolicyTypePermissionObject);
}
permissionPolicyRole.TypePermissions.Add(permissionPolicyTypePermissionObject);
}
private void CopyMemberPermission(SecuritySystemMemberPermissionsObject securitySystemMemberPermissionsObject, PermissionPolicyTypePermissionObject permissionPolicyTypePermissionObject) {
PermissionPolicyMemberPermissionsObject permissionPolicyMemberPermissionsObject = ObjectSpace.CreateObject<PermissionPolicyMemberPermissionsObject>();
permissionPolicyMemberPermissionsObject.TypePermissionObject = permissionPolicyTypePermissionObject;
if (securitySystemMemberPermissionsObject.AllowRead) {
permissionPolicyMemberPermissionsObject.ReadState = SecurityPermissionState.Allow;
}
if (securitySystemMemberPermissionsObject.AllowWrite) {
permissionPolicyMemberPermissionsObject.WriteState = SecurityPermissionState.Allow;
}
permissionPolicyMemberPermissionsObject.Members = securitySystemMemberPermissionsObject.Members;
permissionPolicyMemberPermissionsObject.Criteria = securitySystemMemberPermissionsObject.Criteria;
permissionPolicyTypePermissionObject.MemberPermissions.Add(permissionPolicyMemberPermissionsObject);
}
private void CopyObjectPermissions(SecuritySystemObjectPermissionsObject securitySystemObjectPermissionsObject, PermissionPolicyTypePermissionObject permissionPolicyTypePermissionObject) {
PermissionPolicyObjectPermissionsObject permissionPolicyObjectPermissionsObject = ObjectSpace.CreateObject<PermissionPolicyObjectPermissionsObject>();
permissionPolicyObjectPermissionsObject.TypePermissionObject = permissionPolicyTypePermissionObject;
if (securitySystemObjectPermissionsObject.AllowRead) {
permissionPolicyObjectPermissionsObject.ReadState = SecurityPermissionState.Allow;
}
if (securitySystemObjectPermissionsObject.AllowWrite) {
permissionPolicyObjectPermissionsObject.WriteState = SecurityPermissionState.Allow;
}
if (securitySystemObjectPermissionsObject.AllowDelete) {
permissionPolicyObjectPermissionsObject.DeleteState = SecurityPermissionState.Allow;
}
if (securitySystemObjectPermissionsObject.AllowNavigate) {
permissionPolicyObjectPermissionsObject.NavigateState = SecurityPermissionState.Allow;
}
permissionPolicyObjectPermissionsObject.Criteria = securitySystemObjectPermissionsObject.Criteria;
permissionPolicyTypePermissionObject.ObjectPermissions.Add(permissionPolicyObjectPermissionsObject);
}
private Type GetTargetType(Type currentType) {
Type outType;
if (!SecurityAssociationClassDictionary.TryGetValue(currentType, out outType)) {
outType = currentType;
}
return outType;
}
private static Dictionary<Type, Type> SecurityAssociationClassDictionary = new Dictionary<Type, Type>(){
{ typeof(SecuritySystemUser),typeof(PermissionPolicyUser) },
{ typeof(SecuritySystemRole),typeof(PermissionPolicyRole) },
{ typeof(SecuritySystemTypePermissionObject ),typeof(PermissionPolicyTypePermissionObject ) },
{ typeof(SecuritySystemObjectPermissionsObject ),typeof(PermissionPolicyObjectPermissionsObject ) },
{ typeof(SecuritySystemMemberPermissionsObject ),typeof(PermissionPolicyMemberPermissionsObject ) }
};
//...
As a result, new permissions will be created in the database. After the database is updated, manually check if all permissions are converted correctly. Please pay attention to the following:
- A key value will not be copied to new objects.
- Existing references to SecuritySystemUser and SecuritySystemRole in your business objects will not be redirected to corresponding PermissionPolicyUser and PermissionPolicyRole objects.
- In some cases, it is better to rework permissions so that they will match the new Security System. For example: Allow all objects except some using a complex criterion -> Deny some objects using a simple criterion. Please do not hesitate to contact us if you encounter any issue. Leave a Comment
Add to Favorites
ID:
T418166
Created On:
// 下午7::
Modified On:
// 上午7::
Related Questions
Security - Introduce the 'Allow' and 'Deny' modifiers for permissions
How do I implement 'Permission Policy' (new feature of 16.1) to older version 15.2
How to automatically grant security permissions to change associated reference or collection members
Disclaimer: The information provided on DevExpress.com and its affiliated web properties is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information.
DEVEXPRESS
About Us
News
Our Awards
Upcoming Events
User Comments
Case Studies
Reviews and Publications
Licensing
Purchasing
MVP Program
Contact Us
Logos
.NET CONTROLS
WinForms
ASP.NET
MVC
WPF
Windows Apps
CROSS PLATFORM
Reporting
Document Automation
MOBILE
DevExtreme Mobile
ENTERPRISE TOOLS
Report Server
Analytics Dashboard
FRAMEWORKS
eXpressApp Framework
CODE-DEBUG-REFACTOR
CodeRush for Visual Studio
HTML5 JS WIDGETS
DevExtreme Web
iOS
DataExplorer
FUNCTIONAL WEB TESTING
TestCafe
DELPHI C++BUILDER
VCL
SUPPORT
Search the Knowledge Base
My Questions
Code Examples
Getting Started
Demos
Documentation
Blogs
Training
Webinars
Current Version/Build
Version History
If you need additional product information, write to us at info@devexpress.com or call us at + () -
FOLLOW US
DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows , DevExpress tools help you build and deliver your best in the shortest time possible.
Your Privacy - Legal Statements Copyright © - Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners
[XAF] How to use the Allow/Deny permissions policy in the existing project的更多相关文章
- Permission Policies
The Permission Policy determines Security System behavior when there are no explicitly specified per ...
- Security Permissions Caching
Security Permissions Caching Security permission caching is implemented in Security Adapters - class ...
- NTFS 权限讲解 ACL
节选自:Securing Windows Server 2003 4.1 Protecting Files with NTFS File Permissions The primary techniq ...
- 10 Common Problems Causing Group Policy To Not Apply
10 Common Problems Causing Group Policy To Not Apply Group Policy is a solid tool and is very stable ...
- 应用框架的设计与实现——.NET平台(10 授权服务.CodeAccessSecurityAttribute)
以下内容转载自:http://blog.csdn.net/dongma_yifei/article/details/1533124 CodeAccessSecurityAttribute 是 Prin ...
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- linux 操作
正在运行的内核和系统信息 # uname -a # 获取内核版本(和BSD版本) # lsb_release -a # 显示任何 LSB 发行版版本信息 # cat /etc/SuSE-release ...
- Command Line-Version (SetACL.exe) – Syntax and Description
For a quick start, tell SetACL the following: Object name (-on): This is the path to the object SetA ...
- Unity如何管理住Android 6.0 调皮的权限
前天我们项目有这么个需求,台湾版本由于要上谷歌Play要求安卓系统6.0以上的动态申请权限,对于一个做Unity的来说,是不是有点懵逼,这我该何去何从呢?我想静静,静静的想一想,权限也不就那么点事吗? ...
随机推荐
- C. Shaass and Lights 组合数学
http://codeforces.com/contest/294/problem/C 把那个数组n分段了,那么有两类. 1.开头和端点那些,就是只有一端在开始的,这个时候,要开完这些灯,只能循序渐进 ...
- html之如何让文字两端对齐
text-align: justify;/*英文*/ text-align-last: justify;/*中英文*/ text-align-last: justify;亲测有效(chrome)
- table边框单线的实现方法
1.实现方法一: <table border="0" cellspacing="1" style=" 实现原理:利用table的单元 ...
- github 添加项目
下载git安装 ->https://git-scm.com/downloads 新建git目录 在目录下右键选择Git Bash Here 执行 git init 拷贝项目到git目录下 在gi ...
- 内省、JavaBean、PropertyDescriptor类、Introspector类、BeanUtils工具包、注解、Rentention、Target、注解的基本属性和高级属性
本文转载自:http://blog.sina.com.cn/s/blog_5d65a16901011kom.html 关键字:内省.JavaBean.PropertyDescriptor类.Int ...
- Linux 安装git
0.安装git前: 先去git 官网上看一眼,Linux怎么安装git , 原来非常简单,只需要输入命令即可,但是不同的linux 版本对应的命令不一样: 命令行查看Linux版本: $ cat /e ...
- css 字间距、CSS字体间距、css 字符间距设置
1.text-indent设置抬头距离css缩进 2.letter-spacing来设置字与字间距_字符间距离,字体间距css样式
- intelj对我来说比较常用的快捷键
文件查找 CTRL+N 查找类 CTRL+SHIFT+N 查找文件 CTRL+SHIFT+ALT+N 查找类中的方法或变量 CTRL+ALT+B 找所有的子类 CTRL+G 定位行 CTR ...
- DBCC SHOWCONTIG、DBCC DBREINDEX。
use dbname declare @table_id int set @table_id=object_id('tablename') dbcc showcontig(@table_id) 解释如 ...
- Jquery基础知识
//使用$操作得到的对象,都是Jquery对象 如何把Jquery对象转换成dom对象?$abc 方法1:var div = $div.get(0) 方法2:var div = $div[0] 如何把 ...