Testing Google’s syntaxhilighter

by Brian | 25th June 2009

Google’s syntaxhilighter. I’m using a WordPress plugin.

	//Match to forward string
	char queryAcid;
	for (i=0; i<queryLen; i++) {
		queryAcid = acidArrayAsInts[i];
		//if the maxLen is already bigger than/equal to from i to the end of the querry string, then we can
		//safely exit and save a lot of processor time.
		if (maxLen >= queryLen - i - 1) break;
		for (j=0; j<seqLen; j++) {
			if (queryAcid == sequence[j])
			{
				k = 1;
				while (((i+k)<queryLen) && ((j+k)<seqLen) && acidArrayAsInts[i+k] == sequence[j+k])
					k+=1;
				if ((k>1) && (k>maxLen))
				{
					maxLen=k;
					positionQ=i;
					positionS=j;
				}
			}
		}
	}

Leave a Reply

Name (Required)

Email (Required - will not be published)

Website

Message (Required)