Pages

Wednesday, September 15, 2010

Making HTML div scrollable

suppose you want to make a HTML div scrollable and limit it to a certain width and height. You can achieve this by using the following code
<div style=”width:500px, height:600px, overflow=auto”> </div>

That line of code will set the div to 500 x 600 and if the content of the div exceeded that size, the div will become scrollable automatically. The parameter responsible for this effect is: overflow=auto

Javascript Optional Function argument

Let say you have a javascript function as follows
function jFunc( param1, param2, param3 )
{ 
// your function here…;
}

you can make the parameter of jFunc optional by using

if( param2 == undefined)
{
//do something here
}
if( param3 == undefined)
{
//do something here
} 

Stock Intrinsic Value Calculator

This Stock Intrinsic Value calculator will calculate the Fundamental Stock Intrinsic value using the Discounted Cash Flow Model.

Instruction

  • Enter the initial Cash flow for this current year.
  • Enter your estimate for the cash flow growth rate (E,g, For 10% enter 0.1, for 25% enter 0.25).
  • Enter the estimated inflation rate (E.g. For 15%, enter 0.15, for 5% enter 0.05)
  • Enter the number of years you wish to project, typically 10 years
Initial Cash Flow
Cash Flow Growth Rate
Inflation Rate
Projected No. of Years