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…
import java.util.Scanner; public class Number { private static Object i; /* *第一题 mingrikejijavabu中字符“i” 出现了几次,并将结果输出*/ public static void main(String[] args) { String r ="imingrikejijavabi"; //第一种 截取 int a=0; for(int j=0;j<r.length();j++){ St…
/* 1.是否以某字符串结尾 endsWith(theStr,endStr) @param theStr:要判断的字符串 @param endStr:以此字符串结尾 @return boolean; */ function endsWith(theStr,endStr) { var theStrLength=theStr.length; var endStrLength=endStr.length; var theStrEnd=theStr.substring(theStrLength-endS…