Monday, March 25, 2013

Why We Pray



Why God always come in front of eyes whenever we are sad, whenever someone close is going far, whenever we are hurt, Whenever we need something/someone like anything. I think after God, Mother is next that we remember in all difficult situations. No doubt Mother is Goddess. We have not seen God but our heart has faith that he/she is the one that will take out of any danger. Is this because he/she never demand anything from us. Is it like tress that just give us everything without asking anything. So it means we are selfish that just want to get attached to person/god that just give things. Can we really stop expecting things? Is it possible? Is it eternal love that can make it happen. I have seen people/saints dancing in Krishna temples in unconscious manner, Have they reached that state. It is always said to be attached to non-material things because you never get hurt, Reason, Because your feelings won't get hurt as we always know in advance what is the outcome. Now we are finding the ways of happiness, things are moving to God, family, non-material things. Now suppose if we love some girl/boy because of any reason, can it be without expectations, If yes how far it can go without expectation, may be not, somewhere feelings can hurt, Why, Because human nature is not rigid, it is flexible, it is not like calculator that you sum 2 numbers and it always be same. Now when we said we love then we are ready to accept positive and negative of that outcome. God never fulfills all our wishes, But still he/she always grace us with something that is good for future.

I pray, Why, Am i talking to my friend God, I know he will always be listening, surely he will not reply. But i am getting peace of my mind, May be I have stopped expecting anything from him and feel happy when i pray. I have start believing that he will not turn his back on me. I have started believing he is omnipresent.

Answering to a question Who is God and where he lives is very difficult. And the answer to the question Who, may differ person to person. Answers can be soul, music, family, some imagination. But where looks like that if we close our eyes then we can feel it everywhere. It is in soul, If i wave my hand in air, I can feel it. It gives us hope of live to go forward, fight with fear and bad time.
.....

Sunday, December 9, 2012

Living without recognition is a skill


There was a farmer who had a horse and a goat…..

One day, the horse became ill. So he called the veterinarian, who said:


"Well, your horse has a virus. He must take this medicine for three days.
I'll come back on the 3rd day and if he's not better, we're going to have to put him down.

Nearby, the goat listened closely to their conversation.

The next day, they gave the horse the medicine and left.

The goat approached the horse and said: “Be strong, my friend.
Get up or else they're going to put you to sleep!”

On the second day, they again gave the horse the medicine and left.

The goat came back and said: "Come on buddy, get up or else you're going to die!
Come on, I'll help you get up. Let's go! One, two, three..."

On the third day, they came to give the horse the medicine and the vet said:
"Unfortunately, we're going to have to put him down tomorrow. Otherwise,
the virus might spread and infect the other horses".

After they left, the goat approached the horse and said: "Listen pal, it's now or never!
Get up, come on! Have courage! Come on! Get up! Get up! That's it, slowly! Great!
Come on, one, two, three... Good, good. Now faster, come on...... Fantastic! Run, run more!
Yes! Yay! Yes! You did it, you're a champion...!!!"

All of a sudden, the owner came back, saw the horse running in the field and began shouting:
It's a miracle! My horse is cured. We must have a grand party. Let's kill the goat!!!!

The Lesson:
Nobody truly knows which employee actually deserves the merit of success, or who's actually contributing the necessary support to make things happen.

Remember:
LEARNING TO LIVE WITHOUT RECOGNITION IS A
SKILL!!!!

If anyone ever tells you that your work is unprofessional, remember:

AMATEURS BUILT THE ARK [which saved all the species]

and

PROFESSIONALS BUILT THE TITANIC [all died tragically]

Reference: From Some Blog....

Thursday, February 3, 2011

Time and Space Complexity

Time Complexity
The number of machine instruction which a program executes during its runtime is called its time complexity. This number primarily depends upon the size of program's input that is approximately the number of strings to be sorted and their length and algorithm used.
"Sort an array of n strings by minimum search" is described by the expression c.n^2.

O Notation:
Runtime complexities are always specified in so called O-Notations.
The sorting method has a running time O(N^2). The expression O is called Landau's Symbol.
Mathematically speaking, O(N^2) stands for a set of functions.
f(n) <= c.n^2 The function n^2 is called an asymptotically upper bound of f. Generally the notation f(n) = O(g(n))

Evaluating run-time complexity
1 get a positive integer from input
2 if n > 10
3 print "This might take a while..."
4 for i = 1 to n
5 for j = 1 to i
6 print i * j
7 print "Done!"

Say that the actions carried out in step 1 are considered to consume time T1, step 2 uses time T2, and so forth. In the algorithm above, steps 1, 2 and 7 will only be run once. For a worst-case evaluation, it should be assumed that step 3 will be run as well. Thus the total amount of time to run steps 1-3 and step 7 is:

T1 + T2 + T3 + T7

The loops in steps 4, 5 and 6 are trickier to evaluate. The outer loop test in step 4 will execute ( n + 1 ) times (note that an extra step is required to terminate the for loop, hence n + 1 and not n executions), which will consume T4( n + 1 ) time. The inner loop, on the other hand, is governed by the value of i, which iterates from 1 to n. On the first pass through the outer loop, j iterates from 1 to 1: The inner loop makes one pass, so running the inner loop body (step 6) consumes T6 time, and the inner loop test (step 5) consumes 2T5 time. During the next pass through the outer loop, j iterates from 1 to 2: the inner loop makes two passes, so running the inner loop body (step 6) consumes 2T6 time, and the inner loop test (step 5) consumes 3T5 time.

Altogether, the total time required to run the inner loop body can be expressed as an arithmetic progression:
T6 + 2T6 + 3T6 + ... + (n-1)T6 + NT6

which can be factored as
T6[1+2+3+.....+(n-1) + n) = T6[1/2 (n^2 + n)]

The total time required to run the inner loop test can be evaluated similarly:
T5[1/2 (n^2 + 3n + 2)] - T5

Therefore the total running time for this algorithm is:
T1 + T2 + T3 + T7 + (n+1) T4 + T6[1/2 (n^2 + n)] + T5[1/2 (n^2 + 3n + 2)] - T5

As a rule-of-thumb, one can assume that the highest-order term in any given function dominates its rate of growth and thus defines its run-time order. In this example, n² is the highest-order term, so one can conclude that f(n) = O(n²).

Space Complexity
The better the time complexity of an algo the faster the complexity will carry out in practice. Space complexity is the number of memory cells. A good algo tries to keep this number as small as possible.

Sorting Algos:

•Bubble Sort
Worst case performance: O(n2)
Best case performance: O(n)
Average case performance: O(n2)
Worst case space complexity: O(1) auxiliary

•BiDirectional Bubble Sort
Worst case performance: O(n2)
Best case performance: O(n)
Average case performance: O(n2)
Worst case space complexity: O(1) auxiliary

•Bucket Sort
Worst case performance: O(n2.k)
Best case performance: -
Average case performance: O(n.k)
Worst case space complexity: O(n.k)

•Comb Sort
Worst case performance: -
Best case performance: -
Average case performance: -
Worst case space complexity: O(1)

•Cycle Sort
Worst case performance: O(n2)
Best case performance: -
Average case performance: O(n2)
Worst case space complexity: O(1)

•Gnome Sort
Worst case performance: O(n2)
Best case performance: -
Average case performance: -
Worst case space complexity: O(1)

•Heap Sort
Worst case performance: O(n log n)
Best case performance: O(n log n)
Average case performance: O(n log n)
Worst case space complexity: O(1)


•Insertion Sort
Worst case performance: O(n2)
Best case performance: O(n)
Average case performance: O(n2)
Worst case space complexity: O(1)


•Merge Sort
Worst case performance: O(n log n)
Best case performance: O(n log n)
Average case performance: O(n log n)
Worst case space complexity:

•Odd-Even Sort

•Pigeonhole Sort
Worst case performance: O(n+2k)
Best case performance: -
Average case performance: O(n+2k)
Worst case space complexity: O(2k)

•Quick Sort
Worst case performance: O(n2)
Best case performance: O(n log n)
Average case performance: O(n log n)
Worst case space complexity: O(log n)

•Quick Sort with Bubble Sort

•Selection Sort
Worst case performance: O(n2)
Best case performance: O(n2)
Average case performance: O(n2)
Worst case space complexity: O(1)

•Shell Sort
Worst case performance: -
Best case performance: n
Average case performance: O(n log2 n)
Worst case space complexity: O(1)

Reference:
Leda Tutoril
Sort Visualization
Analysis of Algorithms

Wednesday, December 26, 2007

My First Project WebLocker

My name is Vikas Agarwal. I am working in datafix in Pune.

We had the Client requirement to make the project for school as an OS win 2003 server, so for each students and teacher they need SAM accounts Active Directory with respective quota. This could be easy part just to use predefined classes like DirectoryEntry to create the accounts. But what they need was the advanced site that can let the student, teachers and admin to access their accounts from their home and do all the functionality they can perform on Lan plus the students joined recently should be reflected in AD and these students can access their account from web. So we created one Windows service that creates and Synchronies SAM account from the database that holds user db. For which there was one utility that configures the settings for windows service like synchronizing time interval Between AD and db of client and quota size etc.

Next we created site WebLocker with windows authentication, sql server session management, and the site db as sqlserver. Facilities for creating, deleting folder, downloading files from own account. It was windows on web. One of the challenges was to upload the files in the teacher folder by students; condition was that teacher should be teaching at least one subject and other folders security permissions.

Deployment task was terrible enjoyable task; First time 2 days spent on make the utility and Win service running on member server. It was the first project of my career and I really enjoyed doing project that lasts for near 6 months.

Main thing was the design of the whole application that minimized bug list. We have designed High level as well low level Design documents. We were having the checklists that make things easier. We follow all the coding standardization and guidelines. No doubt the xml comments and inline comments were there that tells the logic and updating of global variables. We have not taken a single constant numbers anywhere in code, like I = 1 to 5, every constant was predefined in a separate file. We have divided the project into 3 tiers and set the project dependency accordingly, Things were so generalized. All the drastic changes can be done in quick time. we have the separate class library for log with facility for Event, file and database log of application, Each event was traced from top layer to bottom layer, And I think when we log all steps it tells the actual flow of the application that what WPF is designed to now.

We were more process oriented and that leads to a successful application. No doubt time and money is major factor being considered developing applications like this. With perfect design and project schedule we save both. And I will add one thing if the application is made so generalized then the major change can be done easily without changing the current code. That was we up to.

I have used here 'We' all where, no doubt our team was of 3, 2 dev and one tester and we divided our tasks, but it was all efforts that lead to a successful application.

Monday, April 2, 2007

Gudi Padwa

--------------GUDI PADWA-----------

First day of New Year.

A busy day for housewives who set up the gudi atop their houses and perform a pooja to welcome the New Year.

A tall pole is draped with the piece of bright, pleated silk and covered with an upturned metal Kalash(made either of copper, steel or silver).

A branch of feathery green neam leaves and flowers is entwined artistically around it, along with the garland of gathis(Sugar candy).

The day begin with the pooja after that Parsad is served.

This is a combination of tender neem leaves and jaggery ground together into a paste and shaped into little pellets. Later special sweet like Puran poli(My Favourite and specially when Ghee(Toop) and Milk) or Shrikhand are made in every house holds and friends and relatives makes this an occasion to visit and wish each other a prosperous new year.

Reasons to Celebrate ( I will carry Tomorrow)