需求:

勾上界面上多选框筛选出符合的道具

思路:

1. 使用组合数字让一个数字包含多这个搜索条件,比如2代表搜索衣服和武器, 数字按照2的n次幂的值递增,通过|,&,^运算符实现一个数字包含多个条件的情况

运算符的介绍: http://www.cnblogs.com/plateFace/p/4192351.html.

 

2. 拼接一长串字符代表搜索条件比如”武器_衣服_裤子", 通过_分割字符串知道这次搜索 武器, 衣服,裤子三样东西.

代码采用的是第一个思路

效果图

搜索代码:

public class AuctionHouseManager
{
//其他省略... //搜索代码
public List<AuctionItem> SearchAuction(ulong condition)
{
List<AuctionItem> newItemList = new List<AuctionItem>(); if (condition == 0)
{
foreach (var item in m_autionItemList)
{
newItemList.Add(item);
}
return newItemList;
} AuctionItem auctionItem = null;
int level = 0;
bool isRowCondition = false;
bool isComparison = false; for (int i = 0; i < m_autionItemList.Count; i++)
{
auctionItem = m_autionItemList[i]; if ((condition & AuctionSearchOption.AttentionAll) > 0)
{
if (!m_autionItemList[i].IsAttention)
continue;
} #region 等级
isRowCondition = false;
isComparison = false;
level = auctionItem.Item.Cfg.requiredLevel;
if ((condition & AuctionSearchOption.LvAll) > 0)
{ if (level != 30
&& level != 60
&& level != 90
&& level != 120
&& level != 150
&& level != 180)
{
continue;
}
}
else
{
if ((condition & AuctionSearchOption.Lv30) > 0 && !isRowCondition)
{
isRowCondition = level == 30;
isComparison = true;
}
if ((condition & AuctionSearchOption.Lv60) > 0 && !isRowCondition)
{
isRowCondition = level == 60;
isComparison = true;
}
if ((condition & AuctionSearchOption.Lv90) > 0 && !isRowCondition)
{
isRowCondition = level == 90;
isComparison = true;
}
if ((condition & AuctionSearchOption.Lv120) > 0 && !isRowCondition)
{
isRowCondition = level == 120;
isComparison = true;
}
if ((condition & AuctionSearchOption.Lv150) > 0 && !isRowCondition)
{
isRowCondition = level == 150;
isComparison = true;
}
if ((condition & AuctionSearchOption.Lv180) > 0 && !isRowCondition)
{
isRowCondition = level == 180;
isComparison = true;
} if (!isRowCondition && isComparison)
continue; } #endregion #region 升星条件
//升星条件判断
isRowCondition = false;
isComparison = false;
if ((condition & AuctionSearchOption.StarLvWhite) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.StarLevel == 0;
isComparison = true;
} if ((condition & AuctionSearchOption.StarLvGreen) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.StarLevel == 1;
isComparison = true;
} if ((condition & AuctionSearchOption.StarLvBlue) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.StarLevel == 2;
isComparison = true;
} if ((condition & AuctionSearchOption.StarLvViolet) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.StarLevel == 3;
isComparison = true;
} if ((condition & AuctionSearchOption.StarLvOrange) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.StarLevel == 4;
isComparison = true;
} if ((condition & AuctionSearchOption.StarLvRed) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.StarLevel == 5;
isComparison = true;
} if (!isRowCondition && isComparison)
continue; #endregion #region 货币
//货币
isRowCondition = false;
isComparison = false;
if ((condition & AuctionSearchOption.MoneyCopper) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.SellType == SellType.Copper;
isComparison = true;
}
if ((condition & AuctionSearchOption.MoneyGold) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.SellType == SellType.Gold;
isComparison = true;
} if (!isRowCondition && isComparison)
continue;
#endregion #region 职业 //职业
isRowCondition = false;
isComparison = false;
if ((condition & AuctionSearchOption.JobWarrior) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.ClassType == RoleClass.Null || auctionItem.Item.ClassType == RoleClass.Warrior;
isComparison = true;
}
if ((condition & AuctionSearchOption.JobMaster) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.ClassType == RoleClass.Null || auctionItem.Item.ClassType == RoleClass.Mage;
isComparison = true;
}
if ((condition & AuctionSearchOption.JobPastor) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.ClassType == RoleClass.Null || auctionItem.Item.ClassType == RoleClass.Priest;
isComparison = true;
} if (!isRowCondition && isComparison)
continue; #endregion #region 技能和技能书
//装备&技能书
/*
道具功能类型:0
武器:0
衣服:1
裤子:2
鞋子:3
头盔:4
项链:5
戒指:6
拳套:7
防御宝物:8
攻击宝物:9
*/ isRowCondition = false; //是否符合条件
isComparison = false; //道具已经比较过 int classType = auctionItem.Item.Cfg.classType;
int equipType = auctionItem.Item.Cfg.v[0]; bool isClassType13 = (classType >= 1 && classType <= 3); //大类型是1-3 if ((condition & AuctionSearchOption.EquipAll) > 0)
{
//没有全部判断条件
isComparison = true;
if (isClassType13 && (equipType >= 0 && equipType <= 9))
isRowCondition = true;
}
else
{
if ((condition & AuctionSearchOption.EquipWeapon) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 0;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipClothing) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 1;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipPants) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 2;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipShoes) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 3;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipHelmet) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 4;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipNecklace) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 5;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipRing) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 6;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipHandguard) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && equipType == 7;
isComparison = true;
}
if ((condition & AuctionSearchOption.EquipMagicWeapon) > 0 && !isRowCondition)
{
isRowCondition = isClassType13 && (equipType == 8 || equipType == 9);
isComparison = true;
} //if ((condition & AuctionSearchOption.EquipFashionable) > 0 && !isRowCondition)
//{
// isRowCondition = auctionItem.Item.Cfg.v[0] == 8 || auctionItem.Item.Cfg.v[0] == 9;
//} if ((condition & AuctionSearchOption.EquipSkill) > 0 && !isRowCondition)
{
isRowCondition = classType == 5;
isComparison = true;
}
} if (!isRowCondition && isComparison)
continue; #endregion #region 消耗品,技能和技能书是一起的
/*
装备道具:0
效果道具:1
材料道具:2
任务道具:3
宝石道具:4
技能书卷:5
技能宝物:6
货币道具:7
宝箱道具:8
虚拟货币:999
*/ if ((condition & AuctionSearchOption.ConsumeDrug) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.Cfg.type == 1 && auctionItem.Item.Cfg.v[0] == 0;
isComparison = true;
}
if ((condition & AuctionSearchOption.ConsumeForgeMaterial) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.Cfg.type == 2 && (auctionItem.Item.Cfg.v[0] >= 1 && auctionItem.Item.Cfg.v[0] <= 6);
isComparison = true;
}
if ((condition & AuctionSearchOption.ConsumeWayMasterial) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.Cfg.type == 2 && auctionItem.Item.Cfg.v[0] == 0;
isComparison = true;
}
if ((condition & AuctionSearchOption.ConsumeGem) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.Cfg.type == 4;
isComparison = true;
}
if ((condition & AuctionSearchOption.ConsumeReputation) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.Cfg.type == 7 && auctionItem.Item.Cfg.v[0] == 53;
isComparison = true;
}
if ((condition & AuctionSearchOption.ConsumeSkillCheats) > 0 && !isRowCondition)
{
isRowCondition = auctionItem.Item.Cfg.type == 6;
isComparison = true;
} if (!isRowCondition && isComparison)
continue;
#endregion newItemList.Add(m_autionItemList[i]);
} return newItemList;
} } public struct AuctionSearchOption
{
public const ulong None = 1;
//关注
public const ulong AttentionAll = 2;
//等级
public const ulong LvAll = 4;
public const ulong Lv30 = 8;
public const ulong Lv60 = 16;
public const ulong Lv90 = 32;
public const ulong Lv120 = 64;
public const ulong Lv150 = 128;
public const ulong Lv180 = 256;
//品质
public const ulong StarLvAll = 512;
public const ulong StarLvWhite = 1024;
public const ulong StarLvGreen = 2048;
public const ulong StarLvBlue = 4096;
public const ulong StarLvViolet = 8192;
public const ulong StarLvOrange = 16384;
public const ulong StarLvRed = 32768;
//货币
public const ulong MoneyAll = 65536;
public const ulong MoneyGold = 131072;
public const ulong MoneyCopper = 262144;
//职业
public const ulong JobAll = 524288;
public const ulong JobWarrior = 1048576;
public const ulong JobMaster = 2097152;
public const ulong JobPastor = 4194304;
//装备和技能书
public const ulong EquipAll = 8388608;
public const ulong EquipWeapon = 16777216;
public const ulong EquipClothing = 33554432;
public const ulong EquipPants = 67108864;
public const ulong EquipShoes = 134217728;
public const ulong EquipHelmet = 268435456;
public const ulong EquipNecklace = 536870912;
public const ulong EquipRing = 1073741824;
public const ulong EquipHandguard = 2147483648;
public const ulong EquipMagicWeapon = 4294967296;
public const ulong EquipFashionable = 8589934592;
public const ulong EquipSkill = 17179869184;
//消耗品
public const ulong ConsumeAll = 34359738368;
public const ulong ConsumeDrug = 68719476736;
public const ulong ConsumeForgeMaterial = 137438953472;
public const ulong ConsumeWayMasterial = 274877906944;
public const ulong ConsumeGem = 549755813888;
public const ulong ConsumeReputation = 1099511627776;
public const ulong ConsumeSkillCheats = 2199023255552;
}

 

 

界面代码:

using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine.UI;
using AHM = AuctionHouseManager;
using ASO = AuctionSearchOption; public class AdvancedSearch1 : UI_Base
{ public event Action CloseUIEvent;
private List<AuctionItem> m_searchItemList; [SerializeField]
private UIButton m_BtnCancel; [SerializeField]
private UIToggle m_AttentionTo;
[SerializeField]
private UIToggle[] m_LvToggleList;
[SerializeField]
private UIToggle[] m_StarToggleList;
[SerializeField]
private UIToggle[] m_MoneyToggleList;
[SerializeField]
private UIToggle[] m_JobToggleList;
[SerializeField]
private UIToggle[] m_EquipToggleList;
[SerializeField]
private UIToggle[] m_ConsumeToggleList; private bool isInit = false; public List<AuctionItem> SearchItemList
{
get { return m_searchItemList; }
set { m_searchItemList = value; }
} public void Awake()
{
//m_ToggleList = GetComponentsInChildren<Toggle>();
m_BtnCancel.onClick.Add(new EventDelegate(Cancel)); m_AttentionTo.onChange.Clear();
m_AttentionTo.onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(m_AttentionTo); })); ulong value = 0;
m_AttentionTo.Set((AHM.I.Condition & ASO.AttentionAll) > 0, false); for (int i = 0; i < m_LvToggleList.Length; i++)
{
UIToggle t = m_LvToggleList[i];
m_LvToggleList[i].onChange.Clear();
m_LvToggleList[i].onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(t); })); value = Convert.ToUInt64(m_LvToggleList[i].name);
m_LvToggleList[i].Set((AHM.I.Condition & value) > 0 || ((AHM.I.Condition & ASO.LvAll) > 0 && value != ASO.LvAll), false);
} for (int i = 0; i < m_StarToggleList.Length; i++)
{
UIToggle t = m_StarToggleList[i];
m_StarToggleList[i].onChange.Clear();
m_StarToggleList[i].onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(t); })); value = Convert.ToUInt64(m_StarToggleList[i].name);
m_StarToggleList[i].Set((AHM.I.Condition & value) > 0 || ((AHM.I.Condition & ASO.StarLvAll) > 0 && value != ASO.StarLvAll), false);
} for (int i = 0; i < m_MoneyToggleList.Length; i++)
{
UIToggle t = m_MoneyToggleList[i];
m_MoneyToggleList[i].onChange.Clear();
m_MoneyToggleList[i].onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(t); })); value = Convert.ToUInt64(m_MoneyToggleList[i].name);
m_MoneyToggleList[i].Set((AHM.I.Condition & value) > 0 || ((AHM.I.Condition & ASO.MoneyAll) > 0 && value != ASO.MoneyAll), false);
} for (int i = 0; i < m_JobToggleList.Length; i++)
{
UIToggle t = m_JobToggleList[i];
m_JobToggleList[i].onChange.Clear();
m_JobToggleList[i].onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(t); })); value = Convert.ToUInt64(m_JobToggleList[i].name);
m_JobToggleList[i].Set((AHM.I.Condition & value) > 0 || ((AHM.I.Condition & ASO.JobAll) > 0 && value != ASO.JobAll), false);
} for (int i = 0; i < m_EquipToggleList.Length; i++)
{
UIToggle t = m_EquipToggleList[i];
m_EquipToggleList[i].onChange.Clear();
m_EquipToggleList[i].onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(t); })); value = Convert.ToUInt64(m_EquipToggleList[i].name);
m_EquipToggleList[i].Set((AHM.I.Condition & value) > 0 || ((AHM.I.Condition & ASO.EquipAll) > 0 && value != ASO.EquipAll), false);
} for (int i = 0; i < m_ConsumeToggleList.Length; i++)
{
UIToggle t = m_ConsumeToggleList[i];
m_ConsumeToggleList[i].onChange.Clear();
m_ConsumeToggleList[i].onChange.Add(new EventDelegate(delegate { AdvancedSearch_ChangeValueEvent(t); })); value = Convert.ToUInt64(m_ConsumeToggleList[i].name);
m_ConsumeToggleList[i].Set((AHM.I.Condition & value) > 0 || ((AHM.I.Condition & ASO.ConsumeAll) > 0 && value != ASO.ConsumeAll), false);
}
} public void LateUpdate()
{
if (!isInit)
{
//AHM.I.Condition = 0;
isInit = true;
}
} public void AdvancedSearch_ChangeValueEvent(UIToggle obj)
{
if (!isInit)
return; //Debug.Log(obj.name + " - " + obj.value);
//Debug.Log(isOn + " - " + row.TitleName + " - " + cell.Name + " - " + cell.Value);
ulong value = Convert.ToUInt64(obj.name); if (obj.value)
{
AHM.I.Condition |= value; //如果勾选的是全部,全部勾选剩下的小选项
switch (value)
{
case ASO.LvAll:
for (int i = 1; i < m_LvToggleList.Length; i++)
{
m_LvToggleList[i].value = true;
AHM.I.Condition |= Convert.ToUInt64(m_LvToggleList[i].name);
}
break;
case ASO.StarLvAll:
for (int i = 1; i < m_StarToggleList.Length; i++)
{
m_StarToggleList[i].value = true;
AHM.I.Condition |= Convert.ToUInt64(m_StarToggleList[i].name);
}
break;
case ASO.MoneyAll:
for (int i = 1; i < m_MoneyToggleList.Length; i++)
{
m_MoneyToggleList[i].value = true;
AHM.I.Condition |= Convert.ToUInt64(m_MoneyToggleList[i].name);
}
break;
case ASO.JobAll:
for (int i = 1; i < m_JobToggleList.Length; i++)
{
m_JobToggleList[i].value = true;
AHM.I.Condition |= Convert.ToUInt64(m_JobToggleList[i].name);
}
break;
case ASO.EquipAll:
for (int i = 1; i < m_EquipToggleList.Length; i++)
{
m_EquipToggleList[i].value = true;
AHM.I.Condition |= Convert.ToUInt64(m_EquipToggleList[i].name);
}
break;
case ASO.ConsumeAll:
for (int i = 1; i < m_ConsumeToggleList.Length; i++)
{
m_ConsumeToggleList[i].value = true;
AHM.I.Condition |= Convert.ToUInt64(m_ConsumeToggleList[i].name);
}
break;
}
}
else
{
AHM.I.Condition ^= value; //Debugger.Log("等级值:" + (ASO.LvAll & value));
if (value >= ASO.Lv30 && value <= ASO.Lv180)
{
m_LvToggleList[0].value = false;
if ((AHM.I.Condition & ASO.LvAll) > 0)
AHM.I.Condition ^= ASO.LvAll;
}
else if (value >= ASO.StarLvWhite && value <= ASO.StarLvRed)
{
m_StarToggleList[0].value = false;
if ((AHM.I.Condition & ASO.StarLvAll) > 0)
AHM.I.Condition ^= ASO.StarLvAll;
}
else if (value >= ASO.MoneyGold && value <= ASO.MoneyCopper)
{
m_MoneyToggleList[0].value = false;
if ((AHM.I.Condition & ASO.MoneyAll) > 0)
AHM.I.Condition ^= ASO.MoneyAll;
}
else if (value >= ASO.JobWarrior && value <= ASO.JobPastor)
{
m_JobToggleList[0].value = false;
if ((AHM.I.Condition & ASO.JobAll) > 0)
AHM.I.Condition ^= ASO.JobAll;
}
else if (value >= ASO.EquipWeapon && value <= ASO.EquipSkill)
{
m_EquipToggleList[0].value = false;
if ((AHM.I.Condition & ASO.EquipAll) > 0)
AHM.I.Condition ^= ASO.EquipAll;
}
else if (value >= ASO.ConsumeDrug && value <= ASO.ConsumeSkillCheats)
{
m_ConsumeToggleList[0].value = false;
if ((AHM.I.Condition & ASO.ConsumeAll) > 0)
AHM.I.Condition ^= ASO.ConsumeAll;
} switch (value)
{
case ASO.LvAll:
for (int i = 1; i < m_LvToggleList.Length; i++)
{
m_LvToggleList[i].value = false;
AHM.I.Condition ^= Convert.ToUInt64(m_LvToggleList[i].name);
}
break;
case ASO.StarLvAll:
for (int i = 1; i < m_StarToggleList.Length; i++)
{
m_StarToggleList[i].value = false;
AHM.I.Condition ^= Convert.ToUInt64(m_StarToggleList[i].name);
}
break;
case ASO.MoneyAll:
for (int i = 1; i < m_MoneyToggleList.Length; i++)
{
m_MoneyToggleList[i].value = false;
AHM.I.Condition ^= Convert.ToUInt64(m_MoneyToggleList[i].name);
}
break;
case ASO.JobAll:
for (int i = 1; i < m_JobToggleList.Length; i++)
{
m_JobToggleList[i].value = false;
AHM.I.Condition ^= Convert.ToUInt64(m_JobToggleList[i].name);
}
break;
case ASO.EquipAll:
for (int i = 1; i < m_EquipToggleList.Length; i++)
{
m_EquipToggleList[i].value = false;
AHM.I.Condition ^= Convert.ToUInt64(m_EquipToggleList[i].name);
}
break;
case ASO.ConsumeAll:
for (int i = 1; i < m_ConsumeToggleList.Length; i++)
{
m_ConsumeToggleList[i].value = false;
AHM.I.Condition ^= Convert.ToUInt64(m_ConsumeToggleList[i].name);
}
break;
}
}
} public void Cancel()
{
UIManager.Instance.CloseUI(eUI.AuctionSearch);
} public override void OnClose()
{
SearchItemList = AHM.I.SearchAuction(AHM.I.Condition); if (CloseUIEvent != null)
CloseUIEvent();
}
}

道具搜索框(|=, & , ^=)实现的列子的更多相关文章

  1. HTML5轻松实现搜索框提示文字点击消失---及placeholder颜色的设置

    在做搜索框的时候无意间发现html5的input里有个placeholder属性能轻松实现提示文字点击消失功能,之前还傻傻的在用js来实现类似功能... 示例 <form action=&quo ...

  2. WPF 自定义搜索框

      控件中的搜索图标下载地址:http://www.easyicon.net/1183666-Search_icon.html 搜索框设计过程比较简单: 1.先定义一个Rectangle作为背景 2. ...

  3. weui 搜索框

    点击搜索,会显示关键字取消按钮,输入文字,会在搜索框下,有相应的列表显示. HTML: <!DOCTYPE html> <html> <head> <meta ...

  4. 搜索框(Thinkphp5.0)

    1.普通关键词搜索框 模板部分代码: <form name='searchform' action='/index.php/module/controller/search' method='g ...

  5. IOS第二天-新浪微博 - 添加搜索框,弹出下拉菜单 ,代理的使用 ,HWTabBar.h(自定义TabBar)

    ********HWDiscoverViewController.m(发现) - (void)viewDidLoad { [super viewDidLoad]; // 创建搜索框对象 HWSearc ...

  6. 用jsonp实现搜索框功能

    用jsonp实现搜索框功能 前面的话: 在上周本来想发一篇模仿必应搜索的界面.但是在准备写文章之前突然想到前面学习了ajax技术,在这里我也让我的页面有一种不需要手动刷新就能获取到数据.但是发现用前面 ...

  7. 淘宝购物车页面 智能搜索框Ajax异步加载数据

    如果有朋友对本篇文章的一些知识点不了解的话,可以先阅读此篇文章.在这篇文章中,我大概介绍了一下构建淘宝购物车页面需要的基础知识. 这篇文章主要探讨的是智能搜索框Ajax异步加载数据.jQuery的社区 ...

  8. jQuery+HTML5弹出创意搜索框层

    效果体验:http://hovertree.com/texiao/jquery/26/ 本效果适用于移动设备,可以使用手机等浏览效果. 代码下载:http://hovertree.com/h/bjaf ...

  9. iOS之搜索框UISearchController的使用(iOS8.0以后替代UISearchBar+display)

    在iOS 8.0以上版本中, 我们可以使用UISearchController来非常方便地在UITableView中添加搜索框. 而在之前版本中, 我们还是必须使用UISearchBar + UISe ...

随机推荐

  1. mysql查看每张表的空间使用情况

    use information_schema; /,),'MB') as data ,concat(round(index_length//,),'MB') as indexweight from T ...

  2. yii2中判断数据表是否存在数据库中(原创)

    分为两步: 第一步,找出数据库中所有表名,表名得到的是二维数组. 第二步,判断表名是否存在二维数组中 下面就贴我的代码咯. $table_name =‘table’; $juge = $handle- ...

  3. 学习LSM(Linux security module)之三:Apparmor的前世今生和基本使用

    感冒了,感觉一脑子浆糊,真是蛋疼. 先粗略讲一些前置知识. 一:MAC和DAC DAC(Discretionary Access Control),自主访问控制,是最常用的一类访问控制机制,意思为主体 ...

  4. 1、Django实战第1天:建立项目mxonline

    工具版本: python3.6.3 django1.9.8 安装工具 mkvirtualenv --python="C:\Python36\python.exe" mxonline ...

  5. CSS中的层叠、特殊性、继承、样式表中的@import

    CSS中的层叠.特殊性.继承.样式表中的@import 层叠 CSS有一个机制是层叠,层叠可以理解为对样式的覆盖,优先性为: 网站开发者的样式表 用户样式(通过设置浏览器的显示选项) 浏览器默认的样式 ...

  6. date conversion

    SELECT to_char(sysdate,'yyyymmdd hh:mi:ss'), to_char(sysdate ,'yyyymmdd hh:mi:ss'), to_char(sysdate ...

  7. CentOS 7 下nagios搭建记录

    跟随 园子的文章搭建 http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html 1.遇 nagios插件地址迁移错误,记录解决. 2. ...

  8. 将html文档转成pdf

    (1)使用场景:在项目中使用到了合同,只有在合同的头部,是不相同的.在合同的主体部分都是相同的,因此就把他放到了模板(html文件)里面. 在用户线上签约完成之后,可以将pdf版的合同下载. (2)需 ...

  9. JavaScript 中函数节流和函数去抖的讲解

    JavaScript 中函数节流和函数去抖的讲解 我们都知道频繁触发执行一段js逻辑代码对性能会有很大的影响,尤其是在做一些效果实现方面,或者逻辑中需要进行后端请求,更是会导致卡顿,效果失效等结果,所 ...

  10. easyui dialog 按钮动态命名

    1.方法一: /** * grid新增 * 弹框并且获取支付类型 */ function gridAdd() { var dlg = $('#mydialog').dialog({ title : & ...