Unwinding Thoughts … :)

I do not know where to begin from, but I have been thinking for the past few days about blogging on this.

It has been three years, and it feels just like yesterday. I am back home for sure, but it’s not the same me who was three years back. As I look back, I see how much of my thoughts have changed after staying at one of the most beautiful place anyone could ever wish for in a lifetime. Having got the opportunity to stay with a living master, what else could one ask for in life, although I have probably still not understood its significance or how fortunate I have been.

Today when I look back at the turnover of the events that happened to me three years back, I feel only more than grateful for having been among those chosen ones who got this opportunity.  Everything there was so beautiful and in total rhythm with nature.

When I heard my Master sing, my heart sank. When She whispered in my ears, all thoughts ceased. When She hugged me, there was nothing more in life that I even wanted…

I do not know how to continue, but this has been the most precious and the most lovable journey in my life.  I do not know how to be thankful, but it’s the best gift life has ever given me.

My thanks to all those who made these 3 years so beautiful :)

Love and prayers,

aishwarya

Heya!

I was trying to retrieve a .bmp image stored as a MediumBlob in my MySql database using Java. On retrieval, the image is stored in a directory.

The concept goes as follows:

  • First, you create a .bmp file in a directory in which you wish to store the image. (Say, image.bmp)
  • Create an object of FileOutputStream (As FileOutputStream is meant for writing streams of raw bytes such as image data, and you would want to write the content of MediumBlob in the file image.bmp)
  • Create a byte array. (to hold the content of MediumBlob)
  • Use InputStream to read the byte data.
  • Write into the FileOutputStream object you created in step 2.

The program looks simple and make things much clearer.

File image = new File(“path to directory/image.bmp”);
FileOutputStream fos = new FileOutputStream(image);
byte[] buffer = new byte[1];
InputStream is = actual_result.getBinaryStream(2);  //2 refers to the index of image stored in your table
while (is.read(buffer) > 0)

{
fos.write(buffer);
}
fos.close();

Cheers,

aishwarya :)

Invoke Matlab from Java

For a long time, this topic remained in the drafts of my mind, so finally decided to blog on it!

There are many reasons why would want to call matlab from Java.

Simple reason being, MATLAB is a technical computing language mainly used for algorithm development, data analysis, visualization, and numerical computation. Using MATLAB, you can solve technical computing problems faster than with programming languages, such as C, C++, and Java.

To differentiate your technical computing workspace, you probably need a traditional programming language such a C, Python or Java. I will be discussing here, how to invoke your Matlab program from Java.

Pre-requisites:

1. Matlab program (The program you wish to invoke. Optionally, you may also use an in-built Matlab function, in that case this not being a necessity).

2. Java file.

3. matlabcontrol 4.0 (You can get it from here )

Getting started:

First, let me explain what matlabcontrol is, and then we shall jump into coding.

matlabcontrol is a Java API that allows for calling MATLAB from Java. Interaction can be performed from either inside MATLAB or outside MATLAB (Of which, I will be discussing outside matlab).

The basic usage pattern with matlabcontrol is

  • to create a factory
  • to create a proxy. (The proxy is used to communicate with MATLAB).

To begin with, you need to add the matlabcontrol 4.0. jar file into your program.

If you’re using Eclipse, you may want to do the following:

Once you create a Java project,

  • right click on your project(displayed on the left part of your screen)
  • Build Path – > Add External Archives
  • Browse the path to locate your .jar file and add it.

Let’s code now!

The code follows the steps mentioned above with required comments.
import matlabcontrol.*;

public class InvokeMatlab {

public static void main(String[] args)
throws MatlabConnectionException, MatlabInvocationException
{
// create proxy
MatlabProxyFactoryOptions options =
new MatlabProxyFactoryOptions.Builder()
.setUsePreviouslyControlledSession(true).setHidden(true)
.build();
MatlabProxyFactory factory = new MatlabProxyFactory(options);
MatlabProxy proxy = factory.getProxy();

// call builtin function
proxy.eval(“disp(‘hello world’)”);

// call user-defined function (must be on the path)
proxy.eval(“addpath(‘F:\\Matlab’)”);
proxy.feval(“Sample”);
proxy.eval(“rmpath(‘F:\\Matlab’)”);

//Set a variable, add to it, retrieve it, and print the result
proxy.setVariable(“a”, 5);
proxy.eval(“a = a + 6″);
double result = ((double[]) proxy.getVariable(“a”))[0];
System.out.println(“Result: ” + result);
proxy.exit();

// close connection
proxy.disconnect();

}
}

Time again!

At night, as she walked along the shore,

She would stop at the edge;

Cast a straight glance across the boundary,

and let the shudders touch her tiny feet.

 

Immersed in deep thoughts

she was, unaware and uncanny.

It was her way to bear up, thus she believed,

although, never understood, never obliged, by any.

 

Some days went by thus,

Until one day, she reached a place

Dumbfounded, she stood still,

Letting her eyes fixed on – all that it craved for.

 

Slowly, gradually, with time,

She thought she went.

But Alas! She could no longer keep pace

With time, that moved faster than she could reach.

 

Thus, in a gentle swift,

all was washed away,

but she knows, it’s time to begin again,

and it’s the only way!

 

(dated 8th April, 2012)

aishwarya

The Math world

‘Math’ always gave me extra nerve ever since I can remember. It was possibly the only subject that caught my interest early in life.

I remember having learnt Vedic Mathematics during my high-school days. But, to the credit of my memory, I barely find any remains. It’s been a while that I have been thinking to brush up those tricks…and the way I thought I could share is to blog! So, here I go…

Starting with something really basic, I would like to write on how to find the squares of numbers ending with ‘9’.

Step 1:

Add 1 to the number whose square you want to find.

For e.g. let’s suppose your number is 59. Add 1 to it. 59 + 1 = 60.

Step 2:

Add the two numbers. 59 +  60 = 119   …. Result (1)

Step 3:

Find the square of the number you got by adding 1 to your original number.

60^2 = 3600                                                   ….Result (2)

(Pretty straightforward, as 6^2 = 36, append two zeros to your answer)

Step 4:

Subtract Result (1) from Result (2)

i.e. 3600 – 119 = 3481.

Yippee..that’s your answer! Kind of neat and simple. It needs to be constantly used, to avoid yourself from forgetting it!

Upcoming more…

Cheers till then,

aishwarya :) :) :)

Holi Hai!!!

Kanha ne radha sang kheli holi,

Rango se mast hui gwalo ki toli,

Aapki bhi bhar jaaye khushiyon ki jholi,

Hamari taraf se aapko Happy and Colorful Holi!!!

It’s been 3 years since I played Holi. This time, I was unexpectedly at home during Holi. Although I came here for altogether another reason, I had no plans for any celebration.

Work, assignments and exams have always kept us busy, but my joy knew no bounds when my childhood friends decided to catch up and celebrate in spite of their hectic schedule.

It was fun splashing water colors with pichkaari, bursting balloons, applying rang on faces (and also in air) and our traditional Ganga snaanam.

I remembered my childhood days; it was as if all those days had come back  :) . Just like kids we played and enjoyed. :)


I will never forget this celebration…forever imprinted…

Cheers,

aishwarya :)

An interview experience

Two days back, I received an Interview call letter for the MBA Admissions at Amrita University.

Although I was not prepared, I anyway decided to give it a shot. The only specialization that matched my area of interest was Systems. So, I mentally prepared my mind about what I would want to speak about in the Interview. I had relatively zero knowledge about business issues, finance, marketing or whatever! It has never attracted my thoughts.

The Interview was to be conducted at the Amrita School of Business, Kochi. I reached Kochi a day before. As far as the preparations for the interview, I read a bit of basics of what I learnt all these three years and caught up with some current news.

19th February, 2012 at 8.30 am. I got myself marked present and waited at the lobby to be called in. As I sat there, I got reminded of a stress interview I went through as a part of a Best Manager Competition. I utilized the time left to ponder on what made me stand apart that day.

It was 9.15 when they called us in. We were about 25-30 students. First, we were shown a presentation, followed by a Q&A. Then, the selection process was to begin.

We were taken to a room and were given 3 topics:

1. Effect of spirituality on business management.

2. Need of social entrepreneurship in India.

3. Social networking sites – a boon or a bane.

We were given 6 mins – 1 min to organize our thoughts and ideas, and 5 mins to jot it down on a paper. I chose to write on the first topic.

Next was the documents scrutiny. Following it, in a matter of say 7 mins, i found myself outside the interview room. I was supposedly the first person to be interviewed for the day!

I tried to remain calm and relaxed. I decided to take it in what come way.

In less than 5 mins I was called in.

There were two interviewers, and to my luck, I had a Professor from IT and Systems in my Panel. I greeted them and was asked to take a seat. They first asked me to introduce myself and then about my area of specialization. From then on, was a great time! They asked me to speak about my final year project, about my favorite programming language, software project management. They stuck to the basics. I also got to speak about my long-term goal, to which they were kind enough to share some guidance. They said the Bangalore campus would probably me more apt since it specializes mainly systems. And being a dual-degree programme(MBA from Amrita University and MS from University of Buffalo), it is definitely an added advantage.

I was asked to speak about some current issues and my views in it. On a light moment, one of them asked me if I had seen the latest ad my The Hindu – its reply to The Times. On reaching home, I first viewed the ad, and found the HINDU ad and its signature line – ‘ be ahead of the times’ really captivating! (Although I prefer reading TOI than TH).

In case, you haven’t seen it yet, check the out for the TOI and TH ad’s back to back.

The interview continued for a long time, and I remained unaware of the passing time. I found myself at ease throughout the session. They asked me if I had any questions in the end. I asked how would ASB help me achieve my long-term goal, to which they gave me some really valuable advice!

I would not call it a perfect interview, it was convincing though(thus I believe!). At the end of the day, it was all over. Let’s wait and watch what’s store in future!! :)

Cheers,

aishwarya :)

A new found Love

It has been over a few months since I began learning to play the violin – and with no prize for guessing, it has become my new found love.

My mind rushes to a new rhythm of joy whenever I play it.

As my fingers reach the strings and the bow sways to and fro to the sound of the Sa Re Ga Ma… swaras, I am suddenly reminded of those early days of my music class. Frankly, I never enjoyed it then.

Today, it’s the same notes, but my outlook towards the same has taken a new shape ever since I began my advent with the violin.

It’s hard to believe it’s the same me, but I am enjoying every bit of it!!!

Three cheers!

Aishwarya :)

Well, I was trying to connect to the Internet in Ubuntu 11.04.

After umpteen trials and failure, it finally got connected.

So, here’s how you go.

1. You need to install first the wvdial package.

   For more help on that, visit http://gamblis.com/2011/05/29/how-to-install-wvdial-in-ubuntu-11-04-offline/

   Download the necessary .deb files and install it in the order specified using the Ubuntu Software Center.

2. Once your done with that, go to the Network manager on the top-right of your Ubuntu screen.

Click Edit Connection.

3. Select ‘Mobile Broadband’ menu in the window that pops up. Then click the “Add” button.


4. Now, what you see is a window that looks something like this.

Select ‘Any Device’ from the drop-down list shown and click Forward.

5. Select you country from the list provided and click Forward.

6. You must now see a list of ISP. Select your Provider.

Once your done with that, click Forward.

You will be asked to enter the username and password of the modem.

For MBlaze, its as follows:

username :- internet@internet.mtsindia.in 

password:- MTS

phone number:- #777

Note: Select ‘Connect automatically’, if you wish to get automatically connected to the Internet when you insert the data card.

7. Then select Apply.And you’re done!

The modem will be automatically detected when you connect the data card, and you can access the Internet.

Happy Networking!!! :)

Cheers,

aishwarya :)

Aur kitna time lagega???

A few days back I was at the post office waiting for my turn to submit my application for the Aadhar (Unique Identification) card.

It was mid-day, and I was already feeling exhausted waiting in the never-ending queue. It was 2 more to go for my turn to arrive, that suddenly the system at the counter started having trouble. My patience had already reached its peak, and I wished to not consider the possibility of not getting the work done. Some people started cribbing, while others chose to leave. I could only sigh, as there was nothing I could do other than wait.

Since it was taking more time than expected, I started feeling restless. So, I decided to go and sit at a nearby seat for a while. It was then that I witnessed an amazing scene.

I saw a little girl, maybe 4 or 5 years old. I was astonished seeing her chirpy, as kids usually get cranky when they have to wait in such clumsy and crowded place. She kept going up an down a small slope, and every time she reached the top of the slope, she kept asking her Grandmom who was seated there- “Aur kitna time lagega? ”  (How much more time will it take?). Her grandma patiently replied “Aur dus minute” (Ten more minutes). This happened once, twice, thrice and it kept happening.

The girl would slide down, then up, and ask her grandma the same Question, and the grandma would reply the same answer. It would have happened nearly 15 times.

I was astonished. Wasn’t the grandma bored of saying the same thing again and again. Duh! Would the child be so doting to her grandma when she grows up? I was amazed seeing this duo.

My these thoughts were disturbed when the man at the office announced the system will take time recuperate, and we will have to return back the next day.

I would have definitely  got irritated with the announcement, had I not witnessed the scene of the child and grandma.  The incident taught me a lesson on patience. When the grandma, in her 60 something could exercise so much patience, for me to get irrititated with such petty things is definitely a shame.

Even though my work was unfinished for the day, I was satisfied with the lesson life taught me. :)

Cheers,

aishwarya :) :)

Follow

Get every new post delivered to your Inbox.