This is a snippet of a huge project.
What this code does is it monitors a give .txt file.
If the file contains more than 300 lines, it splits the file and repeats this procedure till end of line is reached.
public void split(String master_out)
{
try
{
String str2="";
int t = 1;
System.out.println(master_out);
FileReader input = new FileReader(master_out);
BufferedReader br = new BufferedReader(input);
while(br.ready())
{
File SplitFile=new File(master_out + "_" + (t++) + ".TXT");// Error file validations
PrintWriter writer=new PrintWriter(new FileWriter(SplitFile));
for(int j = 0; j < 3000; ++j)
{
if((str2 = br.readLine()) != null)
writer.println(str2);
else
break;
}
writer.close();
}
}
catch(IOException e)
{
System.out.println(e);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Monday, July 26, 2010
Sunday, July 25, 2010
Attachments
Attachments cause feverish breath and feverish breath takes away peace of mind. Then you are in pieces and fall prey to misery. Before you get scattered too much, gather yourself and rid your breath of the feverishness through surrender and sadhana. Unfortunately most people do not notice this until it is too late.
When someone is drowning in the ocean of attachments, surrender is the life jacket they can put on and wait for the rescue team. Without fighting the attachments, observe the feverish breath and go to the cool place of silence within. Your first step in this direction is directing your attachment to the Knowledge, to the Divine.
Your non-attachment to the mundane is your charm. Your attachment to the Divine is your beauty.
- Sri Sri
* * * *
Guruji was sitting at the airport in Perth, Western Australia when he asked Joy what she did. She said, "I am an interior decorator." He said, "Oh, we do the same job."
Jai Guru Dev
Ravi...
When someone is drowning in the ocean of attachments, surrender is the life jacket they can put on and wait for the rescue team. Without fighting the attachments, observe the feverish breath and go to the cool place of silence within. Your first step in this direction is directing your attachment to the Knowledge, to the Divine.
Your non-attachment to the mundane is your charm. Your attachment to the Divine is your beauty.
- Sri Sri
* * * *
Guruji was sitting at the airport in Perth, Western Australia when he asked Joy what she did. She said, "I am an interior decorator." He said, "Oh, we do the same job."
Jai Guru Dev
Ravi...
The Golden Veil
Sri Sri: Craving comes from encouraging the thought of pleasure.
The actual experience of pleasure may not be as pleasurable as the memory.
Georgia: That 's why we spend so much time in our minds!
Sri Sri: Whether you encourage a worldly thought or a Divine thought, they both bring you pleasure. Worldly thought leads to indulgence, which brings you down from pleasure to disappointment and dejection. Divine thought takes you up from pleasure to Bliss, Intelligence, and progress in life. Worldly thought brings pleasure only as memory, whereas Divine thought comes as Reality.
Question: What is a Divine thought?
Sri Sri: "I am not the body; I am bliss, satchitananda; I am unbounded space; I am love; I am peace; I am light."
Question: What is a worldly thought?
Sri Sri: It is about money, sex, food, power, status and self-image.
Truth is hidden by the golden veil of the mundane.
Pierce through the glittering sheath and know you are the Sun.
P.S. In the world everybody is after GOLD; some are after GOOD; but only a few are after GOD. Transcend GOLD, transcend the GOOD, and reach GOD.
Jai Gurudev!
Ravi..
The actual experience of pleasure may not be as pleasurable as the memory.
Georgia: That 's why we spend so much time in our minds!
Sri Sri: Whether you encourage a worldly thought or a Divine thought, they both bring you pleasure. Worldly thought leads to indulgence, which brings you down from pleasure to disappointment and dejection. Divine thought takes you up from pleasure to Bliss, Intelligence, and progress in life. Worldly thought brings pleasure only as memory, whereas Divine thought comes as Reality.
Question: What is a Divine thought?
Sri Sri: "I am not the body; I am bliss, satchitananda; I am unbounded space; I am love; I am peace; I am light."
Question: What is a worldly thought?
Sri Sri: It is about money, sex, food, power, status and self-image.
Truth is hidden by the golden veil of the mundane.
Pierce through the glittering sheath and know you are the Sun.
P.S. In the world everybody is after GOLD; some are after GOOD; but only a few are after GOD. Transcend GOLD, transcend the GOOD, and reach GOD.
Jai Gurudev!
Ravi..
Austerity Brings Freedom
Austerity is often mistaken to be poverty, self-denial. It is neither.
Austerity comes out of maturity. It is a sign of social health.
Often people who practice austerity are resentful of richness. This is a very pitiable state. Such austerity is not born out of maturity but out of compulsion. The true austerity has tolerance for richness and is never resentful.
In fact, one who is mature will have pity for one who is not austere. Austerity is not against celebration and just vanity is not celebration.
Celebration dawns in the spirit. Only one who is rich in spirit can practice austerity. One may be rich materially but if he is poor in spirit he can neither celebrate nor evolve.
Poverty of spirit is vanity. Austerity brings freedom from the pride of vanity. But taking pride in austerity is again a vanity !
Austerity comes out of abundance, and austerity brings abundance. If you feel a lack in any area of life, immediately start austerity. Austerity not only brings freedom but nurtures sharing and caring.
- Sri Sri
Jai Guru Dev
Ravi...
Austerity comes out of maturity. It is a sign of social health.
Often people who practice austerity are resentful of richness. This is a very pitiable state. Such austerity is not born out of maturity but out of compulsion. The true austerity has tolerance for richness and is never resentful.
In fact, one who is mature will have pity for one who is not austere. Austerity is not against celebration and just vanity is not celebration.
Celebration dawns in the spirit. Only one who is rich in spirit can practice austerity. One may be rich materially but if he is poor in spirit he can neither celebrate nor evolve.
Poverty of spirit is vanity. Austerity brings freedom from the pride of vanity. But taking pride in austerity is again a vanity !
Austerity comes out of abundance, and austerity brings abundance. If you feel a lack in any area of life, immediately start austerity. Austerity not only brings freedom but nurtures sharing and caring.
- Sri Sri
Jai Guru Dev
Ravi...
Happy Guru Purnima to You

Dhyaana moolam guror murtih;
Pooja moolam guror padam;
Mantra moolam guror vakyam;
Moksha moolam guror kripa
Significance-Guru Purnima
The following is a message from His Holiness Sri Sri Ravi Shankar on the significance of Guru-Purnima.
“Among the 12-13 full moons in a year the vaishakha full moon is dedicated to Buddha (his birth and enlightenment), jyeshtha full moon to mother earth and the aashadha full moon is dedicated to the memory of masters. This is Guru-Purnima.
It is the day when the disciple wakes up in his fullness and in the wakefulness he can’t be but grateful. This gratitude is not of dwaita (you and me), but of advaita. It is not a river moving from somewhere to somewhere, but is the ocean moving within itself. So, gratefulness on Guru-Purnima symbolizes that fullness.
The purpose of the Guru Purnima celebration is to turn back and review and see in this last one year how much one has progressed in life. For a seeker, Guru Purnima is a day of significance. It is the day to review one’s progress on the spiritual path and renew one’s determination and focus on the goal. As the full moon rises and sets, tears of gratitude arise and repose into the vastness of one’s own self.”
Jai Gurudev!
Ravi.
Guru is a circuit breaker

A city without streets, a king without treasure, a merchant without business and a life without a guru are all considered the same. Why the emphasis on guru? Why do you need a guru?
Life sometimes seems very complicated. There is pleasure, pain, happiness, suffering, generosity, greed, passion and dispassion. When our life is full of such opposing values, our mind sometimes becomes unable to handle these complications and just breaks down.
It is then that you need wisdom to guide you through troubled times. Guru is that wisdom. You might have noticed you give great advice when you are not involved in a situation but the same is not true when you are in trouble. This is because wisdom dawns when you are out of the mess. Guru is one who is out of the mess. He watches the chaos, amidst the chaos.
Guru is like a circuit breaker. When you cannot handle life, your guru comes and saves so that you remain sane and balanced. If there is a compelling desire that bothers you, your guru is there to offer solace. You offer all your desires and pain to your guru. Having a guru means being able to relax and smile all the time, walk with confidence, be fearless and have a vision. That is wisdom.
Guru is a tattva -- an element, a quality inside you. It is not limited to a body or form. Guru comes in your life in spite of your refusing or being rebellious. The guru principle is so vital in life. There is an element of the guru in every human being. That wisdom in each has to be invoked, awakened. When this element is awakened, misery in life disappears. In our consciousness, wisdom comes to life when guru tattva comes to life. When we have no desires of our own, then the guru tattva dawns in our life. Wake up and see that our life is changing every moment and feel grateful for whatever you have received.
Guru Purnima is to review your growth. This review will give you encouragement. If you think you haven't grown enough on the spiritual path in the past few years, then you have not utilised the knowledge. If you feel you are stuck somewhere, then the realisation that you are stuck is also growth.
That is why we celebrate Guru Purnima. It is the day when the devotee arises in full gratitude and feels grateful for the great knowledge he has received from the Master. It is time to review how much knowledge you have ingrained in your life and how you are growing in knowledge. This may bring about a realisation for scope of improvement, which in turn will bring humility in you. Be grateful for the way this knowledge has transformed you. Just think how you could have been without this. Gratitude and humility together make bloom a genuine prayer inside you
On Guru Purnima, remember all gurus of the past. When your life is full, you get a feeling of gratitude then you start with the guru and end up adoring everything in life. On Guru Purnima the devotee wakes up in full gratitude. The devotee becomes like an ocean moving in itself. Guru Purnima is a time to celebrate and rise in devotion and gratitude.
Loads of Love,
Ravi.
Subscribe to:
Posts (Atom)