Question : In an analog clock for 25 minutes duration how much does the hour hand will move ? ?? ???? …….. ?????? Answer : 12.5 degree . Explanation : Analog clock is 360 degree. For 60 minutes the hour hand will move 30 degree. So for 30 minutes the hour hand will move … Continue Reading
Monthly Archives
July 2012
PHP 5.4 overview
1. Traits feature is added. Traits is used to reduce the limitations of single inheritance. A Trait cannot be instantiated on its own. Traits allows its methods to be reused in several independent classes. Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<?php trait Hello { public function sayHello() { echo 'Hello '; } } trait World { public function sayWorld() { echo 'World'; } } class MyHelloWorld { use Hello, World; public function sayExclamationMark() { echo '!'; } } $o = new MyHelloWorld(); $o->sayHello(); $o->sayWorld(); $o->sayExclamationMark(); ?> |
In the above example code we define a trait using the keyword trait followed by its definition. We can … Continue Reading
Apple puzzle, interview question.
Question: There are 6 people sitting in a room around the table. On top of the table there is a basket with 6 apple in it. All person took one apple each but still one apple was left in the basket. How !! ?? thinking ??? still thinking ??? the answer is very … Continue Reading
How to create sub menu in magento admin from custom module
As a Magento Developer sometimes we may get a requirement to create a new menu item/ sub menu in magento admin panel. In todays article we see the steps to create a sub menu under an existing top menu in adminpanel.So for this example the sub menu will be created under customers menu. We can … Continue Reading