Thursday, December 21, 2023

Maha Mrityunjaya Mantra a.k.a Moksha Mantra!

ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् |

उर्वारुकमिव बन्धनान्मृत्योर्मुक्षीय माऽमृतात् ||

Aum Tryambakam yajaamahe sugandhim pushtivardhanam |

Urvaarukamiva bandhanaan-mrityormuksheeya maamritaat ||


Preface

The cosmos is a whirlwind of actions that perplexes and bewilders us with its contradictions.

The Maha-Mrityunjaya Mantra stands as a supreme and comprehensive representation of our aspirations amid this confusion.

One of the most revered and profoundly purifying mantras "Maha" translates to "great," while "mrityunjaya" signifies triumph over death.

Did you know it's also referred to as the Moksha Mantra? This sacred chant bestows blessings of health (Arogya), longevity (Deergha-Ayus), serenity (Santi), prosperity (Aisvarya), abundance (Pushti), contentment (Tushti), and ultimate liberation (Moksha).

Beginning

It commences with 'OM,' the primal sound encapsulating the three dimensions of existence—the recurring cycle of Srishti, Sthiti, and Samharam (Creation, Preservation, and Dissolution).

Its profound purpose lies in reminding us of our life's true meaning.

"Born into this realm of illusions for a fleeting moment, I aspire to bloom like a flower, spreading fragrance and thriving on the nourishment bestowed by the earth. Similar to the gourd, firmly attached to its stem but detached upon reaching maturity, I aim to fulfill my purpose on this planet and ultimately free myself from all limitations. Just as the gourd naturally breaks free from its strong bond, in my passing, I yearn to achieve liberation from all attachments. I seek not immortality, but release from all constraints."

And like all eternal mantras, myths, stories, and scriptures, they carry personified imagery for us to remember. In this mantra, we encounter "Thrayambakam," which signifies the Three Eyes of Shiva, and for us:

  • The physical eye that perceives the world around us.

  • The mental eye that conceives and comprehends.

  • The spiritual eye whose awakening allows us to glimpse beyond the illusion of the Universe (Maya).

Remember this to lead a righteous, Dharmic life!

Related Stories to follow soon.


Tuesday, July 20, 2010

Dilbert's Salary Theorem - Proved

THEOREM

Dilbert's "Salary Theorem" states that:
"Engineers and scientists can never earn as much as business executives and sales people."

This theorem can now be supported by a mathematical equation based on the following two postulates:
1. Knowledge is Power.
2. Time is Money.

As every engineer knows: Power = Work / Time
Since: Knowledge = Power, and Time = Money, then Knowledge = Work / Money
Solving for Money, we get: Money = Work / Knowledge

Thus, as Knowledge approaches zero, Money approaches infinity, regardless of the amount of work done.

Conclusion: The less you know, the more you make.

QED.

Wednesday, May 12, 2010

Object serialization and GSON to/from JSON

If you have a serializable java object and want to ship it over to another server than you may want to consider using GSON/JSON. I ran into an issue where a complex serializable object would not convert to JSON using GSON.TOJSON method.

so, I used the old trick in the book. For the sake of discussion assume that "SomeObject" is the java object which needs to be shipped as JSON back and forth client/server

on the client side

Step 1. convert the java object to byte[] (serialization)



ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(SomeObjectTobeSerialized);
oos.close();
baos.toByteArray();


Step 2. use GSON.toJSON. This shall convert the byte[] to JSONArray.

JSONObject json = new JSONObject();
json.put("BODY", serializeObject(SomeObject)); // serializeObject is the method whose body is Step 1 above


Now, send the JSON over to server via any of your favorite mechanism.

one the server side

Step 1. read the JSON from the request (HttpServletReq) object


StringBuilder sb = new StringBuilder();
BufferedReader reader = req.getReader();
String inputLine;
while ((inputLine = reader.readLine()) != null) {
sb.append(inputLine);
}

JSONObject jsonRequest = new JSONObject(sb.toString());


Step2. deserialize JSONArray sent over by client

JSONArray serializedObject = jsonRequest.get("BODY")
byte[] bytes = new byte[serializedObject.length()];
InputStream is = null;
ObjectInputStream ois = null;
SomeObject str = null;
try {
int read = 0;
while (read < bytes.length) {
bytes[read] = (byte)serializedObject.getInt(read);
read++;
}
is = new ByteArrayInputStream(bytes);


ois = new ObjectInputStream(is);
str= (SomeObject) ois.readObject();


So, you get "SomeObject" back deserialized and intact.

Saturday, March 28, 2009

haircutting at home

I never expected that cutting hair at home could be that easy. I bought $15 hair cutting kit today and gave myself a nice spiked style.

Cutting hair took me a bit longer than expected. It took me a while to imagine the hair style and how to proceed with the cut. In the end it all came out well.

I highly recommend you all to give it a try!