Qualys项目中写到将ServerIP以“,”分割后插入数据库并将重复的IP去除后发送到服务器进行Scan,于是我写了下面的一段用来剔除重复IP: //CR#1796870 modify by v-yangwu, remove the IPs which are repeated. string[] arrayIP = ipAll.Split(','); List<string> listIP = new List<string>(); foreach (string ip in…
--复制另一个数据库中的某张表的结构及数据--select * from Test.dbo.TestTable(查询表中所有数据) --into [表名] 插入当前数据库新表,如果没有该表就创建 select * into TestCopy from Test.dbo.TestTable --只复制表结构(1!=1等价于1<>1,只要where后的为false就可以)--把查询出的数据插入到新表,如果没有数据就只是复制表结构了select * into TestCopy from Test.d…
去除字符串中的html标记及标记中的内容 --1.创建函数 create function [dbo].[clearhtml] (@maco varchar(8000)) returns varchar(8000) as begin declare @i int while 1 = 1 begin set @i=len(@maco) set @maco=replace(@maco, substring(@maco,charindex('<',@maco), charindex('>',@mac…
/** 取出字符串中重复字数最多的字符 */ var words = 'sdfghjkfastgbyhnvdstyaujskgfdfhlaa'; //创建字符串 var word, //单个字符 length; //该字符的长度 //定义输出对象 var max = { wordName : '', //重复次数最多的字符 wordLength : 0 //重复的次数 }; //递归方法,传入字符串 (function(words) { if (!words) return; //如果字符串已经…