Many times when working on code, I search for the occurrences of variables with similar names. For examples, find all matches of var1 and var2 as:

/\&lt;var1\&gt;\|\&lt;var2\&gt;


Now I really like the Highlight Search feature of Vim, b/c once I do the search, all the matching instances pop out in yellow color.

Is there a way to assign different colors to different terms in the search string? That is, all matches of var1 be yellow and of var2 be green?


Question: Gaussian blur - convolution algorithm
Answer: 
I think the custom power/exponent methods are a probably waste of time when Math.pow and Math.exp would do just as well in this context.
The X/Y passes can be identical except the direction the bell curve is applied in. I'm assuming the extra passes are to handle the edges, but I think you might come out ahead by just doing 2 passes and perform clipping as you go.
I think I see some bit-hacking tricks to avoid some divides after going through the inner multiplication loops. I'm not convinced that doing this and going through all the averaging stuff is going to be faster than just doing two simple passes using multiples in the inner loop and 3 integer divides when the loop is complete.
Some multiplies can also be eliminated when writing to the temp array by making another array containing the offsets for each row. Like this:

temp = new int[w * h];  
row = new int[h];

// make row offsets  
for(int i = 0; i &lt; h; i++)  
    row[i] = w * i;  

// write a pixel  
temp[x + row[y]] = color;  

// read a pixel  
color = temp[x + row[y]];  

Try to avoid calling methods within the X loops, they probably have a bigger overhead than you want for this.