Oct 28

Below are some useful link for my reference.

Chowder Rule – http://seekingalpha.com/instablog/728729-chowder/2360292-the-chowder-rule

“Buy stocks that meet the Total Dividend Return (TDR) rule a/k/a the “chowder rule,” requiring a yield plus Five year Dividend Growth Rate (DGR) total of 12% or more. In the case of utilities, MLPs and REITs, the total is 8% or more.”

Stock Analysis – http://seekingalpha.com/article/4015814-new-southern-company?app=1&uprof=45&isDirectRoadblock=true

Calculation Example

The dividend growth rate can be calculated linearly by taking an average or geometrically for more precision. As an example of the linear method, consider the following.

A company’s dividend payments to its shareholders over the last five years were:

Year 1 = $1.00

Year 2 = $1.05

Year 3 = $1.07

Year 4 = $1.11

Year 5 = $1.15

To calculate the growth from one year to the next, the following formula is used:

Dividend Growth = Year X Dividend / (Year X – 1 Dividend) – 1

In the above example, the growth rates are:

Year 1 Growth Rate = N/A

Year 2 Growth Rate = $1.05 / $1.00 – 1 = 5%

Year 3 Growth Rate = $1.07 / $1.05 – 1 = 1.9%

Year 4 Growth Rate = $1.11 / $1.07 – 1 = 3.74%

Year 5 Growth Rate = $1.15 / $1.11 – 1 = 3.6%

The average of these four annual growth rates is 3.56%. To confirm this is correct, the following calculation can be used:

$1 x (1 + 3.56%) ^ 4 = $1.15

Growth Rate Used in Dividend Discount Model

The dividend discount model is used to value a company’s stock based on the idea a stock is worth the sum of its future payments to shareholders, discounted back to the present day. The formula takes into account three variable to arrive at a current price, P. They are:

D1 = the value of next year’s dividend

r = the cost of equity capital

g = the dividend growth rate

The dividend discount model’s formula is:

P = D1 / (r – g)

In the above example, if it is assumed next year’s dividend will be $1.18 and the cost of equity capital is 8%, the stock’s current price per share is:

P = $1.18 / (8% – 3.56%) = $26.58

Dec 08

Finally released the new adroid app ..

UsedGaadi.in – used car market – Android Apps on Google Play
UsedGaadi.in – India’s newest used car market.Let us help you find your next car Search for a new or used car with your Android. UsedGaadi.in is india’s newest online…

Tagged with:
May 17

Nowadays having SEO friedly links is very important if you want to list higher on the search engines. And with JSF this can be a big pain in the a**. There is an extension available called prettyfaces. For my applicaiton i thought of first using prettyfaces rather then developing my own enhancement to save me some time. But then i ended up developing my own prettyfaces:) as i wanted some extra functionality specific to my application which wasn’t possible using prettyfaces.

So i have my own custom tag called this tag along with some other params takes in the href paramter and rewrites it to a SEO friendly link and outputs it.

Then when this link is clicked you need to convert it back to the normal link for example with parameters. For that you need to have a servlet defined in your web.xml which gets the SEO friendly URL rewrites it to a normal url and then dispatches it to your faces servlet.

If you want to have a look at my application using this enhancement to convert the links to SEO friendly links visit www.usedgaadi.in, its running on JSF!

Tagged with:
May 17

If you are using hibernate or ejb, am sure you cache your entities using either ehcahce or JTreeCache or some other cache available. But to boost the performance you could also cache your pages or some fragments like some includes.

For my application i have used ehcache .. and for that everything is explained in detail here

The only problem i encountered was that it also cached my post request .. in order to exclude all my post request from being cached i overrode the methode caclulatekey to return null for post requests .. Am sure there is some configuration variable which one could set in the web.xml or ehcache.xml but i was to lazy to search ;) ..

protected String calculateKey(HttpServletRequest httpRequest) {
        if (httpRequest.getMethod().equals("POST"))
            return null; ...

You could then use some custom tag for caching some parts of your page. for e.g seam has a tag you could also have a tag similar to that and cache your page fragments.

Tagged with:
Jul 16

Came across these two javascript based page flipping effect tutorial .. so thought of posting it ..

this one has some nice effects and its totally flash free

http://www.jquerymagic.com/wp-content/uploads/jflip/

and this one

http://clickheredammit.com/pageflip/

Tagged with:
preload preload preload