Sunday, November 11, 2012

Logic for Pagination.

// mainData    : list of items.
// pageSize    : number of items per page.
// totalPage   : finding the pagecount.
// currentPage : current page of the navigation.
// startIndex  : item start index for the current page.
// endIndex    : item end index for the current page.
// isIncompletePage : flag to indicate the incomplete page.

// Calculating total pages.

if ((mainData.length % pageZize) == 0) {
 totalPage = mainData.length / pageZize;
} else {
 totalPage = (mainData.length - (mainData.length % pageZize)) / pageZize;
 totalPage = totalPage + 1;
 isIncompletePage = true;
}

// initially first page.
startIndex = (currentPage * pageZize) - pageZize;
endIndex = (currentPage * pageZize) - 1;
if (endIndex >= mainData.length) {
 endIndex = mainData.length - 1;
}

// previous button.
function previous() {
 if (currentPage != 1) {
  currentPage = currentPage - 1;
  startIndex = (currentPage * pageZize) - pageZize;
  endIndex = (currentPage * pageZize) - 1;
 }
}

// next button
function next() {
 if (currentPage != totalPage) {
  currentPage = currentPage + 1;
  startIndex = (currentPage * pageZize) - pageZize;
  
  if (currentPage == totalPage) {
   if (isIncompletePage) {
    endIndex = ((currentPage * pageZize) - pageZize) + ((mainData.length % pageZize) - 1);
   } else {
    endIndex = (currentPage * pageZize) - 1;
   }
  } else {
   endIndex = (currentPage * pageZize) - 1;
  }
 }
}

Wednesday, October 31, 2012

Security in the .NET Framework

The common language runtime and the .NET Framework provide many useful classes and services that enable developers to easily write secure code and enable system administrators to customize the permissions granted to code so that it can access protected resources. In addition, the runtime and the .NET Framework provide useful classes and services that facilitate the use of cryptography and role-based security.


Effective with the .NET Framework 4, there are major changes to the code access security system. Security policy is no longer applied to applications. All applications that can be run from the desktop are now executed as full-trust applications. This includes both applications on the computer and applications that can be run from a network share. Partially trusted applications must be run in a sandbox, which determines their grant set. The permission system continues to be used, but it is transcended by security transparency rules. For information about these changes, see Security Changes in the .NET Framework.

Ref : click here for details

Wednesday, October 10, 2012

Top 7 ASP.NET CMS


1. DotNetNuke

DotNetNuke
Of all the ASP .NET CMSes out there, DotNetNuke is probably the most well known and popular. One of the reasons for the popularity of this CMS is due to its multiple versions which allow for the flexibility to accommodate a beginning web developer, a small to medium sized business, or even a large enterprise. It has enjoyed a busy development since before 2003 that continues to this day.
For those that don't need much support other than what the open source community can provide, there's the DotNetNuke Community Edition offered under the BSD License. It contains most of the features which comprise the other editions, but the support is left up to the community. The Professional Edition gives you support from the DotNetNuke Corporation along with a few more features, and for a (much) increased price, the Enterprise Edition gives you a few more features along with phone support.
This CMS has been around for a while, so it's very stable and there's a plethora of add-ons in the community, so it's definitely the first stop if you're looking for something that's proven.

2. Orchard

Orchard
Provided under the New BSD License, Orchard CMS is Microsoft's hand in the open source world. The Orchard Project is based on a community, backed by full-time developers from Microsoft, that develop components and scripts that are open tools for developers to create applications, and their primary focus at the time is Orchard CMS. Despite some slow development in the beginning, Orchard has struck a chord with the open source community, and the number of contributors is growing every day.
While some of the things you'd expect in a more robust CMS might be missing, there's several fantastic back-end features which will delight anyone who is looking for a young project to support that has a great prospect of growing in the future.

3. Kentico

Kentico
Another CMS offering multiple licensing options is the Kentico CMS. The free license requires you to keep the logo and copyright information on your page, but the commercial versions offer support and allow you to work without the branding. It's designed to be easy to use for even novice users, so web development should go fast with someone who is experienced.
Kentico's focus lies in three areas: Content Management, E-Commerce, and Social Networking. That broad base makes it an excellent choice for a wide variety of technology ventures. If the company's success, showing a three year growth of 553%, is any indication, this is a CMS to keep an eye on.

4. Umbraco

Umbraco
As an open source project, Umbraco isn't going to break your budget, and it has really come alive over the past few years. It was first released in 2004 but it took a little while for it to gain traction. Lately, though, it has become very popular with designers due to the open templating system and ability to build in guidelines that automatically format the content writers provide. Also, it uses ASP .NET “master pages” and XSLT, so you won't have to work with a heaped-together templating format. It's written in C# and is happy to work with a variety of databases, so hosting shouldn't be a problem for you.
In 2009, CMS Wire dubbed Umbraco as one of the best open-source .NET CMS options available. In 2011, it was averaging close to 1000 downloads a day via Codeplex and is highly ranked amongst top downloads via the Microsoft Installer.

5. mojoPortal

mojoPortal
mojoPortal is another open source CMS option based upon the .NET framework. It has a very active developer group and is consistently being updated. While it is free to download and use, there are a number of commercial add-ons that are used to help fund the project. When it comes to developing your own applications, many people prefer mojoPortal because it can act as a starter kit for advanced .NET sites or portals.
mojoPortal is also considered to be very strong as a standalone CMS. It is easy to learn and very simple to use. It includes a variety of different tools such as blogs, photo galleries, chat, newsletters, pools, forums, and much more. It also has a very strong community which makes troubleshooting extremely simple.

6. Sitefinity

Sitefinity
Sitefinity is a commercial .NET content management system with 5 available license editions ranging from free for personal use, to $499 for small businesses up to $19,999 for enterprise use. The license will last for 1 year and during this time, you will get every update and free technical support with paid licenses. Once the year is up, you can still use Sitefinity to run your sites, however you will no longer receive free support or software updates. It is also important to note that the standard license is only good for one domain.
Currently Sitefinity is responsible for powering more than 200 government websites as well as large companies. Some of their most prominent government websites include: The White House Federal Credit Union, United States Courts, Downtown Fort Worth, and the Canadian Securities Transition Office. Additional customers include: Toyota, Vogue, IKEA, Chevron, Bayer, and Coca-Cola. With the price tag as high as it is, you'll want to be sure you're happy with it before you buy it by trying it first, but if the big boys are paying nearly $20,000 a year for it, you know the customer service is going to be top notch.

7. Composite C1

Composite C1
A relative newcomer to the ASP.NET market, Composite C1 was originally sold as a commercial CMS in Northern Europe until September 2010. Now, it's a free and open source CMS in version 3.0 that's offered under the Mozilla Public License. It's focus is for web developers working on corporate websites, so its learning curve is most likely too steep for the neonate. The 3.0 version, released in December 2011, was only downloaded a little over 1000 times from codeplex, but despite it's dark horse status, it continues to be a well designed CMS for the more experienced developer that wants their CMS to be more functional than it is beautiful.
There are enough free community and commercial add-ons for you to plug in the functionality you need quickly, so Composite C1 is worth checking out if you want to get your hands dirty.
ASP.NET seems to have more and more quality options regarding extensible content management systems with each passing year. Depending on your needs, there are excellent options available both with commercial licenses or open source code. In order to determine which one is best you, it entirely dependent on what features you want included. While there are other options available, these Top 7 ASP.NET CMS options are all excellent choices.
About the author:  is writer and editor at WebmasterFormat. Feel free to contact him and follow on Twitter.

Saturday, October 6, 2012

Did You Know…?

ASP.NET MVC is open source! That’s right - as of March, 2012, the entire source code for the ASP.NET MVC, Web API, and Web Pages frameworks is available to browse and download on CodePlex. What’s more, not only is the source code available, developers are free to create their own forks and even submit patches to the core framework source code!

Friday, October 5, 2012

Creating a Widget


Need to use JQuery tmpl plugins and Below code explains very straight forward.

Client side Code : 

<script id="uniquescriptId" type="text/javascript" src="http://<yourdomain>/widgets/embed.aspx?<your feed querystring>"></script>


Server sid code in embed.aspx ?<your feed querystring>:


public partial class embed : System.Web.UI.Page
    {
        private const string divFeedName = "uniquedivid";
        protected void Page_Load(object sender, EventArgs e)
        {
            StringBuilder mainJS = new StringBuilder(string.Empty);

            // Include all the javascript plugins

            mainJS.Append(File.ReadAllText(Server.MapPath("js/jquery-1.4.1.min.js")));
            mainJS.Append(File.ReadAllText(Server.MapPath("js/jquery.tmpl.min.js")));


           // here construct your json object to load.

            string movies = "var movies =[{ Name: \"The Red Violin\", ReleaseYear: \"1998\" },{ Name: \"Eyes Wide Shut\", ReleaseYear: \"1999\" },{ Name: \"The Inheritance\", ReleaseYear: \"1976\" }];";
            mainJS.Append(movies);
            
            mainJS.Append(File.ReadAllText(Server.MapPath("js/embed.js")));

            Response.ContentType = "text/plain";

            Response.Write(mainJS.ToString());
            Response.End();
        }
}

embed.js file code:


var newDiv = document.createElement("div");
newDiv.id = "temperarydiv";
$(newDiv).insertAfter($("#uniquescriptId"));


var tmpl = "<script id=\"movieTemplate\" type=\"text/x-jquery-tmpl\"><li><b>${Name}</b> (${ReleaseYear})</li></script><ul id=\"movieList\"></ul>";

var v = document.getElementById("temperarydiv").innerHTML = tmpl;


$("#movieTemplate").tmpl(movies).appendTo("#movieList");



:) simple...



Wednesday, October 3, 2012

Architecture a System?

An experienced Architect does not need to go through every single step in the book to get a reasonable design done for a small web application. Such Architects can use their experience to speed up the process. Since I have done similar web applications before and have understood my deliverable, I am going to take the faster approach to get the initial part of our DMS design done. That will hopefully assist me to shorten the length of this article.
For those who do not have experience, let me briefly mention the general steps that involved in architecturing a software below...
  1. Understand the initial customer requirement - Ask questions and do research to further elaborate the requirement
  2. Define the process flow of the system preferably in visual (diagram) form. I usually draw a process-flow diagram here. In my effort, I would try to define the manual version of the system first and then would try to convert that into the automated version while identifying the processes and their relations. This process-flow diagram that we draw here can be used as the medium to validate the captured requirements with the customer too.
  3. Identify the software development model that suite your requirements
    • When the requirements are fully captured and defined before the design start, you can use the 'Water-Fall' model. But when the requirements are undefined, a variant of 'Spiral' can be used to deal with that.
    • When requirements are not defined, the system gets defined while it is being designed. In such cases, you need to keep adequate spaces in respective modules, which later expansions are expected.
  4. Decide what architecture to be used. In my case, to design our Document Management System (DMS), I will be using a combination of ASP.NET MVC and Multitier Architecture (Three Tier Variant).
  5. Analyze the system and identify its modules or sub systems.  
  6. Pick one sub system at a time and further analyze it and identify all granular level requirements belonging to that part of the systems.
  7. Recognize the data entities and define the relationships among entities (Entity Relationship Diagram or ER Diagram). That can followed by identifying the business entities (Some business entities directly map with the classes of your system) and define the business process flow.
  8. Organized your entities. This is where you normalize your database, and decide what OOP concepts and design pattern to be used etc.  
  9. Make your design consistent. Follow the same standards across all modules and layers. This includes streamlining the concepts (as an example, if you have used two different design patterns in two different modules to achieve the same goal, then pick the better approach and use that in both the places), and conventions used in the project.
  10. Tuning the design is the last part of the process. In order to do this, you need to have a meeting with the project team. In that meeting you need to present your design to your team and make them ask questions about it. Take this as an opportunity to honestly evaluate/ adjust your design.

Thursday, July 26, 2012

JavaScript and memory leaks

Credits: This tutorial is written by Volkan. He runs the site Sarmal.com, a bilingual site featuring all his work, products, services, and up-to-date profile information in English and Turkish.

If you are developing client-side re-usable scripting objects, sooner or later you will find yourself spotting out memory leaks. Chances are that your browser will suck memory like a sponge and you will hardly be able to find a reason why your lovely DHTML navigation's responsiveness decreases severely after visiting a couple of pages within your site.
A Microsoft developer Justing Rogers has described IE leak patterns in his excellent article.
In this article, we will review those patterns from a slightly different perspective and support it with diagrams and memory utilization graphs. We will also introduce several subtler leak scenarios. Before we begin, I strongly recommend you to read that article if you have not already read.

 Why does the memory leak?

The problem of memory leakage is not just limited to Internet Explorer. Almost any browser (including but not limited to Mozilla, Netscape and Opera) will leak memory if you provide adequate conditions (and it is not that hard to do so, as we will see shortly). But (in my humble opinion, ymmv etc.) Internet Explorer is the king of leakers.
Don't get me wrong. I do not belong to the crowd yelling "Hey IE has memory leaks, checkout this new tool [link-to-tool] and see for yourself". Let us discuss how crappy Internet Explorer is and cover up all the flaws in other browsers".
Each browser has its own strengths and weaknesses. For instance, Mozilla consumes too much of memory at initial boot, it is not good in string and array operations; Opera may crash if you write a ridiculously complex DHTML script which confuses its rendering engine.
Although we will be focusing on the memory leaking situations in Internet Explorer, this discussion is equally applicable to other browsers.

 A simple beginning

Let us begin with a simple example:
[Exhibit 1 - Memory leaking insert due to inline script]

<html>
<head>
<script type="text/javascript">
    function LeakMemory(){
        var parentDiv = 
             document.createElement("<div onclick='foo()'>");

        parentDiv.bigString = new Array(1000).join(
                              new Array(2000).join("XXXXX"));
    }
</script>
</head>
<body>
<input type="button" 
       value="Memory Leaking Insert" onclick="LeakMemory()" />
</body>
</html>
The first assignment parentDiv=document.createElement(...); will create a div element and create a temporary scope for it where the scripting object resides. The second assignment parentDiv.bigString=... attaches a large object to parentDiv. When LeakMemory() method is called, a DOM element will be created within the scope of this function, a very large object will be attached to it as a member property and the DOM element will be de-allocated and removed from memory as soon as the function exits, since it is an object created within the local scope of the function.
When you run the example and click the button a few times, your memory graph will probably look like this:

 Increasing the frequency

No visible leak huh? What if we do this a few hundred times instead of twenty, or a few thousand times? Will it be the same? The following code calls the assignment over and over again to accomplish this goal:
[Exhibit 2 - Memory leaking insert (frequency increased) ]

<html>
<head>
<script type="text/javascript">
    function LeakMemory(){
        for(i = 0; i < 5000; i++){
            var parentDiv = 
               document.createElement("<div onClick='foo()'>");
        }
    }
</script>
</head>
<body>
<input type="button" 
       value="Memory Leaking Insert" onclick="LeakMemory()" />
</body>
</html>
And here follows the corresponding graph:
The ramp in the memory usage indicates leak in memory. The horizontal line (the last 20 seconds) at the end of the ramp is the memory after refreshing the page and loading another (about:blank) page. This shows that the leak is an actual leak and not a pseudo leak. The memory will not be reclaimed unless the browser window and other dependant windows if any are closed.
Assume you have a dozen pages that have similar leakage graph. After a few hours, you may want to restart your browser (or even your PC) because it just stops responding. The naughty browser is eating up all your resources. However, this is an extreme case because Windows will increase the virtual memory size as soon as your memory consumption reaches a certain level.
This is not a pretty scenario. Your client/boss will not be very happy, if they discover such a situation in the middle of a product showcase/training/demo.
A careful eye may have caught that there is no bigString in the second example. This means that the leak is merely because of the internal scripting object (i.e. the anonymous script onclick='foo()'). This script was not deallocated properly. This caused memory leak at each iteration. To prove our thesis let us run a slightly different test case:
[Exhibit 3 - Leak test without inline script attached]

<html>
<head>
<script type="text/javascript">
    function LeakMemory(){
        for(i = 0; i < 50000; i++){
            var parentDiv = 
            document.createElement("div");
        }
    }
</script>
</head>
<body>
<input type="button" 
       value="Memory Leaking Insert" onclick="LeakMemory()" />
</body>
</html>
And here follows the corresponding memory graph:
As you can see, we have done fifty thousand iterations instead of 5000, and still the memory usage is flat (i.e. no leaks). The slight ramp is due to some other process in my PC.
Let us change our code in a more standard and somewhat unobtrusive manner (not the correct term here, but can't find a better one) without embedded inline scripts and re-test it.

[You can find few useful JavaScript tutorial here]


Sunday, June 17, 2012

பன்னாட்டு தொழில் நிறுவனங்கள் புதிய முடிவு: 71 ஆயிரம் ஊழியர்களை வெளியேற்ற திட்டம்

நியூயார்க்:நோக்கியா, பெப்சி, சோனி, யாகூ போன்ற 12க்கும் மேற்பட்ட பன்னாட்டு நிறுவனங்கள், இவ்வாண்டு 71 ஆயிரம் ஊழியர்களை, பணிநீக்கம் செய்ய முடிவு செய்துள்ளன.

அமெரிக்கா, ஜப்பான் போன்ற வளர்ந்த நாடுகளில் உள்ள பிரபல நிறுவனங்கள், உலகில் பல நாடுகளில் தங்களது தயாரிப்பு நிறுவனங்களை நிறுவி, அவற்றில் லட்சக்கணக்கானோர் பணியாற்றி வருகின்றனர். பிரபல மொபைல் போன் தயாரிப்பு நிறுவனமான நோக்கியா, குளிர்பான நிறுவனமான பெப்சிகோ, மின்னணுப் பொருட்களைத் தயாரிக்கும் சோனி, கணினி துறையில் உள்ள ஹியூலட் பேக்கார்டு (எச்.பி.,), விமான நிறுவனமான லுப்தான்சா, கேமராக்கள் தயாரிப்பு நிறுவனமான ஒலிம்பஸ் உட்பட 12 நிறுவனங்கள் தங்கள் நிறுவனத்தில் பணியாற்றி வரும் 71 ஆயிரம் ஊழியர்களை பணிநீக்கம் செய்ய முடிவெடுத்து அறிவித்துள்ளன.

இதில், கடும் பொருளாதார நெருக்கடியைச் சந்தித்து வரும் நோக்கியா நிறுவனம் அடுத்தாண்டு இறுதிக்குள் 10 ஆயிரம் பேரை பணி நீக்கம் செய்ய முடிவு செய்துள்ளது. தற்போது பெருகி வரும் பலத்த போட்டிக்கு இடையே தாக்குப்பிடிக்க முடியாத நிலை இருப்பதும், ஊழியர்களை குறைக்க இந்த நிறுவனம் முடிவெடுத்ததற்கு காரணமாகி விட்டது. ஊழியர்களை குறைப்பதன் மூலம், 200 கோடி டாலர் சேமிக்க முடியும் என்று நிறுவனம் நம்புகிறது.

அதேபோல், கேமராக்களைத் தயாரித்து விற்று வரும் பிரபல ஒலிம்பஸ் நிறுவனம் இன்னும் இரண்டாண்டுகளில் 40 ஆயிரம் ஊழியர்களை வெளியேற்றத் திட்டமிட்டுள்ளது. இதில், இம்மாதம் மட்டும் 2700 பேரை வெளியேற்றிவிட நடவடிக்கையைத் துவக்கி உள்ளது. கணினி தயாரிப்பில் முன்னணி நிறுவனங்களில் ஒன்றான, ஹியூலட் பேக்கார்டு (எச்.பி.,) நிறுவனம் அடுத்த இரண்டாண்டுகளில் 27 ஆயிரம் ஊழியர்களை வெளியேற்றவும் முடிவு செய்துள்ளது.

இதேபோல் மேற்கண்ட ஒவ்வொரு பன்னாட்டு நிறுவனமும் கணிசமான அளவுக்கு ஊழியர்களைக் குறைக்கத் திட்டமிட்டுள்ளன. இன்னும் ஓராண்டில், 71 ஆயிரம் ஊழியர்கள் இந்த நிறுவனங்களின் பல்வேறு நாடுகளில் உள்ள கிளைகளில் இருந்து வெளியேற்றப்படுவர்.

Wednesday, April 18, 2012

Android Samples

Best place to find some samples of android apps, click herer

Android Design

Sunday, April 15, 2012

Connect Android with WCF Service

  1. Download the sample code from here
  2. Prerequisite
    1. Jdk
    2. Android Sdk
    3. Eclipse development Tool Kit
    4. .Net 3.5 and above
  3. Knowledge Required
    1. Basic android programming
    2. WCF Rest & Bindings
    3. Json
  4. Steps to run the sample demo application
    1. Create emulator using AVD manager. or root your android device
    2. Do proxy setting in the emulator or android phone from Settings   
    3. Configure the wcf service in the web server.
    4. Run the android application using in eclips.

Android User Interface Design Tips

Monday, April 9, 2012

Love Thy Enemy: Google makes more money from iOS than Android?


Well all know how much Android has grown. The latest reports show 850,000 devices activated daily and over 50% of the market share, but is it possible that Google makes more money from iOS than Android? The Guardian released what they believe Google made from Android from 2008 to 2011. They made this calculation based on figures that came up during negotiations from the legal battles of Google and Oracle. The Guardian believes Google made $543 million during this period, but again it needs to be pointed out that this is an estimate since Google never releases earnings from Android. I won’t get into all the details of the calculation, but they looked at what Google offered Oracle in turns of a possible settlement to arrive at their conclusion.
The Guardian thinks Google makes four times more from iOS. Where is the revenue generated from? Don’t forget Google is a search company and products such as that and Maps are used on Apple’s iPhone and iPad. Back in October, Google CEO Larry Page said that they were “seeing a huge positive revenue impact from mobile, which has grown 2.5 times in the last 12 months to a run rate of over $2.5bn.” Notice how he used the word, “mobile?” He didn’t say Android, but people automatically interpret it that way.
Asymco took this information and went a little further by charting it all out. Assuming $1 billion in mobile revenue in 2010 (from Larry’s comment of 2.5x for 2011), they put together the following chart:
They went a little further by breaking it out per device here:
So there you have it. I didn’t spend a lot of time trying to “shoot holes” in these figures, but I think it’s safe to assume that Apple is pretty important to Google. In fact Larry Pagedownplayed whatever hatred Steve Jobs had for Android. Whether he really did hate Android or not, I’m thinking Google definitely doesn’t hate Apple.

Sunday, April 8, 2012

Check Out This Awesome Metro UI Theme for All ICS and Honeycomb Tablets


Now here’s a cool one for you tablet users that like to tweak the appearance of your UI! XDA member BroBot175 has created a Metro UI theme for all tablets running Honeycomb or ICS! The theme is a fully functioning replica of Windows 8 that allows you to create your own tiles, and organize them however you want.
I flashed this theme over a week ago on my Galaxy Tab when the project was in its infancy and now its gotten polished enough for daily use. BroBot175 has even recently added support all ICS and Honeycomb tablets because he was getting so many requests for added support. Just like any other theme you simply flash in ClockworkMod Recovery and will then have to transfer over the tile images to get started. Set-up can take a while because you have to plot out every single tile using Desktop Visualizer widgets but if you follow the devs step by step instructions you should have no problems at all. So for those of you who like to customize the look of your device and want something completely different than the ICS or Honeycomb layout, you really should check this theme out! Hit the source link below to get started

Wednesday, April 4, 2012

Dropbox Doubles Referral Bonus and Plans to Pull the 23GB of Free Space from HTC Hack Users


You want the good news or the bad news first? OK, bad news? If you were one of the many people to use the ’23GB of free storage’ hack meant only for new HTC devices, well, Dropbox intends to take that back. It appears DB is much smarter than the hack’s developer had thought because DB knows the international HTC One series phones aren’t released until tomorrow. That means if you accessed this round-about way for obtaining free space they know it wasn’t completed in a legitimate and qualifying manner. Here is what Dropbox support had to say about the matter in their forums:
The official Dropbox 23GB HTC promotion will not start until sometime early this month, when the devices are released. To earn the extra 23GB of extra Dropbox space you will need to link your HTC Sense 4.0 device to your Dropbox account and complete “Get Started.”
The method to earn 23GB that is being circulated on the XDA Developers forum and on other blogs and forums is illegitimate. We plan to remove any space received using this method.
So bummer news for those of you who were hoping for a total of 25GB’s for free for two years. It will be removed and may have actually been done already. You may want to check on that… OK, on to the good news!
The good news is that Dropbox has doubled the referral bonus from 250MB to 500MB at a maximum of 16GB in incentives. For those of you who are paid users you will be pleased to know that your referrals have doubled to 1GB per referral at a max of 32GB of additional space. Oh yeah, this is retro active too, so be on the lookout for a little bump in space if you have any referrals under your belt.

Monday, April 2, 2012

?"Why We Shout In Anger"

A Hindu saint who was visiting river Ganges to take ba...th found a group of family members on the banks, shouting in anger at each other. He turned to his disciples smiled and asked.

'Why do people shout in anger shout at each other?'

Disciples thought for a while, one of them said, 'Because we lose our calm, we shout.'

'But, why should you shout when the other person is just next to you? You can as well tell him what you have to say in a soft manner.' asked the saint

Disciples gave some other answers but none satisfied the other disciples.
Finally the saint explained, .

'When two people are angry at each other, their hearts distance a lot. To cover that distance they must shout to be able to hear each other. The angrier they are, the stronger they will have to shout to hear each other to cover that great distance.

What happens when two people fall in love? They don't shout at each other but talk softly, Because their hearts are very close. The distance between them is either nonexistent or very small...'

The saint continued, 'When they love each other even more, what happens? They do not speak, only whisper and they get even closer to each other in their love. Finally they even need not whisper, they only look at each other and that's all. That is how close two people are when they love each other.'

He looked at his disciples and said.

'So when you argue do not let your hearts get distant, Do not say words that distance each other more, Or else there will come a day when the distance is so great that you will not find the path to return.'