October 13, 2020

How to Create a Calculator in HTML, CSS and Javascript | Digital Rachana

 







<html>
<head>
<title></title>
<style>
form{width: 300px; }
input{padding:10px; margin:5px; border-radius:5px}

</style>
</head>
<body>

<form name="calculator" >
<input type="textfield" name="ans" value=""><br>
<input type="button" value="1" onClick="document.calculator.ans.value+='1'">
<input type="button" value="2" onClick="document.calculator.ans.value+='2'">
<input type="button" value="3" onClick="document.calculator.ans.value+='3'">
<input type="button" value="4" onClick="document.calculator.ans.value+='4'"><br>
<input type="button" value="5" onClick="document.calculator.ans.value+='5'">
<input type="button" value="6" onClick="document.calculator.ans.value+='6'">
<input type="button" value="7" onClick="document.calculator.ans.value+='7'">
<input type="button" value="8" onClick="document.calculator.ans.value+='8'"><br>
<input type="button" value="9" onClick="document.calculator.ans.value+='9'">
<input type="button" value="-" onClick="document.calculator.ans.value+='-'">
<input type="button" value="+" onClick="document.calculator.ans.value+='+'">
<input type="button" value="*" onClick="document.calculator.ans.value+='*'"><br>
<input type="button" value="/" onClick="document.calculator.ans.value+='/'">
<input type="button" value="0" onClick="document.calculator.ans.value+='0'">
<input type="button" value="." onClick="document.calculator.ans.value+='.'">
<input type="button" value="=" onClick="document.calculator.ans.value=eval(document.calculator.ans.value)"><br>
<input type="reset" value="Reset" width="">

</form>

</body>
</html>

January 02, 2020

Quote of the Day- Write a Beautiful Story for Yourself


inspirational quotes





"A new year is like a blank book. The pen is in your hands. It is your chance to write a beautiful story for yourself."

3 Pieces of Advice that can Transform your Life | Story of Three Jewels

Once a man was walking in the forest and he happened to see an exotic bird sitting on the branch of a tree. Being very charmed by it and wanting to have it as a pet, he tiptoed towards it from behind and caught it.

To his utter surprise, the bird started talking and it said to him, "Please release me. In return, I shall give you three gems- three valuable pieces of advice that can transform your life." I will give you the first one only when you let me go, the second one when I fly up to that branch, and the third one when I fly up high to the very top of this tree. The man instantly agreed, and let the bird go. 

story of the 3 jewels

As soon as it was freed, the bird started flying up as it said, "Here's the first gem- my first piece of advice- "Do not torture, torment and burden yourself with excessive regret for your past mistakes."
As the man pondered over what he had just heard, the bird flew up, sat on a branch and spoke back, and the second one is-"Do not believe anything that goes against common sense unless you have first proof." The man then saw the bird fly to the very top of the crown of the tree. It started laughing and said to the man, "You are a fool. There are two huge jewels within my body. If you would have kept me and killed me, instead of letting me go, you would have been the master of these precious jewels and would have become instantly rich."

"Oh my God!" the man exclaimed. "How could I have been so stupid? I will never be able to forget this foolishness for the rest of my life. Oh bird, can you at least give me your last the third piece of advice? Maybe that will have the potential to pacify me."

The bird replied I was just testing you. You asking me for further advice but did you even realize that you have already disregarded the earlier two pieces of advice I gave you. First I told you not to torment yourself with excessive regret for past mistakes and yet you just tormented yourself with regret for letting me go. And second, I told you not to believe in things that go against common sense unless there is firsthand proof and you disregarded that advice as well for some reason believing that there could be two huge jewels inside a tiny bird like me! But since you have asked me now for the third piece of advice here it is: "If you are not applying what you already know, there is no point being so intent on gaining what you do not know." Saying so the bird flew away as the man received these three jewels that would positively change his life to come.

Moral of the Story: Never forget these 3 things: We all make mistakes- don't be too harsh to yourself and keep punishing yourself and tormenting yourself for what has already been done and can not be undone. 
"Learn your lesson & move on
Be sharp. Be smart. Don't evaluate things by face value. "Use your reason, discretion before accepting and trusting something or someone."

If you do not digest what you have received by applying it you are not ready for more. Life gives you more only when you use what you have rightly.


You may also like:-

Don't Wait for Happy Moments- Just Enjoy Life



November 24, 2019

The Baby Camel and Mother | Right Place for Right Things

One day a camel was lying under a tree, watching her baby, playing near a river. Then the baby camel come to her and said,"Mother, I have some questions which are bothering me, may I ask you?" The, mother said,"Sure dear, tell me,what is bothering you?"

baby camel and mother

The baby asked, "Why do camels have hump?" The mother said,"Dear son, we are desert animals and we need the humps to store water so that we can survive without water."

Story of Two Frogs | Be Deaf to Discouraging Words

Once, a group of frogs were hopping around in one beautiful morning. Suddenly, two of them fell into a pit. When the other frogs saw how deep the pit was, they told them that there was no hope left to come out of the pit.

moral story of two frogs


However, the two frogs ignored their comments and tried with all their efforts to jump out of the pit. The other frogs at the top of the pit kept telling them that they should just give up as it was impossible to come out of the pit.