Friday 15 January 2016

Boxing and Un-boxing


OOPS- Boxing and Unboxing

Object Oriented Programming is a software development style, quite popular in IT industry. Software makes life easy and it more fun when software development is life based. Yes, object oriented programming is based on objects, which means there is nothing technical we have to think for developing software till the first phase of mapping requirements to objects. Its not where we will be playing with functions all the time. Its the object which we will be defining and constructor. It is totally life like. An object would be anything both tangible and intangible.

Well, Boxing and Unboxing are the concepts in OOps.
People get confused all the time between the two.

Well,

Boxing is when we convert value type into type object.


Everything in c# .net is object which means each and everything is inherited from System.Object class. At any point of time, anything is Object and hence can be filled in it without any problem. Therefore, putting anything into object is easy, for example adding water in water, soil in soil, air in air, air in sealed types etcetera, it is easy because the taker and the material are the same at their root level. Hence, boxing is like putting something into a container, the object is a big container, it can take anything, any type into itself, it even can take its own self into itself.It is at memory level a type which is refernce type whihc means it sues both stack and heap to keep and refer data. On stack it keeps the pointer and in heap it keeps the actual data. Heap is big as compared to Stack. In boxing it might be possible we are forcing the object to leave its behaviors and keep everything on stack as value types does.

Unboxing is when converting type object into value type.


It is the reverse of what is happening in Boxing, here we are extracting the Value type from inside the Object. Well, object is a big container, it has to be carefully extracted from it. It might loose data kept inside it[value type]. Object being a big container and when taking out the small value type from it, we need to perform type casting and this casting is specially known as Unboxing. Taking out something from a big box. It is like making the object behave in its natural fashion. Value type back to value types. Hence, making the things natural as they were.

The old non generic lists in c# has the perform both of these while adding and retrieving the data stored in it. It only supported object type. But with new and modern lists , there is a support to generics.
It can be mapped to a type before addition and retrieval of any data.

Thanks and keep hardworking !!!

Ashumeet Mitter

Wednesday 13 January 2016

Pythagoras Theoram

Pythagoras Theorem

.
.     . 
.          .    h
. p            .
.                  .
.                       . 
............................   Right Angled triangle.
          b

Pythagoras is a theorem found in Geometric side of Mathematics.
It ca be applied for solving the problem of finding the length of a base or a perpendicular or hypotenuse of a Right Angled triangle, which is the side opposite to hypotenuse of a triangle to be 90 degrees, where any two from these three is known Basically, it is used to find the length of hypotenuse.

The theorem says,

  p^2 + b^2 = h^2


so, root of ( p^2 + b^2) = h 
similarly,

p = root(
h^2-b^2)


and 

b = root(h^2-p^2), 

Any two from Base, Perpendicular and Hypotenuse have to be known to make this theorem work.

Thanks and keep hardworking !!

Ashumeet Mitter

Beautiful song

Beautiful song from the movie Khanadan or Family(1965)
https://www.youtube.com/watch?v=3vXDRgjtg88

तुम ही मेरे मंदिर, तुम ही मेरी पूजा, तुम ही देवता हो
कोई मेरी आँखों से देखे तो समझे के तुम मेरे क्या हो
(tumi mere mandir, tumhi meri punjaa, tumhi devta ho
Koi meri aankho se dekhe toh samjhe ke tum mere kya ho)
जिधर देखती हूँ उधर तुम ही तुम हो
न जाने मगर किन ख़यालों में गुम हो
मुझे देखकर तुम ज़रा मुस्कुरा दो
नहीं तो मैं समझुंगी मुझसे खफा हो
(jighar dekhte hun udher tum he tum ho,
na jane magar kin khayalo main gum ho,
mujhe dekhkar tum zara muskura do,
nahin toh main samjhunge mujse khafa ho)


तुम ही मेरे माथे की बिंदीयां की झिलमिल
तुम ही मेरे हाथों के गजरों की मंज़िल
मैं हूँ एक छोटीसी माटी की गुड़ियाँ
तुम ही प्राण मेरे, तुम ही आत्मा हो
(Tum hi mere mathe ke bindeya ke jhilmil,
tum he mere hathon ke gajaron ke manzil,
main hun ek chotesee mati ke gudiya,
tumhi pran mere, tumhi atma hon)

बहोत रात बीती, चलो मैं सुला दूँ 
पवन छेड़े सरगम, मैं लोरी सुना दूँ 
तुम्हे देखकर ये ख़याल आ रहा है
के जैसे फरिश्ता कोई सो रहा हो
(bahot raat beeti chalo min sula dun,
pawan chede sargam main lori suna dun,
tumhe dekhkar yeh khayal aa raha hai,
ke jaise farishta koi ga raha hain)

Translation :-

My beloved, I consider you as my temple. You are my God. I worship you.
If somebody look at you from my eyes, then they will understand who you are.
Wherever I look, its you and only you, I am able to find. But don't know why are you in pensive . Please look at me and smile, otherwise I will feel that you are upset because of me.
You are the twinkle of my colored mark on my forehead. You are the destination of the garland of my wrists.I am a little doll made of earth.You are my soul.
Its too late let me make you sleep. Let me sing a lullaby for you as also the wind has started to play music.When I look at you now, I wonder that you are a God who is trying to sleep right now.

Thanks and keep hardworking!!

Ashumeet Mitter

Tuesday 12 January 2016

What are we afraid of?


What are we afraid Of?


We are One human race, there is no factions and 

differences, all the holy books have mentioned this.

Science also agrees, at sub atomic particle level, we are 

one, even the non living thing comes in this range, 

which are basically, matter form of thoughts.

Consciousness, which is an electromagnetic filed, and 

the generator thoughts is at the Spiritual Level. Our 

bodies too are defined by Some Morphogenetic 

Consciousness Field.[Wave Genetics] which is same 

for all the human beings. We have a biological internet 

created by our 98% junk DNA.

Therefore, All the holy books accept that we are one, 

science too, then why we look down upon each other 

,what are we afraid of, why don't we embrace each other.
Thanks and keep hardworking !! Ashumeet Mitter

Fibonacci Series.


Magical Fibonacci series.

The kind of numbers we humans work with are generally have their roots in Hindu Vedic Numbers. Mr Aryabhatta, has been the person who pioneered Hindu Vedic number system. He was brilliant mathematician. He might have 12 starnd DNA. His vision was not ordinary. His inventions are not ordinary.


Well, Zero has been inroduced in India frist, here it is called 'Sunya'. Famous Budhist Philosopher, in India , like Dharmakirti and NagaArjuna produced their philosophies in the light of Sunyta or nothingness. They both tried to look human sufferings from a very different angle. They concluded it is not real, we humans have understood it[the sufferings] from a very different perspective.Hence, we suffer.

Coming to Fibonacci series.  Leonardo Bonacci  has been given the credit of introducing Indian or Eastern mathematics to the west. He was an Italian mathematician. In his work popularly known as Liber Abaci or the free arithmetic device, has all the theorems and number system which he learned from Indian. In this very collection of his, there is a mention of Fibonacci series.  In Indian Vedic Number system , Pingala has been the founder of these series. His work has been recorded many centuries before Leonardo. It is actually Pingala Series, anyways.

Lets take a closer look at the Fibonacci series, till 500.
It seems a big mess but it is not. It is a beautiful 

series which can be found followed by Nature itself 

and this thing makes it magical and divine. 

It is the sum of consecutive numbers. When two 

numbers are added, then the second number would 

be added to the result of addition of those two 

numbers and this goes on till infinity. This series is 

simply called Fibonacci. 

Don't you think we are the result of 

sum total of our parents, genetically, and their 

parents and their parents and their parents and so on.
We are a Sum at a point in this Fibonacci series of our 

DNA. 

Thanks and keep hardworking !!!


Ashumeet Mitter