1、先将虚拟机Power Off,在Virtual Machine Setting对话框里点击左下角的“Add”,选择“Hard Disk”,之后选择“Create a new virtual disk”,分配容量,其他默认配置就可以了。
2、启动虚拟机系统,用root登陆,在 命令行用fdisk -l查看是否识别了新硬盘,如果添加的是IDE硬盘,就应该看到hdb,如果是SCSI硬盘,看到的就应该是sdb。
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
因为我之前已经加过一块硬盘了,所以这里显示sdc。
3、使用fdisk /dev/sdc,在出现的选项中选择“w”,即将分区表写入硬盘并退出,这时再用fdisk -l查看就会发现:
Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5404b953
Device Boot Start End Blocks Id System
4、用mkfs命令将其格式化,mkfs /dev/sdc
5、用mount命令将其挂载,m ......
SQL位运算
select 2|8 --10
select 2|8|1 --11
select 10&8 --8,包含,10=8+2
select 10&2 --2,包含,10=2+8
select 10&4 --0,不包含
select 19&16 --16,包含,19=16+2+1
select 19&8 --0,包含,19=16+2+1
select * from SqlBitOperation where FBitTags&4=4
在权限中的应用
1、两张表
(1)、操作与权限标志表
if exists (select * from sysobjects where id = OBJECT_ID('[RightTags]') and OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE [RightTags]
CREATE TABLE [RightTags] (
[Pkid] [int] IDENTITY (1, 1) NOT NULL,
[RightsName] [nvarchar] (50) NOT NULL,
[RightsTag] [int] NOT NULL DEFAULT (0))
ALTER TABLE [RightTags] WITH NOCHECK ADD CONSTRAINT [PK_RightTags] PRIMARY KEY NONCLUSTERED ( [Pkid] )
SET IDENTITY_INSERT [RightTags] ON
INSERT [RightTags] ([Pkid],[RightsName],[RightsTag]) VALU ......
Google dorks sql injection:
inurl:index.php?id=
inurl:trainers.php?id=
inurl:buy.php?category=
inurl:article.php?ID=
inurl:Play_old.php?id=
inurl:declaration_more.php?decl_id=
inurl:Pageid=
inurl:games.php?id=
inurl:Page.php?file=
inurl:newsDetail.php?id=
inurl:gallery.php?id=
inurl:article.php?id=
inurl:show.php?id=
inurl:staff_id=
inurl:newsitem.php?num=
inurl:readnews.php?id=
inurl:top10.php?cat=
inurl:historialeer.php?num=
inurl:reagir.php?num=
inurl:Stray-Questions-View.php?num=
inurl:forum_bds.php?num=
inurl:game.php?id=
inurl:view_product.php?id=
inurl:newsone.php?id=
inurl:sw_comment.php?id=
inurl:news.php?id=
inurl:av ......
现在很多网站都提供了站内的搜索功能,有的很简单在SQL语句里加一个条件如:where names like ‘%words%’就可以实现最基本的搜索了。
我们来看看功能强大一点,复杂一点的搜索是如何实现的(在SQL SERVER200/2005通过存储过程实现搜索算法)。
我们把用户的搜索可以分为以下两种:
1.精确搜索,就是把用户输入的各个词语当成一个整体,不分割搜索.
2.像百度,GOOGLE一样的,按空格把输入的每一个词分离,只要包含这些词语,而不管出现的顺序,称为ALL-Word Search.
3.对输入的词只要有一个出现就为匹配 称为Any-Word Search
一、对搜索结果进行排序的算法
在前面提到的LIKE语句最大的问题就是搜索的结果是没有经过排序的,我们不知道结果出现在的顺序是如何的,因为它是随机的。像百度,GOOGLE都会对
结果用算法进行排序再显示的.好我们也来建立一个简单的排序法。一个很常见的算法是计算关键词在被搜索内容中出现的次数,次数最多的排在结果的第一位。我
们的是在存储过程中实现这个算法的,而在SQLSERVER中没有提 ......
安装SQL Server2005 问题信息:
“SQL Server 安装程序无法获取 ASPNET 帐户的系统帐户信息”
解决办法:
用aspnet_regiis实用工具卸载和重新安装一下就可以了。
具体的操作:
1、进入CMD:
C:\windows\microsoft.net\framework\v2.0.50727文件夹下,运行aspnet_regiis -u卸载
然后运行aspnet_regiis -i 重新安装,上述问题即可解决。
2、C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -u
CMD:
开始卸载 ASP.NET (2.0.50727);
ASP.NET (2.0.50727) 卸载完毕。
安装程序检测到操作过程中出现了一些错误。有关详细信息,请查看安装程序
DOCUME~1\ADMINI~1\LOCALS~1\Temp\ASPNETSetup_00000.log
3、C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i
CMD:
开始安装 ASP.NET (2.0.50727);
ASP.NET (2.0.50727)安装完毕。
再安装SQL Server 2005 ......
Cross Apply使表可以和表值函数结果进行join, 这样表值函数的参数就可以使用一个结果集,而不是一个标量值,下面是book online的原文,有例子,有解释。
The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query. The table-valued function acts as the right input and the outer table expression acts as the left input. The right input is evaluated for each row from the left input and the rows produced are combined for the final output. The list of columns produced by the APPLY operator is the set of columns in the left input followed by the list of columns returned by the right input.
There are two forms of APPLY: CROSS APPLY and OUTER APPLY. CROSS APPLY returns only rows from the outer table that produce a result set from the table-valued function. OUTER APPLY returns both rows that produce a result set, and rows that do not, with NULL values in the columns produced by the table-valued function.
As an example, consider the foll ......