Recently, ESET add my domain name to the black-list of their database. You can’t open my site and been warned my site is not safe if your PC is running the ESS or EAV. Why Eset block my site?The answer is obvious. That is reason that you come here. I promise that my site is pure, no virus, no spyware, no Trojan, no pop ads. You can test my word through intalling Kaspersky or other Antivirus Software. If you want open my site and take latest escalation ID & Activation Code, close your ESET software(disable antivirus and antispyware protection function temporarily) or by proxy or virtual machinor. You can also feed the RSS source http://feed.loserblog.cn.
Home > Programm > The javascript checks to seek a phrase sentence

The javascript checks to seek a phrase sentence

//Find out a two pieces text to originally win a same single phrase short sentence
<SCRIPT LANGUAGE="JavaScript">
function meizz(a, b, n)
{
var c=a.length>b.length?b:a;
if(b==c) b=a; a=c; //Do some circulations less
if(!n) n=1;
var mm = new Array();
for(var i=0; i<a.length; i++)
{
for(var j=i+n; j<=a.length; j++)
{
var s = a.substring(i, j);
if(b.indexOf(s)==-1)
{
if(s.length>n)
{
mm[mm.length] = a.substring(i, j-1);
i = j-2;
}
break;
}
else
{
if(j==a.length)
{
mm[mm.length]=s;
}
}
}

}
return mm.Unique().join(","); //The repeated item cleaned severals inside
//return mm.join(",");
}

Array.prototype.Unique = function()
{
var a = {}; for(var i=0; i<this.length; i++)
{
if(typeof a[this[i]] == "undefined")
a[this[i]] = 1;
}
this.length = 0;
for(var i in a)
this[this.length] = i;
return this;
};


Var a="we are the best";
Var b="we aren't the most bad";
//Result get"we"&"BE most"
Alert("return of result:"+ meizz(a, b, 2));
</SCRIPT>

Categories: Programm Tags:
  1. No comments yet.
  1. No trackbacks yet.
  • Partner links