今天在项目中遇到按位或组合权限串的问题: 首先每一个权限数都是2的N次方数 如:k1=2 ; //添加 k2=4 ; //删除 k3=8; //修改 ... 如此定义功能权限数,当需要组合权限时,就需要对各个所拥有的权限数按位或了。 如: purview = k2|k3; // 赋给添加和删除权限 ...
分类:
编程语言 时间:
2016-09-21 10:10:41
阅读次数:
148
Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a ...
分类:
其他好文 时间:
2016-09-15 06:24:37
阅读次数:
140
Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a ...
分类:
其他好文 时间:
2016-09-14 07:18:03
阅读次数:
185
Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a ...
分类:
其他好文 时间:
2016-09-13 22:21:57
阅读次数:
189
<center># ELK日志系统使用说明 #</center>**k3与k4的对比** nLED_1 - GPK4 nLED_2 - GPK5 nLED_3 - GPK6 nLED_4 - GPK7 Buttons: K1 GPN0 K2 GPN1 K3 G ...
分类:
其他好文 时间:
2016-08-28 11:11:53
阅读次数:
602
题目地址:http://acm.timus.ru/problem.aspx?space=1&num=2068
思路:x个石子,x=2*k+1。分三堆2*k+1=(2*k1+1)+(2*k2+1)+(2*k3+1)=2(k1+k2+k3+1)+1。k1+k2+k3+1=k,每分一次,k1+k2+k3减少1,所以石子最多分k次。求出总次数,判断奇偶即可。
#include
#include
#in...
分类:
其他好文 时间:
2016-08-22 20:12:08
阅读次数:
190
本周作业内容:1、列出当前系统上所有已经登录的用户的用户名,注意:同一个用户登录多次,则只显示一次即可。#who|cut-d‘‘-f1|sort-u2、取出最后登录到当前系统的用户的相关信息。#id$(who|sort-t‘‘-k3,4|tail-1|cut-d‘‘-f1)3、取出当前系统上被用户当作其默认shell的最多的那..
分类:
编程语言 时间:
2016-08-15 22:55:01
阅读次数:
786
安装SQLSERVER2005时出现如下错误提示:在以上提示的目录下找到文件:SQLSetup0005_K3_Core.log和SQLSetup0005_K3_Datastore.xml,打开第一个文件内容如下:MicrosoftSQLServer2005SetupbeginningatSatAug1310:09:372016ProcessID:2252D:\tools\SQL.2005.all.chs\SQLServerx86\..
分类:
数据库 时间:
2016-08-13 14:18:44
阅读次数:
742
1、查出分区空间使用率的最大百分比值[root@centos7~]#df|grep"^/dev"|grep-v"cdrom$"|tr‘‘‘:‘|tr-s‘:‘|cut-d:-f5|sort
1%
4%
73%2、查出用户UID最大值的用户名、UID及shell类型[root@centos7~]#cat/etc/passwd|sort-n-t:-k3|cut-d:-f1,3,7|tail-1
nfsnobody:65534:/sbin/nolog..
分类:
其他好文 时间:
2016-08-06 22:01:28
阅读次数:
619