Ok got across the Nullabor and at Esperence now. There was a guy in the Nullabor cafe using a wireless Laptop(get online anywhere nearly now in Australia). I thought the Nullabor would have been more then just a Roadhouse, there ain't much out there.
I have made the changes and uploaded the Median and Mean calculators. Thanks for that tonyd you've made a contribution. I used RedWings example number set in both of them. So that be good now, can see the mean and median and learnt something.
Simple ,easy to understand and most importantly not cluttered.
That's good to hear that's what I set out to do. Just can't stand site where there is so much crap all over the place that you can't see what’s in them. Anyone is supposed to be able to use these calculators down to the mum's & dad investors.
Why did I choose a percentage of the annual expenses? - Because I looked at the example for the other calc and the annual expenses came to around 2.5% of the purchase costs. It can be altered then in percentage terms. What's your logic to how it should be?
Is there a graphics display? - What do you mean by this? The next lot of calc's I do will have pie chart display graphs in them though they only really serve to look good. But yeah looking to get some graph's in them.
Still getting to the deposit thing.
Below is the code I used to make it happen, does it make cense to you, as you can see I know two languages. The degree of how well I know those languages varies
.
I got a coder to do that! This is actionscript code for flash.
Code:
//Here is the new function to find the median from an array of values;
function getMedian() {
//Create a new array to store the values;
var a = new Array();
//Loop over all variables
for (var i = 1; i <= 20; i++) {
//If "mead"+i is not equal to zero, add its value to the array;
//This negates the need for a separate box where the user writes how many boxes they filled;
var val = Number(eval("mead"+i));
if (val > 0 && !isNaN(val)) {
a.push(val);
}
}
//Sort the array;
a.sort(Array.NUMERIC);
//Find the middle value;
var m = (a.length - 1) / 2;
//If m is an integer, then just return that value from the array;
if (m%1 == 0) {
return a[m];
}
//If not an integer, return the average of the two values either side;
else {
return (a[m-0.5] + a[m+0.5]) / 2;
}
}
//Set the onPress behaviour;
calcMedianbtn.onPress = function() {
meadianPrice = getMedian();
}
stop();
Math.formatDecimals = function(num, digits) {
if (digits<=0) {
return Math.round(num);
}
var tenToPower = Math.pow(10, digits);
var cropped = String(Math.round(num*tenToPower)/tenToPower);
if (cropped.indexOf(".") == -1) {
cropped += ".0";
}
var halves = cropped.split(".");
var zerosNeeded = digits-halves[1].length;
for (var i = 1; i<=zerosNeeded; i++) {
cropped += "0";
}
return (cropped);
};
Let me know if anything doesn't calculate right still!!