Related to : I'm a programmer and need a formula for calculating overal ROI

In need for a formula for calculating an ID to a point in 2d space 
Personal Finance 

Basicly I am trying to figure out a formula that calculates a
unique identification number for a dot in 2 dimensional space. Conditions : if f(x,y) = c then there is no other X1, Y1 so
that f(X1,Y1) = c both x and y are integers and c must be also
an integer (double may not be suited since its precision is
questionable and im not sure if it's suited to use as a key in
hashtable).

Calculating image pixel values (e.g. the mean) of Contourinliers using mask & ROI in OpenCV 
Personal Finance 

The problem I want to calculate e.g. the mean value of the pixel
values belonging to a contour given as a vector of Points given by
OpenCV. The image is rather big compared to the contour, that's why i
wanted to set a ROI as big as the bounding_box of the Contour and do
the masking afterwards. However, this does not really work. I get only
zeros as result for mean calculation.
The code with line
numbers
(1) Mat crop = Mat(*img, bounding_box);
//img is the original image (may be 1024*1024) (2) Mat mask =
Mat::zeros(crop.rows, crop.cols, CV_8UC1); //the mask with the size of
cropped image (3)vector<vector<Poin

What is the formula for calculating a timestamp? 
Personal Finance 

Just a random question but does anyone know the formula for how a
timestamp is calculated? I am guessing it has to consider each month
and how many days, leap years, etc.
Thanks

Formula for calculating? 
Personal Finance 

Formula for calculating? What is the
formula for calculating a web hosting businesses' net worth?

Javascript calculating a formula 
Personal Finance 

I am working on changing a percentage value of a panel based on the
screen size of a device.I need to work out the following
formula.Starting at screen width 320 and ending at screen width
1200.If screenWidth < 320 percentageWidth = 98If screenWidth > 1200
percentageWidth = 65From the above I can work out manually that:If
screenWidth = 760 percentageWidth = 82.What is the formula I need so I
can change percentageWidth on a screen width change?CheersSteveW

I'm a programmer and need a formula for calculating overal ROI 
Personal Finance 

I'm programming a web app to track my hedge fund performance. I'd like
to find my overall ROI for all time.If I had a beginning balance and
my current balance then finding the ROI is easy. For instance
((current balance / beginning balance) * 100) to get the
percentage.Where I am having difficulty is in the fact that each week
there are debits/credits to the account.So how can I accurately figure
a lifetime ROI when each week I'm adding/removing funds?Here is an
example weekly report.9
