4 December 2010

Multiplication without the multiplication operator (*)

I was asked 2 days ago how to you create a multiplication function without using the multiplication operator?

Eesh, a bit of head scratching and then a while after these were the possibilities
  1. Use a while loop to iterate over one of the values
  2. Use a for loop to iterate over one over the values
  3. Use recursion to call yourself until a drop-out condition occurs
Other things to think about
  1. Negative numbers. If one number is negative then the returning value will be negative. If both are negative or both positive then return positive
  2. Iterate over the smallest number to be more efficient

Change feature id in VSeWSS

Change feature id in VSeWSS

Problem
I tried changing the feature id in the feature.xml file in the WSP view but it created a new feature. This is a bug or part of some of the VSeWSS issues. When I refreshed the WSP view it created a new feature with the original name and a “_1” after it.

Solution
To stop this from happening change the feature id in the solution.xml, in the hidden pkg folder and change the feature id in the generated feature.xml file is the WSP view. That should do it