<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkUFSHozeSp7ImA9WhRaE0w.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977</id><updated>2012-02-15T20:33:39.481+05:30</updated><category term="Atom" /><category term="Unix" /><category term="Visual Studio" /><category term="exportfs" /><category term="Safe" /><category term="MaxTo" /><category term="Attachment" /><category term="linker" /><category term="dll" /><category term="RHEL" /><category term="Desktop" /><category term="SQL" /><category term="glibc" /><category term="Email" /><category term="cache" /><category term="Csh" /><category term="Environment Variable" /><category term="Economics" /><category term="Kumar Vishwas" /><category term="Windows" /><category term="Security" /><category term="Remote Desktop" /><category term="Firewall" /><category term="Log" /><category term="Old Version" /><category term="temp files" /><category term="Automate" /><category term="Font" /><category term="Web" /><category term="Telnet" /><category term="C++" /><category term="firefox" /><category term="HPUX" /><category term="RSS" /><category term="File" /><category term="Segmentation" /><category term="Packet" /><category term="Compare" /><category term="FTP" /><category term="browser" /><category term="Andriod" /><category term="Solaris" /><category term="Software" /><category term="History" /><category term="Error" /><category term="XAM" /><category term="mstsc" /><category term="Yahoo" /><category term="Application" /><category term="iPod Touch" /><category term="Mail" /><category term="Service" /><category term="Quotes" /><category term="Dictionary" /><category term="Shell Script" /><category term="Google Reader" /><category term="BSS" /><category term="Google Code" /><category term="Fonts" /><category term="syslog" /><category term="Gmail" /><category term="XML" /><category term="Poem" /><category term="Release version" /><category term="Search" /><category term="Java" /><category term="Chanakya Niti Shastra" /><category term="compile" /><category term="API" /><category term="Open Source" /><category term="Quotations" /><category term="EXE" /><category term="People" /><category term="Init" /><category term="Chat" /><category term="NFS" /><category term="JDK" /><category term="iPhone" /><category term="Protocol" /><category term="Google Talk" /><category term="Linux" /><category term="Eclipse" /><category term="exception" /><category term="gcc" /><category term="Ubuntu" /><category term="Engine" /><category term="Hacking" /><category term="Bash" /><category term="g++" /><category term="Memory Allocation" /><category term="Suse" /><category term="AIX" /><category term="Yahoo Messenger" /><category term="Ksh" /><title>iLog</title><subtitle type="html">Welcome to my Weblogs!</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.mayankagarwal.in/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/mayanklogs" /><feedburner:info uri="mayanklogs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DEUFQns9eip7ImA9WhRaEk4.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-5239346485910644387</id><published>2012-02-14T21:45:00.002+05:30</published><updated>2012-02-14T21:46:53.562+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-14T21:46:53.562+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Segmentation" /><category scheme="http://www.blogger.com/atom/ns#" term="BSS" /><category scheme="http://www.blogger.com/atom/ns#" term="Memory Allocation" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>Memory Allocation/Segmentation in C/C++</title><content type="html">&lt;b&gt;Memory Allocation/Segmentation in C/C++&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
=========&lt;br /&gt;
| stack |&lt;br /&gt;
|  vv   |&lt;br /&gt;
|       |&lt;br /&gt;
|       |&lt;br /&gt;
|  ^^   |&lt;br /&gt;
| heap  |&lt;br /&gt;
=========&lt;br /&gt;
|  bss  |&lt;br /&gt;
=========&lt;br /&gt;
| data  |&lt;br /&gt;
=========&lt;br /&gt;
| text  |&lt;br /&gt;
=========&lt;br /&gt;
address 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" style="height: 1456px; width: 450px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="100"&gt;&lt;b&gt;Segment&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="100"&gt;&lt;b&gt;Code&lt;/b&gt; – &lt;b&gt;text&lt;/b&gt; segment&lt;/td&gt;
&lt;td&gt;Often referred to as the &lt;b&gt;text segment&lt;/b&gt;,  this is the
 area in which the executable instructions reside.&amp;nbsp;  For example, 
Linux/Unix arranges things so that multiple running  instances of the 
same program share their code if possible.&amp;nbsp;  Only one copy of the 
instructions for the same program resides in  memory at any time.&amp;nbsp; The 
portion of the executable file containing  the text segment is the &lt;b&gt;text section&lt;/b&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="100"&gt;Initialized data – &lt;b&gt;data&lt;/b&gt; segment&lt;/td&gt;
&lt;td&gt;Statically allocated and global data  that are &lt;b&gt;initialized with nonzero values&lt;/b&gt; live in the &lt;b&gt;data  segment&lt;/b&gt;.&amp;nbsp;
 Each process running the same program has its  own data segment.&amp;nbsp; The 
portion of the executable file containing  the data segment is the data 
section.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="100"&gt;Uninitialized data – &lt;b&gt;bss&lt;/b&gt; segment&lt;/td&gt;
&lt;td&gt;&lt;b&gt;BSS&lt;/b&gt; stands for ‘&lt;b&gt;Block Started by Symbol&lt;/b&gt;’.&amp;nbsp; Global  and statically allocated data that &lt;b&gt;initialized to zero by default&lt;/b&gt;
 are kept in what is called the BSS area of the process.&amp;nbsp; Each  process 
running the same program has its own BSS area.&amp;nbsp; When  running, the BSS 
data are placed in the data segment.&amp;nbsp; In the  executable file, they are 
stored in the &lt;b&gt;BSS section&lt;/b&gt;.&amp;nbsp;  For Linux/Unix the format 
of an executable, only variables that  are initialized to a nonzero 
value occupy space in the executable’s  disk file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="100"&gt;&lt;b&gt;Heap&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;The heap is where dynamic memory (obtained  by  malloc(),  calloc(),
   realloc()  and  new  for C++) comes from.&amp;nbsp; Everything  on a heap is 
anonymous, thus you can only access parts of it through  a pointer. As 
memory is allocated on the heap, the process’s  address space grows.&amp;nbsp; 
Although it is possible to give memory  back to the system and shrink a 
process’s address space, this is  almost never done because it will be 
allocated to other process  again.&amp;nbsp;&amp;nbsp; Freed memory (free() and   delete) 
goes  back to the heap, creating what is called holes.&amp;nbsp; &amp;nbsp;It  is typical 
for the heap to &lt;b&gt;grow upward&lt;/b&gt;.&amp;nbsp; This means  that 
successive items that are added to the heap are added at addresses  that
 are numerically greater than previous items.&amp;nbsp; It is also  typical for 
the heap to start immediately after the BSS area of  the data segment.&amp;nbsp; 
The end of the  heap is marked by a pointer known as the &lt;b&gt;break&lt;/b&gt;.
 You cannot  reference past the break. You can, however, move the break 
pointer  (via  brk()  and  sbrk()  system calls) to a new position to 
increase the amount of heap memory  available.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="100"&gt;&lt;b&gt;Stack&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;The stack segment is where &lt;b&gt;local (automatic) variables are allocated&lt;/b&gt;.&amp;nbsp;
  In C program, local variables are all variables declared inside  the 
opening left curly brace of a function body including the  main()  or 
other left curly brace that aren’t defined as static.&amp;nbsp; The data is 
popped up or pushed into the  stack following the &lt;b&gt;Last In First Out&lt;/b&gt;
 (LIFO) rule.&amp;nbsp;  The stack holds local variables, temporary information, 
function  parameters, return address and the like.&amp;nbsp; When a function is  
called, a &lt;b&gt;stack frame&lt;/b&gt; (or a procedure activation 
record)  is created and  PUSHed  onto the top of the stack. This stack 
frame contains information  such as the address from which the function 
was called and where  to jump back to when the function is finished (&lt;b&gt;return address&lt;/b&gt;),
  parameters, local variables, and any other information needed by  the 
invoked function. The order of the information may vary by system  and 
compiler.&amp;nbsp; When a function returns, the stack frame is  POPped  from the
 stack.&amp;nbsp; Typically the &lt;b&gt;stack grows downward&lt;/b&gt;,  meaning that items deeper in the call chain are at numerically lower  addresses and toward the heap.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;Example code:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
int f1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //bss (where is data(variable&amp;amp;constant) stored)&lt;br /&gt;
int f2=0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //bss&lt;br /&gt;
int f3=1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //data&lt;br /&gt;
static int f4 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp; //bss&lt;br /&gt;
static int f5 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; //data&lt;br /&gt;
int main ()&lt;br /&gt;
{&lt;br /&gt;
int a[2];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
int b1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
int b2 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
int b3 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
char b5[]= “abc”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
static int c[2];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //uninitialized static, bss (initialized to 0 by default)&lt;br /&gt;
static int d1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //uninitialized static, bss (initialized to 0 by default)&lt;br /&gt;
static int d2 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //zero initialization = uninitialized, bss&lt;br /&gt;
static int d3 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //nonzero init, data&lt;br /&gt;
static int d4 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //nonzero init, data&lt;br /&gt;
const int e1 = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
const int e2 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //stack&lt;br /&gt;
char *p1 = “abc”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //p1: stack, *p1 (“abc”): data&lt;br /&gt;
char *p2 = “abcd”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //p2: stack, *p2 (“abcd”): data&lt;br /&gt;
static int *p3 = &amp;amp;b1;&amp;nbsp; //p3:bss&lt;br /&gt;
static int *p4;&amp;nbsp; //p4:bss, *p4: 0;&lt;br /&gt;
int *p5 = NULL; //p5: stack, *p5: 0&lt;br /&gt;
static int *p6 = NULL; //p6:bss, 0&lt;br /&gt;
int *p7;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //p7: stack,&lt;br /&gt;
static char * p8 = “abc”;&amp;nbsp;&amp;nbsp;&amp;nbsp; //p8:data, *p8 (“abc”): data, same as *p1&lt;br /&gt;
int b4 = 1;&lt;br /&gt;
static int * p9 = &amp;amp;b4; //p9:bss&lt;br /&gt;
d1 = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; //d1: bss&lt;br /&gt;
int *p10 = (int*)malloc(sizeof(int));&amp;nbsp;&amp;nbsp; //p10: stack, *p10:heap&lt;br /&gt;
*p10 = 1;&lt;br /&gt;
static char *p11 = (char*)malloc(sizeof(char)); //p11: bss, *p11:heap&lt;br /&gt;
*p11 = ‘a’;&lt;br /&gt;
printf(“Local variables:\n\n”);&lt;br /&gt;
printf(“int a[0]: %d (stack)\n”,a);&lt;br /&gt;
printf(“int a[1]: %d (stack)\n”,a+1);&lt;br /&gt;
printf(“int b1: %d (stack)\n”,&amp;amp;b1);&lt;br /&gt;
printf(“int b2=0: %d (stack)\n”,&amp;amp;b2);&lt;br /&gt;
printf(“int b3=1: %d (stack)\n”,&amp;amp;b3);&lt;br /&gt;
printf(“char b5[]=\”abc\”: %d (*b5 \”abc\”, stack)\n”,b5);&lt;br /&gt;
printf(“const int e1=0: %d (stack)\n”,&amp;amp;e1);&lt;br /&gt;
printf(“const int e2=1: %d (stack)\n”,&amp;amp;e2);&lt;br /&gt;
printf(“char * p1=\”abc\”: %d (p1, stack)\n”,&amp;amp;p1);&lt;br /&gt;
printf(“char * p2=\”abc\”: %d (p2, stack)\n”,&amp;amp;p2);&lt;br /&gt;
printf(“int * p5 = NULL: %d (p5, stack)\n”,&amp;amp;p5);&lt;br /&gt;
printf(“int * p7: %d (p7, stack)\n”,&amp;amp;p7);&lt;br /&gt;
printf(“\n”);&lt;br /&gt;
printf(“int *p10 = (int *)malloc(int): %d (p10,stack)\n”,&amp;amp;p10);&lt;br /&gt;
printf(“\n”);&lt;br /&gt;
printf(“static int c[0]: %d (bss)\n”,c);&lt;br /&gt;
printf(“static int c[1]: %d (bss)\n”,c+1);&lt;br /&gt;
printf(“static int d1: %d (bss)\n”,&amp;amp;d1);&lt;br /&gt;
printf(“static int d2=0: %d (bss)\n”,&amp;amp;d2);&lt;br /&gt;
printf(“static int * p3 = &amp;amp;b1: %d (p3, bss)\n”,&amp;amp;p3);&lt;br /&gt;
printf(“static int * p4: %d (p4, bss)\n”,&amp;amp;p4);&lt;br /&gt;
printf(“static int * p6 = NULL: %d (p6, bss)\n”,&amp;amp;p6);&lt;br /&gt;
printf(“static int * p9 = &amp;amp;b4, b4=1: %d (p9, bss)\n”,&amp;amp;p9);&lt;br /&gt;
printf(“d1 = 1: %d (bss)\n”,&amp;amp;d1);&lt;br /&gt;
printf(“static int *p11 = (int*)malloc(int): %d (p11,bss)\n”,&amp;amp;p11);&lt;br /&gt;
printf(“\n”);&lt;br /&gt;
printf(“static int d3=1: %d (data)\n”,&amp;amp;d3);&lt;br /&gt;
printf(“static int d4=1: %d (data)\n”,&amp;amp;d4);&lt;br /&gt;
printf(“\n”);&lt;br /&gt;
printf(“static char * p8 = \”abc\”: %d (p8, data)\n”,&amp;amp;p8);&lt;br /&gt;
printf(“char * p1=\”abc\”: %d (*p1 \”abc\”, data)\n”,p1);&lt;br /&gt;
printf(“static char * p8 = \”abc\”: %d (*p8 \”abc\”, data)\n”,p8);&lt;br /&gt;
printf(“char * p2=\”abcd\”: %d (*p2 \”abcd\”, data)\n”,p2);&lt;br /&gt;
printf(“\n”);&lt;br /&gt;
printf(“static int * p4: %d (*p4, 0)\n”,p4);&lt;br /&gt;
printf(“int * p5 = NULL: %d (*p5, 0)\n”,p5);&lt;br /&gt;
printf(“\nHeap:\n”);&lt;br /&gt;
printf(“int *p10 = (int *)malloc(int): %d (*p10:1,Heap)\n”,p10);&lt;br /&gt;
printf(“static char *p11 = (int*)malloc(int): %d (*p11:’a',Heap)\n”,p11);&lt;br /&gt;
printf(“\n\nGlobal variables:\n”);&lt;br /&gt;
printf(“int f1: %d (bss)\n”,&amp;amp;f1);&lt;br /&gt;
printf(“int f2=0: %d (bss)\n”,&amp;amp;f2);&lt;br /&gt;
printf(“static int f4: %d (bss)\n”,&amp;amp;f4);&lt;br /&gt;
printf(“\n”);&lt;br /&gt;
printf(“int f3=1: %d (data)\n”,&amp;amp;f3);&lt;br /&gt;
printf(“static int f5=1: %d (data)\n”,&amp;amp;f5);&lt;br /&gt;
system(“pause”);&lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Result:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Local variables:&lt;br /&gt;
int a[0]: 2359152 (stack)&lt;br /&gt;
int a[1]: 2359156 (stack)&lt;br /&gt;
int b1: 2359148 (stack)&lt;br /&gt;
int b2=0: 2359144 (stack)&lt;br /&gt;
int b3=1: 2359140 (stack)&lt;br /&gt;
char b5[]=”abc”: 2359136 (*b5 “abc”, stack)&lt;br /&gt;
const int e1=0: 2359132 (stack)&lt;br /&gt;
const int e2=1: 2359128 (stack)&lt;br /&gt;
char * p1=”abc”: 2359124 (p1, stack)&lt;br /&gt;
char * p2=”abc”: 2359120 (p2, stack)&lt;br /&gt;
int * p5 = NULL: 2359116 (p5, stack)&lt;br /&gt;
int * p7: 2359112 (p7, stack)&lt;br /&gt;
int *p10 = (int *)malloc(int): 2359104 (p10,stack)&lt;br /&gt;
static int c[0]: 4468840 (bss)&lt;br /&gt;
static int c[1]: 4468844 (bss)&lt;br /&gt;
static int d1: 4468856 (bss)&lt;br /&gt;
static int d2=0: 4468872 (bss)&lt;br /&gt;
static int * p3 = &amp;amp;b1: 4468888 (p3, bss)&lt;br /&gt;
static int * p4: 4468904 (p4, bss)&lt;br /&gt;
static int * p6 = NULL: 4468920 (p6, bss)&lt;br /&gt;
static int * p9 = &amp;amp;b4, b4=1: 4468936 (p9, bss)&lt;br /&gt;
d1 = 1: 4468856 (bss)&lt;br /&gt;
static int *p11 = (int*)malloc(int): 4468952 (p11,bss)&lt;br /&gt;
static int d3=1: 4452360 (data)&lt;br /&gt;
static int d4=1: 4452364 (data)&lt;br /&gt;
static char * p8 = “abc”: 4452368 (p8, data)&lt;br /&gt;
char * p1=”abc”: 4456448 (*p1 “abc”, data)&lt;br /&gt;
static char * p8 = “abc”: 4456448 (*p8 “abc”, data)&lt;br /&gt;
char * p2=”abcd”: 4456452 (*p2 “abcd”, data)&lt;br /&gt;
static int * p4: 0 (*p4, 0)&lt;br /&gt;
int * p5 = NULL: 0 (*p5, 0)&lt;br /&gt;
&lt;br /&gt;
Heap:&lt;br /&gt;
int *p10 = (int *)malloc(int): 212064 (*p10:1,Heap)&lt;br /&gt;
static char *p11 = (int*)malloc(int): 212168 (*p10:’a',Heap)&lt;br /&gt;
&lt;br /&gt;
Global variables:&lt;br /&gt;
int f1: 4468752 (bss)&lt;br /&gt;
int f2=0: 4468756 (bss)&lt;br /&gt;
static int f4: 4468776 (bss)&lt;br /&gt;
int f3=1: 4452352 (data)&lt;br /&gt;
static int f5=1: 4452356 (data)&lt;br /&gt;
&lt;br /&gt;
Reference: http://alenblog.wordpress.com/2010/01/11/memory-allocation-segmentation-in-cc-language&lt;br /&gt;
&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-5239346485910644387?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/OqNWin73JKA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/5239346485910644387/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2012/02/memory-allocationsegmentation-in-cc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5239346485910644387?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5239346485910644387?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/OqNWin73JKA/memory-allocationsegmentation-in-cc.html" title="Memory Allocation/Segmentation in C/C++" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2012/02/memory-allocationsegmentation-in-cc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEFSXs8eyp7ImA9WhdaEkg.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-4232091053927601983</id><published>2011-10-22T08:00:00.000+05:30</published><updated>2011-10-22T08:00:18.573+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-22T08:00:18.573+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse" /><title>Eclipse - Cut Copy Paste Not Working</title><content type="html">&lt;u&gt;&lt;b&gt;PROBLEM&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
If in an editor :&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;when you try to copy text
 and paste it, nothing happens.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;when you try to cut text and paste it, nothing happens or eclipse creates mess&lt;/li&gt;
&lt;/ul&gt;
&lt;u&gt;&lt;b&gt;SOLUTION &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
For my problem, I had to go to Window &amp;gt; Preferences &amp;gt; Java &amp;gt; Editor &amp;gt; Typing, and uncheck "Update imports"&lt;br /&gt;
&lt;script type="text/javascript"&gt;
 
&lt;/script&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
 
&lt;/script&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
In an editor (xml, jsp, doesnt matter which one) I try to copy something
 and paste it somewhere else, nothing happens. When I cut out something 
and put it somewhere else I sometimes get something else (like a messed 
up part of my previous selection) or just some whitespaces. This gets 
even worse when I change lines in between.
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-4232091053927601983?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/aHFva60rmiA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/4232091053927601983/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/10/eclipse-cut-copy-paste-not-working.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4232091053927601983?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4232091053927601983?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/aHFva60rmiA/eclipse-cut-copy-paste-not-working.html" title="Eclipse - Cut Copy Paste Not Working" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/10/eclipse-cut-copy-paste-not-working.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUERXc-cSp7ImA9WhdbEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-7818247396675305367</id><published>2011-10-10T11:42:00.006+05:30</published><updated>2011-10-10T11:43:24.959+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-10T11:43:24.959+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Andriod" /><title>Android Secret Codes</title><content type="html">&lt;br /&gt;
&lt;img alt="Android secret codes, Android hidden codes" class="aligncenter size-full wp-image-782" height="302" src="http://cdn.technoreview.net/wp-content/uploads/2011/09/android-secret-codes.jpg" title="android secret codes" width="320" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;span style="font-size: small;"&gt;*#*#4636#*#* phone information&lt;br /&gt; *2767*3855# hard reset&lt;br /&gt; *#*#7780#*#* factory reset&lt;br /&gt; *#*#7594#*#* change end call/power option&lt;br /&gt; *#*#197328640#*#* service mode&lt;br /&gt; *#*#273283*255*663282*#*#* file copy screen (backup media files)&lt;br /&gt; *#*#526#*#* wlan test&lt;br /&gt; *#*#232338#*#* shows &lt;a href="http://technoreview.net/tag/wifi" title="wifi"&gt;wifi&lt;/a&gt; mac address&lt;br /&gt; *#*#1472365#*#* gps test&lt;br /&gt; *#*#1575#*#* another gps test&lt;br /&gt; *#*#232331#*#* bluetooth test&lt;br /&gt; *#*#232337#*# shows bluetooth device address&lt;br /&gt; *#*#8255#*#* gtalk service monitor &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt; *#*#0283#*#* packet loopback&lt;br /&gt; *#*#0*#*#* lcd test&lt;br /&gt; *#*#0673#*#* melody test&lt;br /&gt; *#*#0842#*#* device test (vibration test and backlight test)&lt;br /&gt; *#*#2663#*#* touch screen version&lt;br /&gt; *#*#2664#*#* touch screen test&lt;br /&gt; *#*#0588#*#* proximity sensor test&lt;br /&gt; *#*#3264#*#* ram version codes to get firmware version information:&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;span style="font-size: small;"&gt;*#*#4986*2650468#*#* pda, phone, h/w, rfcalldate&lt;br /&gt; *#*#1234#*#* pda and phone&lt;br /&gt; *#*#1111#*#* fta sw version&lt;br /&gt; *#*#2222#*#* fta hw version&lt;br /&gt; *#*#44336#*#* pda, phone, csc, build time, changelist number&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: inherit;"&gt;
&lt;span style="font-size: small;"&gt;Warning: be carefull, use &lt;span style="text-decoration: underline;"&gt;&lt;a href="http://www.google.co.id/url?sa=t&amp;amp;source=web&amp;amp;cd=19&amp;amp;ved=0CGEQFjAIOAo&amp;amp;url=http%3A%2F%2Frasadigital.com%2Fkode-rahasia-ponsel-android-samsung-galaxy-s%2F&amp;amp;ei=EdZmTuG9B8GurAeOgLHjCg&amp;amp;usg=AFQjCNGzuXTlsTIZW1ovU5yFwnloESEsdg" target="_blank"&gt;Android secret code&lt;/a&gt;s&lt;/span&gt; with your own risk :&lt;/span&gt;&lt;/div&gt;
&lt;ul style="font-family: inherit;"&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;If
 already pressing Hard Reset code, it will process immediately, there is
 no Cancel option.&amp;nbsp;Hard Reset will remove all the files &amp;amp; settings 
on the internal memory, or equal to reformat the firmware.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;The Factory Reset just delete accounts and configuration in system &amp;amp; application settings.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-7818247396675305367?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/BTRZzwZP4nk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/7818247396675305367/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/10/android-secret-codes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7818247396675305367?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7818247396675305367?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/BTRZzwZP4nk/android-secret-codes.html" title="Android Secret Codes" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/10/android-secret-codes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQFR3k8eip7ImA9WhdSGEk.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-6949881543520374460</id><published>2011-07-28T14:40:00.002+05:30</published><updated>2011-07-28T14:41:56.772+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-28T14:41:56.772+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Unix" /><category scheme="http://www.blogger.com/atom/ns#" term="Shell Script" /><title>"IF" statement test condtions in Shell Script</title><content type="html">Following are some "IF" Statement constructs to test conditions provided by the shell: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;-b file = True if the file exists and is block special file. &lt;/li&gt;
&lt;li&gt;-c file = True if the file exists and is character special file. &lt;/li&gt;
&lt;li&gt;-d file = True if the file exists and is a directory. &lt;/li&gt;
&lt;li&gt;-e file = True if the file exists. &lt;/li&gt;
&lt;li&gt;-f file = True if the file exists and is a regular file &lt;/li&gt;
&lt;li&gt;-g file = True if the file exists and the set-group-id bit is set. &lt;/li&gt;
&lt;li&gt;-k file = True if the files' "sticky" bit is set. &lt;/li&gt;
&lt;li&gt;-L file = True if the file exists and is a symbolic link. &lt;/li&gt;
&lt;li&gt;-p file = True if the file exists and is a named pipe. &lt;/li&gt;
&lt;li&gt;-r file = True if the file exists and is readable. &lt;/li&gt;
&lt;li&gt;-s file = True if the file exists and its size is greater than zero. &lt;/li&gt;
&lt;li&gt;-s file = True if the file exists and is a socket. &lt;/li&gt;
&lt;li&gt;-t fd = True if the file descriptor is opened on a terminal. &lt;/li&gt;
&lt;li&gt;-u file = True if the file exists and its set-user-id bit is set. &lt;/li&gt;
&lt;li&gt;-w file = True if the file exists and is writable. &lt;/li&gt;
&lt;li&gt;-x file = True if the file exists and is executable. &lt;/li&gt;
&lt;li&gt;-O file = True if the file exists and is owned by the effective user id. &lt;/li&gt;
&lt;li&gt;-G file = True if the file exists and is owned by the effective group id. &lt;/li&gt;
&lt;li&gt;file1 –nt file2 = True if file1 is newer, by modification date, than file2. &lt;/li&gt;
&lt;li&gt;file1 ot file2 = True if file1 is older than file2. &lt;/li&gt;
&lt;li&gt;file1 ef file2 = True if file1 and file2 have the same device and inode numbers. &lt;/li&gt;
&lt;li&gt;-z string = True if the length of the string is 0. &lt;/li&gt;
&lt;li&gt;-n string = True if the length of the string is non-zero. &lt;/li&gt;
&lt;li&gt;string1 = string2 = True if the strings are equal. &lt;/li&gt;
&lt;li&gt;string1 != string2 = True if the strings are not equal. &lt;/li&gt;
&lt;li&gt;!expr = True if the expr evaluates to false. &lt;/li&gt;
&lt;li&gt;expr1 –a expr2 = True if both expr1 and expr2 are true. &lt;/li&gt;
&lt;li&gt;expr1 –o expr2 = True is either expr1 or expr2 is true.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-6949881543520374460?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/ez9ba2s2MzI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/6949881543520374460/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/07/if-statement-test-condtions-in-shell.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/6949881543520374460?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/6949881543520374460?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/ez9ba2s2MzI/if-statement-test-condtions-in-shell.html" title="&quot;IF&quot; statement test condtions in Shell Script" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/07/if-statement-test-condtions-in-shell.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQGRX4-eCp7ImA9WhdSGEk.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-3083099768889717064</id><published>2011-07-26T21:31:00.001+05:30</published><updated>2011-07-28T14:42:04.050+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-28T14:42:04.050+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Unix" /><category scheme="http://www.blogger.com/atom/ns#" term="Shell Script" /><title>'Type' example in Shell Script</title><content type="html">Here we are calling functions directly using 'type' after parsing them in SUB_CMD through command line:&lt;br /&gt;
&lt;br /&gt;
############################################## &lt;br /&gt;
PROG_NAME="$(basename $0)"&lt;br /&gt;
SUB_CMD="$1"&lt;br /&gt;
retval=0&lt;br /&gt;
if [ "$(type -t "${SUB_CMD}")" == 'function' ] ; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ${SUB_CMD}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; retval=$?&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Invalid command '${SUB_CMD}'"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; usage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; retval=1&lt;br /&gt;
fi&lt;br /&gt;
exit ${retval}&lt;br /&gt;
############################################## &lt;br /&gt;
&lt;script type="text/javascript"&gt;
##==============================================================================
# Main Execution
##==============================================================================
# Parse command line arguments.
#PROG_NAME="$(basename $0)"
#SUB_CMD="$1"
#ARG="$2"
#ARG_VALUE="$3"
#retval=0
#if [ "$(type -t "${SUB_CMD}")" == 'function' ] ; then
#    ${SUB_CMD}
#    retval=$?
#else
#    echo "Invalid command '${SUB_CMD}'"
#    usage
#    retval=1
#fi
#exit ${retval}var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-3083099768889717064?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/ft6ZqW2LCBY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/3083099768889717064/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/07/type-example-in-shell-script.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/3083099768889717064?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/3083099768889717064?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/ft6ZqW2LCBY/type-example-in-shell-script.html" title="'Type' example in Shell Script" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/07/type-example-in-shell-script.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08NRn4yfCp7ImA9WhdSFkQ.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-2640685833036973174</id><published>2011-07-26T21:28:00.000+05:30</published><updated>2011-07-26T21:28:17.094+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-26T21:28:17.094+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>Spiral Traversal of Matrix</title><content type="html">#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int mat[4][3] = {{1,2,3}, {4,5,6}, {7,8,9}, {10,11,12}};&lt;br /&gt;
&lt;br /&gt;
void print_spiral(int mat[4][3], int m, int n, int k) {&lt;br /&gt;
&amp;nbsp; if (m &amp;lt;= 0 || n &amp;lt;= 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; if (m == 1) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int j = 0; j &amp;lt; n; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; mat[k][k+j] &amp;lt;&amp;lt; " ";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; if (n == 1) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; m; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; mat[k+i][k] &amp;lt;&amp;lt; " ";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; // print from top left&lt;br /&gt;
&amp;nbsp; for (int j = 0; j &amp;lt; n - 1; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; mat[k][k+j] &amp;lt;&amp;lt; " ";&lt;br /&gt;
&amp;nbsp; // print from top right&lt;br /&gt;
&amp;nbsp; for (int i = 0; i &amp;lt; m - 1; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; mat[k+i][k+n-1] &amp;lt;&amp;lt; " ";&lt;br /&gt;
&amp;nbsp; // print from bottom right&lt;br /&gt;
&amp;nbsp; for (int j = 0; j &amp;lt; n - 1; j++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; mat[k+m-1][k+n-1-j] &amp;lt;&amp;lt; " ";&lt;br /&gt;
&amp;nbsp; // print from bottom left&lt;br /&gt;
&amp;nbsp; for (int i = 0; i &amp;lt; m - 1; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; mat[k+m-1-i][k] &amp;lt;&amp;lt; " ";&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; print_spiral(mat, m-2, n-2, k+1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int m = 4;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int n = 3;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print_spiral(mat, m, n, 0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;script type="text/javascript"&gt;
#include &lt;iostream&gt;
using namespace std;

int mat[4][3] = {{1,2,3}, {4,5,6}, {7,8,9}, {10,11,12}};

void print_spiral(int mat[4][3], int m, int n, int k) {
if (m &lt;= 0 || n &lt;= 0)
return;
if (m == 1) {
for (int j = 0; j &lt; n; j++)
cout &lt;&lt; mat[k][k+j] &lt;&lt; " ";
return;
}
if (n == 1) {
for (int i = 0; i &lt; m; i++)
cout &lt;&lt; mat[k+i][k] &lt;&lt; " ";
return;
}
// print from top left
for (int j = 0; j &lt; n - 1; j++)
cout &lt;&lt; mat[k][k+j] &lt;&lt; " ";
// print from top right
for (int i = 0; i &lt; m - 1; i++)
cout &lt;&lt; mat[k+i][k+n-1] &lt;&lt; " ";
// print from bottom right
for (int j = 0; j &lt; n - 1; j++)
cout &lt;&lt; mat[k+m-1][k+n-1-j] &lt;&lt; " ";
// print from bottom left
for (int i = 0; i &lt; m - 1; i++)
cout &lt;&lt; mat[k+m-1-i][k] &lt;&lt; " ";

print_spiral(mat, m-2, n-2, k+1);
}

int main()
{
int m = 4;
int n = 3;

print_spiral(mat, m, n, 0);
return 0;
}var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-2640685833036973174?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/wfXnJGuLz_c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/2640685833036973174/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/07/spiral-traversal-of-matrix.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/2640685833036973174?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/2640685833036973174?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/wfXnJGuLz_c/spiral-traversal-of-matrix.html" title="Spiral Traversal of Matrix" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/07/spiral-traversal-of-matrix.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8MRH8ycCp7ImA9WhZREUs.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-354735047218067217</id><published>2011-04-07T14:00:00.003+05:30</published><updated>2011-04-07T14:48:05.198+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-07T14:48:05.198+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="syslog" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="Unix" /><category scheme="http://www.blogger.com/atom/ns#" term="Log" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>Syslog Example</title><content type="html">&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;What is Syslog&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Syslog is a standard for logging program messages. It allows separation of the software that generates messages from the system that stores them and the software that reports and analyzes them. It also provides devices which would otherwise be unable to communicate a means to notify administrators of problems or performance.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Syslog can be used for computer system management and security auditing as well as generalized informational, analysis, and debugging messages. It is supported by a wide variety of devices (like printers and routers) and receivers across multiple platforms. Because of this, syslog can be used to integrate log data from many different types of systems into a central repository.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
Messages refer to a facility (auth, authpriv, daemon, cron, ftp, lpr, kern, mail, news, syslog, user, uucp, local0, ... , local7 ) and are assigned a priority/level (Emergency, Alert, Critical, Error, Warning, Notice, Info or Debug) by the sender of the message.&lt;br /&gt;
&lt;br /&gt;
Configuration allows directing messages to various local devices (console), files (/var/log/) or remote syslog daemons. Care must be taken when updating the configuration as omitting or misdirecting message facility.level can cause important messages to be ignored by syslog or overlooked by the administrator. Logger is a command line utility that can send messages to the syslog.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;b&gt;Configuring Syslog&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Syslog has 8 configurable log files that are available for the programmer to use. These log files are referred to as LOG_LOCALx where x is an integer from 0 to 7.&lt;br /&gt;
&lt;br /&gt;
Configure syslog with&amp;nbsp;&lt;/span&gt;LOG_LOCALx &amp;nbsp;by adding&amp;nbsp;following line in /etc/syslog.conf &amp;nbsp;file :&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;local0.*         /var/log/testlog&lt;/b&gt;&lt;br /&gt;
This tells syslog that any logs written to the LOG_LOCAL0, should be written in '/var/log/testlog' file.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;After updating /etc/syslog.conf, restart the syslogd daemon :&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;/etc/init.d/syslog restart&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;Log using Syslog&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now as we have configured the LOG_LOCAL0. We can write debugging information to our log file through syslog, as shown below in test program :&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;syslog.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;openlog ("Test", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL0);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;syslog (LOG_INFO, "Program started by User %d", getuid() );&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;syslog (LOG_ERR, "ERROR!");&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;closelog ();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The openlog function initiates syslog for our program. We just need to use once during the initiation of our program. Several options can be used to control the logging behavior, below is the explanation of the options used in the example above.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;Option &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Meaning&lt;/b&gt;&lt;br /&gt;
LOG_CONS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;When syslog fails to submit a message, it writes the message to system console&lt;br /&gt;
LOG_PID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Inserts the calling process' Process ID (PID) into the message&lt;br /&gt;
LOG_NODELAY &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Open and connect to syslog&lt;br /&gt;
LOG_LOCAL0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Where to write the logs&lt;br /&gt;
&lt;br /&gt;
The syslog call writes messages to our syslog facility LOG_LOCAL0. The first argument (LOG_INFO, LOG_ERR) specifies the log level or priority. This allows more fine tuning for example by specifying different logging files (or actions) for each logging level. See man -S3 syslog for the full list of debugging levels.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The format of the log messages is :&lt;/b&gt;&lt;br /&gt;
DATE TIME MACHINE-NAME PROGRAM-NAME[PID]: MESSAGE&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Output :&lt;/b&gt;&lt;br /&gt;
Apr  7 21:36:41 centos-osp Test[20304]: Program started by User 0&lt;br /&gt;
Apr  7 21:36:41 centos-osp Test[20304]: ERROR!&lt;/span&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-354735047218067217?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/Lab5Hs0CKjU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/354735047218067217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/04/syslog.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/354735047218067217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/354735047218067217?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/Lab5Hs0CKjU/syslog.html" title="Syslog Example" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/04/syslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UAQnk7fSp7ImA9WhZSE04.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-5537569495445035576</id><published>2011-03-28T22:24:00.000+05:30</published><updated>2011-03-28T22:24:03.705+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-28T22:24:03.705+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="glibc" /><category scheme="http://www.blogger.com/atom/ns#" term="gcc" /><category scheme="http://www.blogger.com/atom/ns#" term="Unix" /><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>glibc detected : double free or corruption (fasttop)</title><content type="html">While running a code after building it using glibc, if you get this error :&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;glibc detected : double free or corruption (fasttop)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 12px; font-weight: normal;"&gt;To fix this error export "&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 12px; font-weight: normal;"&gt;MALLOC_CHECK_" environment variable&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 12px; font-weight: normal;"&gt;:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 12px;"&gt;&lt;br /&gt;
export MALLOC_CHECK_=0&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Then, try running the program. It worked in my case.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-5537569495445035576?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/YJWFdIvvam4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/5537569495445035576/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/glibc-detected-double-free-or.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5537569495445035576?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5537569495445035576?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/YJWFdIvvam4/glibc-detected-double-free-or.html" title="glibc detected : double free or corruption (fasttop)" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/glibc-detected-double-free-or.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4NQH08cSp7ImA9WhZTFkQ.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-6284638189219476917</id><published>2011-03-21T14:29:00.001+05:30</published><updated>2011-03-21T14:29:51.379+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T14:29:51.379+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><category scheme="http://www.blogger.com/atom/ns#" term="XAM" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>eXtensible Access Method (XAM)</title><content type="html">&lt;div style="text-align: justify;"&gt;The XAM (eXtensible Access Method)  Interface specification “defines a standard access method (API) between  Consumers (application and management software) and Providers (storage  systems) to manage fixed content reference information storage services.  XAM includes metadata definitions to accompany data to achieve  application interoperability, storage transparency, and automation for  ILM-based practices, long term records retention, and information  security. XAM will be expanded over time to include other data types as  well as support additional implementations based on the XAM API to XAM  conformant storage systems.”&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The SNIA XAM standard access method is  designed to benefit storage vendors, software developers and the end  user community. It provides:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Interoperability&lt;/strong&gt; : applications can work with any XAM conformant storage system, information can be migrated and shared.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Compliance&lt;/strong&gt; : integrated record retention and disposition metadata.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;ILM Practices&lt;/strong&gt; : a framework for classification, policy, and implementation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Migration&lt;/strong&gt; : the ability to automate migration process to maintain long-term readability.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Discovery&lt;/strong&gt; : application-independent structured discovery avoids application obsolescence.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM anticipates that objects will  migrate from one storage medium to another during their lifetimes. For  instance, 10-year-old medical images stored on tape are now being  migrated to disk. Ten years from now, images in disk-based archives may  wind up on a storage platform that hasn’t been invented yet.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM relies on a flat address space that  isn’t tied to a specific storage device. XAM also assigns each object  (for example, an e-mail message) a unique identifier that exists for the  lifetime of the object. The identifier doesn’t change even if the  object is moved from one storage system to another, making it findable  and able to be traced to any XAM-enabled device.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM also has a language to express  metadata about the object. This metadata will provide key information  about each object that can be used to apply policies, such as a  retention period, without the need for the app that created the  information to access the object.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM has standardized the language for  expressing metadata, and work is ongoing to create standard formats for  different content types. For instance, likely metadata formats for  e-mail will include sender, recipient, and subject. The creators of the  standard had an eye on electronic discovery. XAM can search metadata, a  key requirement for legal discovery and internal corporate  investigations.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;To meet the industry challenges, the  storage industry requires a set of standard interfaces to enable more  functional and sophisticated products. These interfaces need to allow  multiple vendors to provide different classes of hardware and software  products that store, retrieve, and manage reference information reliably  and seamlessly.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;XAM Approach&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM provides an application programming  interface (XAM-API) that allows XAM applications to store data in a  fashion that does not depend on the specific storage system. XAM  provides the following important functionality to applications and  storage systems:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Reference information is associated with  a globally unique name. By binding reference information to a unique  name, an application can efficiently manage the reference information  without concern for the data’s actual location. Location independence  provides a mechanism for implementing Information Lifecycle Management  (ILM) practices within a XAM-based storage system itself.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Metadata is raised to the same level of  importance as the reference information itself. By bundling together  data and metadata (contextual data about the information being stored),  applications can more easily manage and share reference information,  which facilitates ILM.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Storage systems are accessed via a  standard, pluggable architecture. By standardizing the architecture,  customers can add and remove storage products without impacting  applications. The XAM architecture is a software framework that allows  XAM-enabled applications to interface with XAM-compliant vendor devices  in order to store and retrieve reference information in a  vendorindependent and location-independent manner.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A standard XAM storage provider  interface. XAM Storage System vendors can plug their systems into the  XAM API by creating a provider for the Vendor Interface Module API (VIM  API). XAM also provides a standardized set of management disciplines and  semantics for fixed content, such as retention, expiration, etc.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;XAM Architecture&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The XAM architecture is a software  framework that allows XAM-enabled applications to interface with  XAM-compliant vendor devices. The goal of this architecture is to allow  applications to take advantage of the XAM API (Application Programming  Interface) to store and retrieve reference information in a  vendor-independent and location-independent manner.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A primary requirement of the  architecture is the ability to support access to multiple vendors’ XAM  Storage Systems and multiple versions of the same vendor’s XAM Storage  System. That is, different versions of the XAM specification must be  able to access the same XAM Storage System, or, the same version of the  XAM specification must be able to access different versions of a XAM  Storage System. The architecture also allows multiple applications to  access the same XAM Storage System.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The XAM architecture provides a  mechanism for XAM Storage System vendors to create Vendor Interface  Modules (VIMs) that act as bridges between the XAM standard APIs and the  vendor’s XAM Storage Systems. How the VIMs connect to their respective  devices (for example, TCP/IP, SCSI, or a file system) is transparent to  the XAM standard API and the application. The connection is completely  encapsulated by the VIM; the applications should be unaware of the VIM’s  existence and functionality.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;XAM Approach, Object Model&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Three software modules (Toolkit, XAM,  and VIM APIs) are defined within the XAM architecture. The XAM  architecture uses these software modules to create a logical view of the  XAM Storage System. This logical view defines a set of objects that are  arranged hierarchically, providing a consistent abstraction that is  independent of a variety of implementation approaches.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM has three primary objects: the XSet, the XSystem, and the XAM Library:&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;An &lt;strong&gt;XSet&lt;/strong&gt; is the unit of  data that an application can commit to persistent storage within XAM… An  XSet is the addressable unit of storage in the XAM architecture from  the application’s perspective. For an application to store data in an  XSystem, the application must create an empty XSet, populate the XSet  fields with its data, and then commit the XSet to persistent storage. If  the commit is successful, the application is given a name for the XSet,  called a XUID. The application can use the XUID to access the data it  stored, exchange the XUID with another application so that it can  retrieve the XSet, use it to create application-specific relationships  between XUIDs, or use it for other purposes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;An &lt;strong&gt;XSystem&lt;/strong&gt; is a logical  container of one or more XSets. An XSystem may provide additional  capabilities for data storage management, which may ultimately influence  XSet data access and data management. These capabilities, such as  resource, security, migration, virtualization, resiliency, and  performance, are outside the scope of XAM. XAM accommodates these  XSystem capabilities by providing an XSet abstraction that obligates the  XSystem to the mutually agreed-to data storage management behavior and  rules.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The &lt;strong&gt;XAM Library&lt;/strong&gt; enables  an application to discover and communicate with multiple XAM Storage  Systems. The XAM Library allows applications to create and manage XAM  Sessions, to connect to and manipulate XSystems. Besides these  capabilities, the XAM Library also presents a number of fields  (properties or XStreams), which are pertinent to the XAM Library, and  describe its capabilities, configuration, and other characteristics… An  XSystem may map to a single storage array supplied by a storage vendor,  or maybe to a physical or logical partition of this array. It may also  map to an aggregation of several arrays, or several partitions residing  on the same or different arrays, supplied by the same or different  vendors. The implementations of these arrays may include different types  of storage hardware and media, e.g. Fibrechannel or SATA disk drives,  or optical disks or tape drives.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Data can be attached to any of the  primary objects. XAM defines the unit of data that can be attached to a  primary object as a field, of which there are two kinds: properties and  XStreams. Properties are used to contain simple kinds of data (strings,  integers, etc.), and have a simple set/get style API. XStreams are used  to contain larger and potentially more complex data (JPEGs, XML files,  or binary data) and are accessed as a stream of data through a  read/write style API. Regardless of the object to which the field is  attached, the same XAM field-manipulation APIs are used; they are scoped  to the appropriate object on which they operate (XAM Library, XSystem,  or XSet).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;XAM Query Language Grammar&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The XAM Query Language (XAM QL, or  XAMQuery) is modelled on the SQL select statement. Two parts to the  statement allow the application writer to control the contents of the  query. The first part (the select clause) specifies that the application  is requesting a list of XUID values. Unlike SQL, the return value  “.xset.xuid” is required, and shall be the only allowable value. The  second part (the where clause) allows specification of a subset of XSets  to be returned in the results. For XAM 1.0, the select clause shall be  present and contain only the keyword “select .xset.xuid”. The second  part of the query, the where clause, is optional and provides the  greatest amount of application control.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;XAM query should not be confused with  the more general-purpose SQL relational databases. XAM query is not  intended to provide the same performance guarantees seen in a mature  relational database management system. XAM Storage Systems are generally  designed to be archives of data, rather than relational databases.  Example uses of query include locating the following types of records:&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Archived medical data records for a patient.&lt;/li&gt;
&lt;li&gt;A collection of telephone data records referencing some phone number.&lt;/li&gt;
&lt;li&gt;A computer backup data set containing a named file.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;Refinements of these basic searches can be extended using the XAM query relational operators to narrow the search.&lt;/div&gt;&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-6284638189219476917?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/bCL9AUsdIgg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/6284638189219476917/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/extensible-access-method-xam.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/6284638189219476917?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/6284638189219476917?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/bCL9AUsdIgg/extensible-access-method-xam.html" title="eXtensible Access Method (XAM)" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/extensible-access-method-xam.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUADQXg6cCp7ImA9WhZTFkQ.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-1425875010842460912</id><published>2011-03-21T14:26:00.000+05:30</published><updated>2011-03-21T14:26:10.618+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T14:26:10.618+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>Good Style of Programming</title><content type="html">&lt;div style="text-align: justify;"&gt;Here are few tips to program your C / C++ code in good style :&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Break&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Using break is ok in loops. Ideally, the loop should be structured to  iterate in the most straightforward way. The break in the body can  detect the exceptional case that comes up during the iteration.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;for (i = 0; i &amp;lt; length; i++ )&lt;/div&gt;&lt;div style="text-align: justify;"&gt;{&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (&amp;lt;found&amp;gt;) break;&lt;br /&gt;
…&lt;/div&gt;&lt;div style="text-align: justify;"&gt;}&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;or&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;while (current != NULL)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;{&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (&amp;lt;found&amp;gt;) break;&lt;br /&gt;
…&lt;/div&gt;&lt;div style="text-align: justify;"&gt;}&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;While&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;while (TRUE) types loops are fine if they are really necessary. Often  you need this for the loop-and-a-half-type situation where you need to  first do some processing before you are able to test whether you need to  exit the loop. If the first statement of a while (TRUE) loop is the  test, then you should just put the test directly into the while  statement. If the bounds of iteration are known, then a for loop is  preferable.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Return&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A return in a place other than the end of a function body is potentially  vulgar. The early return can be used nicely if it detects and  immediately exits on an exceptional case-for example, a recursive base  case or an error case right at the beginning of a function. Sometimes  return can be used like a break inside a loop when some condition  becomes true. Be careful with return in the bodies of your functions-  experience shows they are responsible for a disproportionate number of  bugs. The programmer forgets about the early-return case and assumes the  function runs all the way to its end.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
Increment Operators ++, –&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Nice obvious uses of these are fine, but nesting it inside something  complicated is just asking for trouble. Find a more useful outlet for  your cleverness.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;for (i = 0; i &amp;lt; length; i++) … // Ok&lt;/div&gt;&lt;div style="text-align: justify;"&gt;while (–length) … // Ok&lt;/div&gt;&lt;div style="text-align: justify;"&gt;while (*t++ = *s++) … // Sick&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Switch&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;If you ever exploit the fall-through property of cases within a switch,  your documentation should definitely say so. It’s pretty unusual. !=, ==&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This is just a minor readability issue, but it’s nice to put in what you  are really testing for, rather than rely on the  anything-non-zero-is-true property. Even though the code may compile to  exactly the same thing, it reads a little nicer.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;if (*current) more clearly is if (*current != ”)&lt;br /&gt;
if (current) more clearly is if (current != NULL)&lt;br /&gt;
if (!count) more clearly is if (count == 0)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Boolean Values&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Boolean expressions and variables seem to be prone to redundancy and  awkwardness. Replace repetitive constructions with the more concise and  direct alternatives. If you have a boolean value, don’t use additional  != or == operators on it to test its value. Just use its value directly  or inverted. Also, watch for if-else statements that assign a variable  to true or false. The result from evaluating the test can go right into  the variable. A few examples :&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;if (flag == TRUE) more succinctly is if (flag)&lt;br /&gt;
if (matches &amp;gt; 0) more succinctly is found = (matches &amp;gt; 0);&lt;br /&gt;
found = TRUE;&lt;br /&gt;
else&lt;br /&gt;
found = FALSE;&lt;br /&gt;
if (hadError == FALSE) more succinctly is return !hadError;&lt;br /&gt;
return TRUE;&lt;br /&gt;
else&lt;br /&gt;
return FALSE;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Constants&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;#define-d constants should be independent; that is, you should only need  to change one #define to change something about a program. For example :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;#define RectWidth 3&lt;br /&gt;
#define RectHeight 2 /* WARNING: problem */&lt;br /&gt;
#define RectPerimeter 10&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;is not so hot, because if you wanted to  change RectWidth or RectHeight, you would also have to remember to  change RectPerimeter. A better way is :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;#define RectWidth 3&lt;br /&gt;
#define RectHeight 2&lt;br /&gt;
#define RectPerimeter (2*RectWidth + 2*RectHeight)&lt;/div&gt;&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-1425875010842460912?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/CJSsDOSVpfo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/1425875010842460912/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/good-style-of-programming.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/1425875010842460912?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/1425875010842460912?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/CJSsDOSVpfo/good-style-of-programming.html" title="Good Style of Programming" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/good-style-of-programming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUFQXc4cCp7ImA9WhZTFkQ.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-2467528479831579258</id><published>2011-03-21T14:00:00.000+05:30</published><updated>2011-03-21T14:00:10.938+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T14:00:10.938+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Dictionary" /><title>Ultimate Dictionary</title><content type="html">&lt;div style="text-align: justify;"&gt;I use online dictionary a lot in my work, so here I’m sharing with you an amazing online dictionary tool :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Ultimate Dictionary&lt;/strong&gt;, a  complete collection of dictionaries with which you can look up words  right on your Windows desktop. Ultimate Dictionary includes a huge  collection of dictionaries that enable you to look up definitions,  synonyms and translations to a bunch of different languages.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The program features a very simple,  minimalist interface with two main areas: on the left side, you can  choose to have either the list of available dictionaries or the list of  word results as you search. On the right, you’ll see words’ definitions  and/or translations. You can also enable the “Scan” mode in Ultimate  Dictionary, which makes the dictionary follow the mouse and displays a  pop-up window with the definition of the word right below the cursor.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Ultimate Dictionary is easy to use and  performs very fast searches. You can also customize the order in which  dictionaries appear, so that you can have your most frequently ones on  top of the list.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;With Ultimate Dictionary you can look up any word in more than 30 dictionaries at the same time, right from the desktop.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Pros&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Large variety of dictionaries&lt;/li&gt;
&lt;li&gt;Special “scan” mode to translate words under the mouse&lt;/li&gt;
&lt;li&gt;Fast searching&lt;/li&gt;
&lt;/ul&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;Cons&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Large installation file&lt;/li&gt;
&lt;li&gt;You can’t add new dictionaries&lt;/li&gt;
&lt;/ul&gt;&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-2467528479831579258?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/A8FsxfiLPEU" height="1" width="1"/&gt;</content><link rel="related" href="http://ultimate-dictionary.en.softonic.com/download" title="Ultimate Dictionary" /><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/2467528479831579258/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/ultimate-dictionary.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/2467528479831579258?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/2467528479831579258?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/A8FsxfiLPEU/ultimate-dictionary.html" title="Ultimate Dictionary" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/ultimate-dictionary.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcNQXg6eSp7ImA9WhZTFkQ.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-1897361224309206248</id><published>2011-03-21T13:52:00.002+05:30</published><updated>2011-03-21T13:58:10.611+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T13:58:10.611+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Search" /><category scheme="http://www.blogger.com/atom/ns#" term="People" /><title>Search People on Web</title><content type="html">&lt;div style="text-align: justify;"&gt;There are various reasons why we might  need to search for people, we may need to find a lost relative, an old  flame, a classmate or a business contact – but if we are using a search  engine such as Google or Yahoo to search for people, we have probably  realized by now that it might work in some cases but in most cases it  won’t.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;How come the best search engines fail so  miserably when it comes to people search? The answer lies in a little  known but very important part of the web called “&lt;strong&gt;the deep web&lt;/strong&gt;“.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Also known as “invisible web”, the term  “deep web” refers to a vast repository of underlying content, such as  documents in online databases that general-purpose web crawlers cannot  reach. The deep web content is estimated at 500 times that of the  surface web, yet has remained mostly untapped due to the limitations of  traditional search engines.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Since most personal profiles, public  records and other people-related documents are stored in databases and  not on static web pages, most of the higher-quality information about  people is simply “invisible” to a regular search engine.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Some of the site with Deep Web content are :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-oUSveuJhfko/TYcJ5sINB4I/AAAAAAAAGxw/6AuUktZwOGs/s1600/deep-web-sites.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="https://lh3.googleusercontent.com/-oUSveuJhfko/TYcJ5sINB4I/AAAAAAAAGxw/6AuUktZwOGs/s320/deep-web-sites.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Deep Web query-engine find content on  deep web pages that cannot be found on regular search engines. Unlike a  typical search-engine, they are designed to retrieve information from  the deep web, its bots interact with searchable databases and extract  data, contact details and other relevant information from personal  profiles, member directories, scientific publications, court records and  numerous other deep-web sources.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;It is not just about finding more  results, it uses advanced language-analysis and ranking algorithms to  bring us the most relevant bits of information about a person in a  single, easy-to-read results page.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Some of such good people search engines are :&lt;/strong&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.pipl.com/"&gt;http://www.pipl.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.spock.com/"&gt;http://www.spock.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.wink.com/"&gt;http://www.wink.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.peekyou.com/"&gt;http://www.peekyou.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.123people.com/"&gt;http://www.123people.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.biznar.com/"&gt;http://www.biznar.com&lt;/a&gt; for business professionals&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mednar.com/"&gt;http://www.mednar.com&lt;/a&gt; for medical professionals&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-1897361224309206248?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/ZsC0ESOw9ig" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/1897361224309206248/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/search-people-on-web.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/1897361224309206248?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/1897361224309206248?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/ZsC0ESOw9ig/search-people-on-web.html" title="Search People on Web" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/-oUSveuJhfko/TYcJ5sINB4I/AAAAAAAAGxw/6AuUktZwOGs/s72-c/deep-web-sites.gif" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/search-people-on-web.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcGQX85fip7ImA9WhZTFkQ.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-5802933489331338483</id><published>2011-03-21T13:46:00.003+05:30</published><updated>2011-03-21T13:57:00.126+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-21T13:57:00.126+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><category scheme="http://www.blogger.com/atom/ns#" term="Automate" /><title>AUTO IT</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh3.googleusercontent.com/-1X72PWMoHSk/TYcI_B3D6HI/AAAAAAAAGxs/K7B1Brs6v18/s1600/logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh3.googleusercontent.com/-1X72PWMoHSk/TYcI_B3D6HI/AAAAAAAAGxs/K7B1Brs6v18/s1600/logo.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt is a free BASIC-like scripting  language designed for automating the Windows GUI and general scripting.  It uses a combination of simulated keystrokes, mouse movement and  window/control manipulation in order to automate tasks in a way not  possible or reliable with other languages (e.g. VBScript and SendKeys).  AutoIt is very small, self-contained and runs on all versions of Windows  out-of-the-box with no annoying “runtimes” required!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt is a stand-alone application with  no external .dll files or registry entries required making it safe to  use on Servers. Scripts can be compiled into stand-alone executable with  Aut2Exe.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Also there is a combined COM and DLL  version of AutoIt called AutoItX that allows to add the unique features  of AutoIt to our favorite scripting or programming languages!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Features&lt;/strong&gt; :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Basic-like Syntax and Rich Function Set&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt has a BASIC-like syntax which  means that most people who have ever written a script or used a  high-level language should be able to pick it up easily.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Built-in Editor with Syntax Highlighting&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt comes with a customized “lite”  version of SciTe that makes editing scripts easy. Users can also  download a complete version of SciTe that includes additional tools to  make things even easier.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Standalone and Small&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt is a very small and standalone  application with no reliance on massive run times like .NET or VB. All  you need to run AutoIt scripts are the main AutoIt executable  (AutoIt3.exe) and the script. Scripts can also be encoded into  standalone executable with the built-in script compiler Aut2Exe.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;International and 64-bit Support&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt is fully Unicode aware and also includes x64 versions of all the main components!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Key and Mouse Simulation&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Much time has been spent optimizing the  keystroke and mouse simulation functions to be as accurate as possible  on all versions of Windows. All the mouse and keyboard routines are  highly configurable both in terms of simulation “speed” and  functionality.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Window Management&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You can expect to move, hide, show,  resize, activate, close and pretty much do what you want with windows.  Windows can be referenced by title, text on the window, size, position,  class and even internal Win32 API handles.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Controls&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Directly get information on and interact  with edit boxes, check boxes, list boxes, combos, buttons, status bars  without the risk of keystrokes getting lost. Even work with controls in  windows that aren’t active!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Graphical User Interfaces (GUIs)&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AutoIt provides facility to create some complex GUIs – just like those below :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-wpg3aQ00sr4/TYcI39fRRXI/AAAAAAAAGxo/Vcre7WBW9U4/s1600/gui_eg1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh4.googleusercontent.com/-wpg3aQ00sr4/TYcI39fRRXI/AAAAAAAAGxo/Vcre7WBW9U4/s1600/gui_eg1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-lU3yQkw9VNg/TYcI3fYJ90I/AAAAAAAAGxk/Amd4Y9phAg4/s1600/gui_eg2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://lh6.googleusercontent.com/-lU3yQkw9VNg/TYcI3fYJ90I/AAAAAAAAGxk/Amd4Y9phAg4/s1600/gui_eg2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;script type="text/javascript"&gt;
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21823464-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-5802933489331338483?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/BExxIttdUFM" height="1" width="1"/&gt;</content><link rel="related" href="http://www.autoitscript.com/site/autoit/" title="AUTO IT" /><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/5802933489331338483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/auto-it.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5802933489331338483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5802933489331338483?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/BExxIttdUFM/auto-it.html" title="AUTO IT" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/-1X72PWMoHSk/TYcI_B3D6HI/AAAAAAAAGxs/K7B1Brs6v18/s72-c/logo.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/auto-it.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAHRXc9eSp7ImA9Wx9aEk4.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-4151711741397701088</id><published>2011-03-04T15:45:00.000+05:30</published><updated>2011-03-04T15:45:34.961+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T15:45:34.961+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Application" /><category scheme="http://www.blogger.com/atom/ns#" term="Old Version" /><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><title>Old Version of Softwares / Applications</title><content type="html">&lt;div class="headline clearfix"&gt;&lt;h1&gt;&lt;span class="Apple-style-span" style="font-size: small; font-weight: normal;"&gt;&lt;strong&gt;Old is Gold, Looking for old version of your favorite Software or Utility&lt;/strong&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class="single_content"&gt;&lt;div style="text-align: justify;"&gt;Upgrading to a newer version is a good  thing. But,&amp;nbsp; your computer may not be compatible with the new version,  the new version is bloated, or all the options you liked are no longer  available. Often newer versions are more complicated to use and we  understand                that it is hard to find older, more  user-friendly versions of popular                software. Many software  providers do not include older versions of                their  software on their sites. Well here are some of the sites providing us  the old versions of our favorite software or utilities.&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;a href="http://www.oldversion.com/" target="_blank"&gt;http://www.oldversion.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.oldapps.com/" target="_blank"&gt;http://www.oldapps.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://old-versions.net/" target="_blank"&gt;http://old-versions.net/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-4151711741397701088?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/g4xhzBwMN0A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/4151711741397701088/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/old-version-of-softwares-utilities.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4151711741397701088?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4151711741397701088?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/g4xhzBwMN0A/old-version-of-softwares-utilities.html" title="Old Version of Softwares / Applications" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/old-version-of-softwares-utilities.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QFRnc6fip7ImA9Wx9aEk4.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-7191853838811045915</id><published>2011-03-04T15:05:00.000+05:30</published><updated>2011-03-04T15:05:17.916+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T15:05:17.916+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><category scheme="http://www.blogger.com/atom/ns#" term="temp files" /><category scheme="http://www.blogger.com/atom/ns#" term="cache" /><category scheme="http://www.blogger.com/atom/ns#" term="browser" /><title>Firefox’s Temporary Internet Files</title><content type="html">&lt;div style="text-align: justify;"&gt;&lt;strong&gt;Are you searching where Firefox stores its temporary internet files (cache) ?&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Well there is no need to go anywhere, solution lies within the Firefox browser.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Follow the below given steps and you can access all the files stored by Firefox :&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Open a new tab.&lt;/li&gt;
&lt;li&gt;In the address bar, write “&lt;strong&gt;about:cache&lt;/strong&gt;” and press enter.&lt;/li&gt;
&lt;li&gt;Following page will come up like shown in image below :&lt;/li&gt;
&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-2qh3xUywSSE/TXCwLDKYAFI/AAAAAAAAGwE/MABmTg3LxTw/s1600/1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="https://lh5.googleusercontent.com/-2qh3xUywSSE/TXCwLDKYAFI/AAAAAAAAGwE/MABmTg3LxTw/s320/1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;This page shows all the cache maintained by the Firefox browser.&lt;/li&gt;
&lt;li&gt;For Temporary Internet Files, we need to go for “&lt;strong&gt;Disk Cache&lt;/strong&gt;“.&lt;/li&gt;
&lt;li&gt;Click on the link given for Disk Cache on the about:cache page.&lt;/li&gt;
&lt;li&gt;Following page will come up like shown in image below :&lt;/li&gt;
&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-ZePf_hF1lp4/TXCwkLuM7ZI/AAAAAAAAGwI/gRkgnFRm8xE/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="https://lh5.googleusercontent.com/-ZePf_hF1lp4/TXCwkLuM7ZI/AAAAAAAAGwI/gRkgnFRm8xE/s320/2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;This page will list all the files being cached by the Firefox.&lt;/li&gt;
&lt;li&gt;Using find utility of Firefox search for the file you are looking for.&lt;/li&gt;
&lt;li&gt;After the finding that file click on the link given for that file as shown in above image.&lt;/li&gt;
&lt;li&gt;Following page will come up like shown in image below :&lt;/li&gt;
&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-ZL5RDOjwjbY/TXCyFmt3xEI/AAAAAAAAGwM/YtBmmzl9i64/s1600/3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="https://lh6.googleusercontent.com/-ZL5RDOjwjbY/TXCyFmt3xEI/AAAAAAAAGwM/YtBmmzl9i64/s320/3.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;This page will have link and all the details about that file.&lt;/li&gt;
&lt;li&gt;Right click on the link given for that file and select “&lt;strong&gt;Save link as&lt;/strong&gt;” option.&lt;/li&gt;
&lt;li&gt;A Save File dialog box will pop up, asking for the location to save the file.&lt;/li&gt;
&lt;li&gt;Select the location and click save. File will be saved on your desired location.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;This is applicable for any type  of file whether it is flash (.swf ), audio (.mp3, etc ), video ( .wmv,  etc ) or any image ( .jpg, etc ) file.&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-7191853838811045915?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/fLVSW2N6jmI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/7191853838811045915/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/firefoxs-temporary-internet-files.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7191853838811045915?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7191853838811045915?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/fLVSW2N6jmI/firefoxs-temporary-internet-files.html" title="Firefox’s Temporary Internet Files" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-2qh3xUywSSE/TXCwLDKYAFI/AAAAAAAAGwE/MABmTg3LxTw/s72-c/1.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/firefoxs-temporary-internet-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MEQH46cCp7ImA9Wx9aEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-7134614738192903000</id><published>2011-03-04T14:33:00.000+05:30</published><updated>2011-03-04T14:33:21.018+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T14:33:21.018+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Poem" /><category scheme="http://www.blogger.com/atom/ns#" term="Kumar Vishwas" /><title>Tum mujhko karna maaf priye – Poem By Dr. Kumar Vishwas</title><content type="html">&lt;div class="headline clearfix"&gt;&lt;h1&gt;&lt;span class="Apple-style-span" style="font-size: small; font-weight: normal;"&gt;&lt;strong&gt;Lyrics :&lt;/strong&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class="single_content"&gt; &lt;div style="text-align: justify;"&gt;O kalp-vraksh ki son-juhi, O amal-tas ki amar kali&lt;br /&gt;
Dharti ke aatap se jalte, Man par chaayi nirmal badli&lt;br /&gt;
Main tumko madhu-sad-gandh yukt, sansaar nahi de paunga !&lt;br /&gt;
Tum mujhko karna maaf priye main pyar nahi de paunga !!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Tum kalp-vraksh ka fool aur Main dharti ka adna gayak&lt;br /&gt;
Tum jeewan ke upbhog yogya Main nahi adhuri gazal shubhey&lt;br /&gt;
Tum saam-gaan si pawan ho Himshikharon par sehsa kaundha&lt;br /&gt;
Bijuri si tum man bhawan ho Isliye vyarth shabdo wala, vyapar nahi de paunga !&lt;br /&gt;
Tum mujhko karna maaf priye main pyar nahi de paunga !!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Tum jis shaiya par shayan karo, Veh sheer sindh si pawan ho&lt;br /&gt;
Jis aangan ki ho maul-shree Veh aangan kya vrandawan ho&lt;br /&gt;
Jin adhron ka chumban pao Veh adhar nahin ganga tat ho&lt;br /&gt;
Jiski chaya ban saath raho Veh vyakti nahin vanshi-vat ho&lt;br /&gt;
Par main vat jaisa saghan chaaon ,vistaar nahin de paunga !&lt;br /&gt;
Tum mujhko karna maaf main pyar nahi de paunga !!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Main tumko chand sitaron ka Saupun uphar bhala kaise&lt;br /&gt;
Main yayavar banjara sadhu sur-sansar bhala kaise&lt;br /&gt;
Main jeewan ke prashno se nata Tod, tumhare saath shubhe !&lt;br /&gt;
Barudi bichi dharti par kar loon Do pal pyar bhala kaise&lt;br /&gt;
Isliye vivash har aanson ko, satkaar nahi de paunga !&lt;br /&gt;
Tum mujhko karna maaf tumhe main pyar nahi de paunga !!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;~ Dr. Kumar Vishwas&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-7134614738192903000?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/4A1wdqhIGWc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/7134614738192903000/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/tum-mujhko-karna-maaf-priye-poem-by-dr.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7134614738192903000?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7134614738192903000?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/4A1wdqhIGWc/tum-mujhko-karna-maaf-priye-poem-by-dr.html" title="Tum mujhko karna maaf priye – Poem By Dr. Kumar Vishwas" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/tum-mujhko-karna-maaf-priye-poem-by-dr.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMESHY9fSp7ImA9Wx9aEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-1067157639063755645</id><published>2011-03-04T12:53:00.000+05:30</published><updated>2011-03-04T12:53:29.865+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T12:53:29.865+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Poem" /><category scheme="http://www.blogger.com/atom/ns#" term="Kumar Vishwas" /><title>Pagli Ladki – Poem By Dr. Kumar Vishwas</title><content type="html">&lt;div class="headline clearfix"&gt;&lt;h1&gt;&lt;span class="Apple-style-span" style="font-size: small; font-weight: normal;"&gt;&lt;strong&gt;Lyrics :&lt;/strong&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div class="single_content"&gt; &lt;div style="text-align: justify;"&gt;Amawas ki kaali raaton mein dil ka darwaja khulta hai,&lt;br /&gt;
Jab dard ki pyaali raaton mein gum ansoon ke sang hote hain,&lt;br /&gt;
Jab pichwade ke kamre mein hum nipat akele hote hain,&lt;br /&gt;
Jab ghadiyan tik-tik chalti hain, sab sote hain, hum rote hain,&lt;br /&gt;
Jab baar baar dohrane se saari yaadein chuk jaati hain,&lt;br /&gt;
Jab unch-neech samjhane mein mathe ki nas dukh jaati hain,&lt;br /&gt;
Tab ek pagli ladki ke bin jeena gaddari lagta hai,&lt;br /&gt;
Aur us pagli ladki ke bin marna bhi bhari lagta hai.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Jab pothe khali hote hain, jab har sawali hote hain,&lt;br /&gt;
Jab gazlen raas nahin aatin, afsane gaali hote hain.&lt;br /&gt;
Jab baasi feeki dhoop sametein din jaldi dhal jaata hai,&lt;br /&gt;
Jab suraj ka laskhar chhat se galiyon mein der se jaata hai,&lt;br /&gt;
Jab jaldi ghar jaane ki ichha mann hi mann ghut jaati hai,&lt;br /&gt;
Jab college se ghar laane waali pahli bus chhut jaati hai,&lt;br /&gt;
Jab beman se khaana khaane par maa gussa ho jaati hai,&lt;br /&gt;
Jab lakh mana karne par bhi paaro padhne aa jaati hai,&lt;br /&gt;
Jab apna har manchaha kaam koi lachari lagta hai,&lt;br /&gt;
Tab ek pagli ladki ke bin jeena gaddari lagta hai,&lt;br /&gt;
Aur us pagli ladki ke bin marna bhi bhari lagta hai.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Jab kamre mein sannate ki awaj sunai deti hai,&lt;br /&gt;
Jab darpan mein aankhon ke neeche jhai dikhai deti hai,&lt;br /&gt;
Jab badki bhabhi kahti hain, kuchh sehat ka bhi dhyan karo,&lt;br /&gt;
Kya likhte ho dinbhar, kuchh sapnon ka bhi samman karo,&lt;br /&gt;
Jab baba waali baithak mein kuchh rishte waale aate hain,&lt;br /&gt;
Jab baba humein bulate hain, hum jaate hain, ghabrate hain,&lt;br /&gt;
Jab saari pahne ek ladki ka ek photo laya jaata hai,&lt;br /&gt;
Jab bhabhi humein manati hain, photo dikhlaya jaata hai,&lt;br /&gt;
Jab saare ghar ka samjhana humko fankari lagta hai,&lt;br /&gt;
Tab ek pagli ladki ke bin jeena gaddari lagta hai,&lt;br /&gt;
Aur us pagli ladki ke bin marna bhi bhari lagta hai.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Didi kahti hain us pagli ladki ki kuchh aukat nahin,&lt;br /&gt;
Uske dil mein bhaiya tere jaise pyare jasbat nahin,&lt;br /&gt;
Woh pagli ladki nau din mere liye bhooki rahti hai,&lt;br /&gt;
Chup-chup saare vrat karti hai, par mujhse kabhi na kahti hai,&lt;br /&gt;
Jo pagli ladki kahti hai, main pyar tumhi se karti hoon,&lt;br /&gt;
Lekin mein hoon majboor bahut, amma-baba se darti hoon,&lt;br /&gt;
Us pagli ladki par apna kuchh adhikar nahin baba,&lt;br /&gt;
Yeh katha-kahani kisse hain, kuchh bhi to saar nahin baba,&lt;br /&gt;
Bas us pagli ladki ke sang jeena fulwari lagta hai,&lt;br /&gt;
Aur us pagli ladki ke bhin marna bhi bhari lagta hai&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;~ Dr. Kumar Vishwas&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-1067157639063755645?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/QEVDpFB-v6I" height="1" width="1"/&gt;</content><link rel="related" href="http://www.youtube.com/watch?v=nLguUMngR0k" title="Pagli Ladki – Poem By Dr. Kumar Vishwas" /><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/1067157639063755645/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/pagli-ladki-poem-by-dr-kumar-vishwas.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/1067157639063755645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/1067157639063755645?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/QEVDpFB-v6I/pagli-ladki-poem-by-dr-kumar-vishwas.html" title="Pagli Ladki – Poem By Dr. Kumar Vishwas" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/pagli-ladki-poem-by-dr-kumar-vishwas.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUGRXc8fyp7ImA9Wx9aEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-4244998202586769381</id><published>2011-03-04T12:50:00.000+05:30</published><updated>2011-03-04T12:50:24.977+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T12:50:24.977+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Quotes" /><category scheme="http://www.blogger.com/atom/ns#" term="Quotations" /><title>Quotations II</title><content type="html">&lt;div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; line-height: 21px;"&gt;&lt;strong&gt;Here are some of the finest quotes :&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 21px;"&gt;&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Failures are divided into two classes – those who thought and never did, and those who did and never thought”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Love is the triumph of imagination over intelligence”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Only two things are infinite, the universe and human stupidity, and I’m not sure about the former”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT’S relativity”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“A good speech is like a miniskirt – short enough to be interesting, long enough to cover the essentials”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“There’s a fine line between genius and insanity. I have erased that line”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Math was always my bad subject. I couldn’t convince my teachers that many of my answers were meant ironically”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Never ruin an apology with an excuse”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“America is the only country that went from barbarism to decadence without civilization in between”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“If we think we hear, we no longer listen If we think we see, we no longer look If we think we know, we no longer search”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies”&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-4244998202586769381?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/qECO9rIAByM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/4244998202586769381/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/quotations-ii.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4244998202586769381?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4244998202586769381?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/qECO9rIAByM/quotations-ii.html" title="Quotations II" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/quotations-ii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYDQHY6eip7ImA9Wx9aEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-5445892091312152468</id><published>2011-03-04T12:49:00.000+05:30</published><updated>2011-03-04T12:49:31.812+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T12:49:31.812+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Quotes" /><category scheme="http://www.blogger.com/atom/ns#" term="Quotations" /><title>Quotations I</title><content type="html">&lt;div class="post-body entry-content" style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 1.4; position: relative; width: 498px;"&gt;&lt;strong&gt;Here are some of the finest quotes :&lt;/strong&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“I certainly don’t regret my experiences because without them, I couldn’t imagine who or where I would be today. Life is an amazing gift to those who have overcome great obstacles, and attitude is everything!”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“When you have confidence, you can have a lot of fun. And when you have fun, you can do amazing things.”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Everybody is ignorant, only on different subjects”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“In theory, there is no difference between theory and practice. But, in practice, there is”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“I have never let my schooling interfere with my education”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“The real problem is not whether machines think but whether men do”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“He used statistics the way a drunkard uses lampposts – for support, not illumination”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“A women’s dress should be like a barbed wire fence, serving its purpose without obstructing the view”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Diplomacy: The art of letting someone have your way”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“He was a wise man who invented God”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“For every complex problem, there is a solution that is simple, neat, and wrong”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“When the world says, “Give up”, Hope whispers, “Try it one more time”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“When you come to the end of your rope, tie a knot and hang on”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Politicians are like diapers. They both need changing regularly and for the same reason”&lt;/li&gt;
&lt;li style="border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-color: initial; border-top-style: none; border-top-width: initial; border-width: initial; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 0px;"&gt;“Time is what prevents everything from happening at once”&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-5445892091312152468?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/fuLT6ne_NnM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/5445892091312152468/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/quotations-i.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5445892091312152468?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5445892091312152468?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/fuLT6ne_NnM/quotations-i.html" title="Quotations I" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/quotations-i.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEANSHw_fCp7ImA9Wx9aEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-5374925409693210141</id><published>2011-03-04T12:43:00.000+05:30</published><updated>2011-03-04T12:43:19.244+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T12:43:19.244+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>C++ Questions II</title><content type="html">&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br class="Apple-interchange-newline" /&gt;Q11. Should I use NULL or 0?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;In C++, the definition of NULL is 0, so there is only an aesthetic difference. I prefer to avoid macros, so I use 0. Another problem with NULL is that people sometimes mistakenly believe that it is different from 0 and/or not an integer. In pre-standard code, NULL was/is sometimes defined to something unsuitable and therefore had/has to be avoided. That’s less common these days.&lt;/div&gt;&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q12. How are C++ objects laid out in memory?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Like C, C++ doesn’t define layouts, just semantic constraints that must be met. Therefore different implementations do things differently. Basically, C++ constructs objects simply by concatenating sub objects. Thus&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;struct A&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;{&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;int a , b ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;} ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;is represented by two ints next to each other, and&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;struct B : A&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;{&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;int c;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;} ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;is represented by an A followed by an int; that is, by three ints next to each other.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Virtual functions are typically implemented by adding a pointer (the vptr) to each object of a class with virtual functions. This pointer points to the appropriate table of functions (the vtbl). Each class has its own vtbl shared by all objects of that class.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q13. What’s the value of i++ + i++?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;It’s undefined. Basically, in C and C++, if you read a variable twice in an expression where you also write it, the result is undefined. This is not a good practice. Another example is:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;v[i] = i++ ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Related example:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;f ( v[i] , i++ ) ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Here, the result is undefined because the order of evaluation of function arguments are undefined.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Having the order of evaluation undefined is claimed to yield better performing code. Compilers could warn about such examples, which are typically subtle bugs (or potential subtle bugs).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q14. What is a function object?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;A function object is a more general concept than a function because a function object can have state that persist across several calls (like a static local variable) and can be initialized and examined from outside the object (unlike a static local variable). For example:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class Sum&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;{&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;int val;&lt;br /&gt;
public:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Sum ( int i ) : val ( i ) { }&lt;br /&gt;
operator int () const { return val ; }  // extract value&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;int operator () ( int i ) { return val += i ; } // application&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;} ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;void f ( vector &amp;lt;int&amp;gt; v )&lt;br /&gt;
{&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Sum s = 0 ; // initial value 0&lt;br /&gt;
s = for_each ( v.begin(), v.end(), s ) ; // gather the sum of all elements&lt;br /&gt;
cout &amp;lt;&amp;lt; “the sum is ” &amp;lt;&amp;lt; s &amp;lt;&amp;lt; “\n” ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;// or even:&lt;br /&gt;
cout &amp;lt;&amp;lt; “the sum is ” &amp;lt;&amp;lt; for_each ( v.begin(), v.end(), Sum(0) ) &amp;lt;&amp;lt; “\n” ;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Note that a function object with an inline application operator inlines beautifully because there are no pointers involved that might confuse optimizers. To contrast: current optimizers are rarely ( never? ) able to inline a call through a pointer to function.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Function objects are extensively used to provide flexibility in the standard library.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q15. Why can’t I resume after catching an exception?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;In other words, why doesn’t C++ provide a primitive for returning to the point from which an exception was thrown and continuing execution from there?&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Basically, someone resuming from an exception handler can never be sure that the code after the point of throw was written to deal with the execution just continuing as if nothing had happened. An exception handler cannot know how much context to “get right” before resuming. To get such code right, the writer of the throw and the writer of the catch need intimate knowledge of each others code and context. This creates a complicated mutual dependency that wherever it has been allowed has led to serious maintenance problems.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;If you want to check to see if you can fix a problem before throwing an exception, call a function that checks and then throws only if the problem cannot be dealt with locally. A new_handler is an example of this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-5374925409693210141?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/H4Oj32VBL44" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/5374925409693210141/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/c-questions-ii.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5374925409693210141?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5374925409693210141?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/H4Oj32VBL44/c-questions-ii.html" title="C++ Questions II" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/c-questions-ii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEACRX8ycCp7ImA9Wx9aEk8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-7687753870800096026</id><published>2011-03-04T12:42:00.001+05:30</published><updated>2011-03-04T12:42:44.198+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-04T12:42:44.198+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C++" /><title>C++ Questions I</title><content type="html">&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br class="Apple-interchange-newline" /&gt;Q1. What is the output of printf ( “%d” ) ?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;%d helps to read integer data type of a given variable.&lt;br /&gt;
When we write ( “%d”, x ) compiler will print the value of x assumed in the main but nothing after ( “%d” ) so the output will be a garbage value.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q2. Explain the need for a virtual destructor.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Destructor for the base parts are invoked automatically.&lt;br /&gt;
We might delete a ptr to the base type that actually points to a derived object,&amp;nbsp; if we delete a ptr to base then the base class destructor is executed and the members of the base class are cleared up. If the object is a derived type then the behavior is undefined. To ensure that the proper destructor is invoked the destructor must be virtual in the base class.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q3. What is Mutable keyword ?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Mutable keyword is the key to make exceptions to const objects.&lt;br /&gt;
Mutable data member is allowed to change during a const member function.&lt;br /&gt;
Mutable data member is never a const even when it is a member of a const object.&lt;br /&gt;
A const member function may change a mutable member.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q4. Why is the size of an empty class not zero?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;To ensure that the addresses of two different objects will be different. For the same reason, “new” always returns pointers to distinct objects. Consider:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class Empty { };&lt;br /&gt;
void f()&lt;br /&gt;
{&lt;br /&gt;
Empty a, b;&lt;br /&gt;
if (&amp;amp;a == &amp;amp;b) cout &amp;lt;&amp;lt; “impossible: report error to compiler supplier”;&lt;br /&gt;
Empty* p1 = new Empty;&lt;br /&gt;
Empty* p2 = new Empty;&lt;br /&gt;
if (p1 == p2) cout &amp;lt;&amp;lt; “impossible: report error to compiler supplier”;&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;There is an interesting rule that says that an empty base class need not be represented by a separate byte:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;struct X : Empty {&lt;br /&gt;
int a;&lt;br /&gt;
// …&lt;br /&gt;
};&lt;br /&gt;
void f(X* p)&lt;br /&gt;
{&lt;br /&gt;
void* p1 = p;&lt;br /&gt;
void* p2 = &amp;amp;p-&amp;gt;a;&lt;br /&gt;
if (p1 == p2) cout &amp;lt;&amp;lt; “nice: good optimizer”;&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;This optimization is safe and can be most useful. It allows a programmer to use empty classes to represent very simple concepts without overhead. Some current compilers provide this “empty base class optimization”.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q5. Why are member functions not virtual by default?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Because many classes are not designed to be used as base classes. Also, objects of a class with a virtual function require space needed by the virtual function call mechanism – typically one word per object. This overhead can be significant, and can get in the way of layout compatibility with data from other languages (e.g. C and Fortran).&lt;/div&gt;&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q6. Why are destructors not virtual by default?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Because many classes are not designed to be used as base classes. Virtual functions make sense only in classes meant to act as interfaces to objects of derived classes (typically allocated on a heap and accessed through pointers or references).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;So when should I declare a destructor virtual? Whenever the class has at least one virtual function. Having virtual functions indicate that a class is meant to act as an interface to derived classes, and when it is, an object of a derived class may be destroyed through a pointer to the base. For example:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class Base {&lt;br /&gt;
// …&lt;br /&gt;
virtual ~Base();&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class Derived : public Base {&lt;br /&gt;
// …&lt;br /&gt;
~Derived();&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;void f()&lt;br /&gt;
{&lt;br /&gt;
Base* p = new Derived;&lt;br /&gt;
delete p; // virtual destructor used to ensure that ~Derived is called&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Had Base’s destructor not been virtual, Derived’s destructor would not have been called – with likely bad effects, such as resources owned by Derived not being freed.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q7. Why don’t we have virtual constructors?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;A virtual call is a mechanism to get work done given partial information. In particular, “virtual” allows us to call a function knowing only an interfaces and not the exact type of the object. To create an object you need complete information. In particular, you need to know the exact type of what you want to create. Consequently, a “call to a constructor” cannot be virtual.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Techniques for using an indirection when you ask to create an object are often referred to as “Virtual constructors”.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;For example, here is a technique for generating an object of an appropriate type using an abstract class:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;struct F { // interface to object creation functions&lt;br /&gt;
virtual A* make_an_A() const = 0;&lt;br /&gt;
virtual B* make_a_B() const = 0;&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;void user(const F&amp;amp; fac)&lt;br /&gt;
{&lt;br /&gt;
A* p = fac.make_an_A(); // make an A of the appropriate type&lt;br /&gt;
B* q = fac.make_a_B(); // make a B of the appropriate type&lt;br /&gt;
// …&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;struct FX : F {&lt;br /&gt;
A* make_an_A() const { return new AX(); } // AX is derived from A&lt;br /&gt;
B* make_a_B() const { return new BX(); } // BX is derived from B&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;struct FY : F {&lt;br /&gt;
A* make_an_A() const { return new AY(); } // AY is derived from A&lt;br /&gt;
B* make_a_B() const { return new BY(); } // BY is derived from B&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;int main()&lt;br /&gt;
{&lt;br /&gt;
FX x;&lt;br /&gt;
FY y;&lt;br /&gt;
user(x); // this user makes AXs and BXs&lt;br /&gt;
user(y); // this user makes AYs and BYs&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;user(FX()); // this user makes AXs and BXs&lt;br /&gt;
user(FY()); // this user makes AYs and BYs&lt;br /&gt;
// …&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;This is a variant of what is often called “the factory pattern”. The point is that user() is completely isolated from knowledge of classes such as AX and AY.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q8. Can I call a virtual function from a constructor?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Yes, but be careful. It may not do what you expect. In a constructor, the virtual call mechanism is disabled because overriding from derived classes hasn’t yet happened. Objects are constructed from the base up, “base before derived”.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Consider:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;#include&amp;lt;string&amp;gt;&lt;br /&gt;
#include&amp;lt;iostream&amp;gt;&lt;br /&gt;
using namespace std;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class B {&lt;br /&gt;
public:&lt;br /&gt;
B(const string&amp;amp; ss) { cout &amp;lt;&amp;lt; “B constructor\n”; f(ss); }&lt;br /&gt;
virtual void f(const string&amp;amp;) { cout &amp;lt;&amp;lt; “B::f\n”;}&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class D : public B {&lt;br /&gt;
public:&lt;br /&gt;
D(const string &amp;amp; ss) :B(ss) { cout &amp;lt;&amp;lt; “D constructor\n”;}&lt;br /&gt;
void f(const string&amp;amp; ss) { cout &amp;lt;&amp;lt; “D::f\n”; s = ss; }&lt;br /&gt;
private:&lt;br /&gt;
string s;&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;int main()&lt;br /&gt;
{&lt;br /&gt;
D d(“Hello”);&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;the program compiles and produce&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;B constructor&lt;br /&gt;
B::f&lt;br /&gt;
D constructor&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Note not D::f. Consider what would happen if the rule were different so that D::f() was called from B::B(): Because the constructor D::D() hadn’t yet been run, D::f() would try to assign its argument to an uninitialized string s. The result would most likely be an immediate crash.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Destruction is done “derived class before base class”, so virtual functions behave as in constructors: Only the local definitions are used – and no calls are made to overriding functions to avoid touching the (now destroyed) derived class part of the object.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;It has been suggested that this rule is an implementation artifact. It is not so. In fact, it would be noticeably easier to implement the unsafe rule of calling virtual functions from constructors exactly as from other functions. However, that would imply that no virtual function could be written to rely on invariants established by base classes. That would be a terrible mess.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q9. Is there a “placement delete”?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;No, but if you need one you can write your own.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Consider placement new used to place objects in a set of arenas&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class Arena {&lt;br /&gt;
public:&lt;br /&gt;
void* allocate(size_t);&lt;br /&gt;
void deallocate(void*);&lt;br /&gt;
// …&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;void* operator new(size_t sz, Arena&amp;amp; a)&lt;br /&gt;
{&lt;br /&gt;
return a.allocate(sz);&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Arena a1(some arguments);&lt;br /&gt;
Arena a2(some arguments);&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Given that, we can write&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;X* p1 = new(a1) X;&lt;br /&gt;
Y* p2 = new(a1) Y;&lt;br /&gt;
Z* p3 = new(a2) Z;&lt;br /&gt;
// …&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;But how can we later delete those objects correctly? The reason that there is no built-in “placement delete” to match placement new is that there is no general way of assuring that it would be used correctly. Nothing in the C++ type system allows us to deduce that p1 points to an object allocated in Arena a1. A pointer to any X allocated anywhere can be assigned to p1.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;However, sometimes the programmer does know, and there is a way:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;template&amp;lt;class T&amp;gt; void destroy(T* p, Arena&amp;amp; a)&lt;br /&gt;
{&lt;br /&gt;
if (p) {&lt;br /&gt;
p-&amp;gt;~T();  // explicit destructor call&lt;br /&gt;
a.deallocate(p);&lt;br /&gt;
}&lt;br /&gt;
}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;Now, we can write:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;destroy(p1,a1);&lt;br /&gt;
destroy(p2,a2);&lt;br /&gt;
destroy(p3,a3);&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;If an Arena keeps track of what objects it holds, you can even write destroy() to defend itself against mistakes.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;It is also possible to define a matching operator new() and operator delete() pairs for a class hierarchy.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Q10. Does “friend” violate encapsulation?&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;strong&gt;Ans.&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;No. It does not. “Friend” is an explicit mechanism for granting access, just like membership. You cannot (in a&amp;nbsp; standard conforming program) grant yourself access to a class without modifying its source. For example:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;class X {&lt;br /&gt;
int i;&lt;br /&gt;
public:&lt;br /&gt;
void m();  // grant X::m() access&lt;br /&gt;
friend void f(X&amp;amp;); // grant f(X&amp;amp;) access&lt;br /&gt;
// …&lt;br /&gt;
};&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;void X::m() { i++; /* X::m() can access X::i */ }&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;void f(X&amp;amp; x) { x.i++; /* f(X&amp;amp;) can access X::i */ }&lt;/div&gt;&lt;br /&gt;
&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-7687753870800096026?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/UlMmiJbCQ6o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/7687753870800096026/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/03/c-questions-i.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7687753870800096026?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/7687753870800096026?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/UlMmiJbCQ6o/c-questions-i.html" title="C++ Questions I" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/03/c-questions-i.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08NSHg5fip7ImA9Wx9WFE8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-5026169981538906209</id><published>2011-01-19T15:08:00.000+05:30</published><updated>2011-01-19T15:08:19.626+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-19T15:08:19.626+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Economics" /><category scheme="http://www.blogger.com/atom/ns#" term="Chanakya Niti Shastra" /><title>SRI CHANAKYA NITI SHASTRA</title><content type="html">&lt;div style="text-align: justify;"&gt;&lt;strong&gt;THE POLITICAL ETHICS OF CHANAKYA  PANDIT&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER ONE&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Humbly bowing down before the almighty Lord  Sri Vishnu, the Lord of the three worlds, I recite maxims of the science of  political ethics (niti) selected from the various satras (scriptures).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. That man who by the study of these maxims from  the satras acquires a knowledge of the most celebrated principles of duty, and  understands what ought and what ought not to be followed, and what is good and  what is bad, is most excellent.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Therefore with an eye to the public good, I  shall speak that which, when understood, will lead to an understanding of things  in their proper perspective.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Even a pandit comes to grief by giving  instruction to a foolish disciple, by maintaining a wicked wife, and by  excessive familiarity with the miserable.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. A wicked wife, a false friend, a saucy servant  and living in a house with a serpent in it are nothing but death.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. One should save his money against hard times,  save his wife at the sacrifice of his riches, but invariably one should save his  soul even at the sacrifice of his wife and riches.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Save your wealth against future calamity. Do  not say, “What fear has a rich man, of calamity?” When riches begin to forsake  one even the accumulated stock dwindles away.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Do not inhabit a country where you are not  respected, cannot earn your livelihood, have no friends, or cannot acquire  knowledge.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. Do not stay for a single day where there are  not these five persons: a wealthy man, a brahmin well versed in Vedic lore, a  king, a river and a physician.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Wise men should never go into a country where  there are no means of earning one’s livelihood, where the people have no dread  of anybody, have no sense of shame, no intelligence, or a charitable  disposition.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. Test a servant while in the discharge of his  duty, a relative in difficulty, a friend in adversity, and a wife in  misfortune.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. He is a true friend who does not forsake us  in time of need, misfortune, famine, or war, in a king’s court, or at the  crematorium (smasana).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. He who gives up what is imperishable for that  which is perishable, loses that which is imperishable; and doubtlessly loses  that which is perishable also.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
14. A wise man should marry a virgin of a  respectable family even if she is deformed. He should not marry one of a  low-class family, through beauty. Marriage in a family of equal status is  preferable.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. Do not put your trust in rivers, men who  carry weapons, beasts with claws or horns, women, and members of a royal  family.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. Even from poison extract nectar, wash and  take back gold if it has fallen in filth, receive the highest knowledge (Krsna  consciousness) from a low born person; so also a girl possessing virtuous  qualities (stri-ratna) even if she were born in a disreputable family.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. Women have hunger two-fold, shyness  four-fold, daring six-fold, and lust eight-fold as compared to men.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER TWO&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Untruthfulness, rashness, guile, stupidity,  avarice, uncleanliness and cruelty are a woman’s seven natural flaws.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. To have ability for eating when dishes are  ready at hand, to be robust and virile in the company of one’s religiously  wedded wife, and to have a mind for making charity when one is prosperous are  the fruits of no ordinary austerities.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. He whose son is obedient to him, whose wife’s  conduct is in accordance with his wishes, and who is content with his riches,  has his heaven here on earth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. They alone are sons who are devoted to their  father. He is a father who supports his sons. He is a friend in whom we can  confide, and she only is a wife in whose company the husband feels contented and  peaceful.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Avoid him who talks sweetly before you but  tries to ruin you behind your back, for he is like a pitcher of poison with milk  on top.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. Do not put your trust in a bad companion nor  even trust an ordinary friend, for if he should get angry with you, he may bring  all your secrets to light.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Do not reveal what you have thought upon  doing, but by wise counsel keep it secret, being determined to carry it into  execution.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Foolishness is indeed painful, and verily so  is youth, but more painful by far than either is being obliged in another  person’s house.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. There does not exist a pearl in every  mountain, nor a pearl in the head of every elephant; neither are the sadhus to  be found everywhere, nor sandal trees in every forest.[Note: Only elephants in  royal palaces are seen decorated with pearls (precious stones) on their  heads].&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Wise men should always bring up their sons in  various moral ways, for children who have knowledge of niti-sastra and are well  behaved become a glory to their family.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. Those parents who do not educate their sons  are their enemies; for as is a crane among swans, so are ignorant sons in a  public assembly.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Many a bad habit is developed through over  indulgence, and many a good one by chastisement, therefore beat your son as well  as your pupil; never indulge them. (“Spare the rod and spoil the child.”)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. Let not a single day pass without your  learning a verse, half a verse, or a fourth of it, or even one letter of it; nor  without attending to charity, study and other pious activity.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. Separation from the wife, disgrace from one’s  own people, an enemy saved in battle, service to a wicked king, poverty, and a  mismanaged assembly: these six kinds of evils, if afflicting a person, burn him  even without fire.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. Trees on a riverbank, a woman in another  man’s house, and kings without counsellors go without doubt to swift  destruction.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. A brahmin’s strength is in his learning, a  king’s strength is in his army, a vaishya’s strength is in his wealth and a  shudra’s strength is in his attitude of service.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. The prostitute has to forsake a man who has  no money, the subject a king that cannot defend him, the birds a tree that bears  no fruit, and the guests a house after they have finished their meals.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Brahmins quit their patrons after receiving  alms from them, scholars leave their teachers after receiving education from  them, and animals desert a forest that has been burnt down.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. He who befriends a man whose conduct is  vicious, whose vision impure, and who is notoriously crooked, is rapidly  ruined.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. Friendship between equals flourishes, service  under a king is respectable, it is good to be business-minded in public  dealings, and a handsome lady is safe in her own home.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER THREE&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. In this world, whose family is there without  blemish? Who is free from sickness and grief? Who is forever happy?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. A man’s descent may be discerned by his  conduct, his country by his pronunciation of language, his friendship by his  warmth and glow, and his capacity to eat by his body.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Give your daughter in marriage to a good  family, engage your son in learning, see that your enemy comes to grief, and  engage your friends in dharma. (Krsna consciousness).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Of a rascal and a serpent, the serpent is the  better of the two, for he strikes only at the time he is destined to kill, while  the former at every step.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Therefore kings gather round themselves men of  good families, for they never forsake them either at the beginning, the middle  or the end.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. At the time of the pralaya (universal  destruction) the oceans are to exceed their limits and seek to change, but a  saintly man never changes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Do not keep company with a fool for as we can  see he is a two-legged beast. Like an unseen thorn he pierces the heart with his  sharp words.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Though men be endowed with beauty and youth  and born in noble families, yet without education they are like the palasa  flower, which is void of sweet fragrance.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. The beauty of a cuckoo is in its notes, that  of a woman in her unalloyed devotion to her husband, that of an ugly person in  his scholarship, and that of an ascetic in his forgiveness.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Give up a member to save a family, a family  to save a village, a village to save a country, and the country to save  yourself.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. There is no poverty for the industrious. Sin  does not attach itself to the person practicing japa (chanting of the holy names  of the Lord). Those who are absorbed in maunam (silent contemplation of the  Lord) have no quarrel with others. They are fearless who remain always  alert.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. What is too heavy for the strong and what  place is too distant for those who put forth effort?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. What country is foreign to a man of true  learning? Who can be inimical to one who speaks pleasingly?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
14. As a whole forest becomes fragrant by the  existence of a single tree with sweet-smelling blossoms in it, so a family  becomes famous by the birth of a virtuous son.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. As a single withered tree, if set aflame,  causes a whole forest to burn, so does a rascal son destroy a whole family.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. As night looks delightful when the moon  shines, so is a family gladdened by even one learned and virtuous son.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. What is the use of having many sons if they  cause grief and vexation? It is better to have only one son from whom the whole  family can derive support and peacefulness.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Fondle a son until he is five years of age,  and use the stick for another ten years, but when he has attained his sixteenth  year treat him as a friend.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. He who runs away from a fearful calamity, a  foreign invasion, a terrible famine, and the companionship of wicked men is  safe.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. He who has not acquired one of the following:  religious merit (dharma), wealth (artha), satisfaction of desires (kama), or  liberation (moksa) is repeatedly born to die.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;21. Lakshmi, the Goddess of wealth, comes of Her  own accord where fools are not respected, grain is well stored up, and the  husband and wife do not quarrel.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER FOUR&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. These five: the life span, the type of work,  wealth, learning and the time of one’s death are determined while one is in the  womb.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. Offspring, friends and relatives flee from a  devotee of the Lord: yet those who follow him bring merit to their families  through their devotion.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Fish, tortoises, and birds bring up their  young by means of sight, attention and touch; so do saintly men afford  protection to their associates by the same means.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. As long as your body is healthy and under  control and death is distant, try to save your soul; when death is imminent what  can you do?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Learning is like a cow of desire. It, like  her, yields in all seasons. Like a mother, it feeds you on your journey.  Therefore learning is a hidden treasure.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. A single son endowed with good qualities is  far better than a hundred devoid of them. For the moon, though one, dispels the  darkness, which the stars, though numerous, cannot.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. A stillborn son is superior to a foolish son  endowed with a long life. The first causes grief for but a moment while the  latter like a blazing fire consumes his parents in grief for life.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Residing in a small village devoid of proper  living facilities, serving a person born of a low family, unwholesome food, a  frowning wife, a foolish son, and a widowed daughter burn the body without  fire.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. What good is a cow that neither gives milk nor  conceives? Similarly, what is the value of the birth of a son if he becomes  neither learned nor a pure devotee of the Lord?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. When one is consumed by the sorrows of life,  three things give him relief: offspring, a wife, and the company of the Lord’s  devotees.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. Kings speak for once, men of learning once,  and the daughter is given in marriage once. All these things happen once and  only once.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Religious austerities should be practiced  alone, study by two, and singing by three. A journey should be undertaken by  four, agriculture by five, and war by many together.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. She is a true wife who is clean (suci),  expert, chaste, pleasing to the husband, and truthful.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. The house of a childless person is a void,  all directions are void to one who has no relatives, the heart of a fool is also  void, but to a poverty-stricken man all is void.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. Scriptural lessons not put into practice are  poison; a meal is poison to him who suffers from indigestion; a social gathering  is poison to a poverty-stricken person; and a young wife is poison to an aged  man.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. That man who is without religion and mercy  should be rejected. A guru without spiritual knowledge should be rejected. The  wife with an offensive face should be given up, and so should relatives who are  without affection.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. Constant travel brings old age upon a man; a  horse becomes old by being constantly tied up; lack of sexual contact with her  husband brings old age upon a woman; and garments become old through being left  in the sun.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Consider again and again the following: the  right time, the right friends, the right place, the right means of income, the  right ways of spending, and from whom you derive your power.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. For the twice born the fire (Agni) is a  representative of God. The Supreme Lord resides in the heart of His devotees.  Those of average intelligence (alpa-buddhi or kanista-adhikari) see God only in  His sri-murti, but those of broad vision see the Supreme Lord everywhere.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER FIVE&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Agni is the worshipable person for the twice  born; the brahmana for the other castes; the husband for the wife; and the guest  who comes for food at the midday meal for all.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. As gold is tested in four ways by rubbing,  cutting, heating and beating — so a man should be tested by these four things:  his renunciation, his conduct, his qualities and his actions.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. A thing may be dreaded as long as it has not  overtaken you, but once it has come upon you, try to get rid of it without  hesitation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Though persons be born from the same womb and  under the same stars, they do not become alike in disposition as the thousand  fruits of the badari tree.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. He whose hands are clean does not like to hold  an office; he who desires nothing cares not for bodily decorations; he who is  only partially educated cannot speak agreeably; and he who speaks out plainly  cannot be a deceiver.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. The learned are envied by the foolish; rich  men by the poor; chaste women by adulteresses; and beautiful ladies by ugly  ones.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Indolent application ruins study; money is  lost when entrusted to others; a farmer who sows his seed sparsely is ruined;  and an army is lost for want of a commander.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Learning is retained through putting into  practice; family prestige is maintained through good behaviour; a respectable  person is recognised by his excellent qualities; and anger is seen in the  eyes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. Religion is preserved by wealth; knowledge by  diligent practice; a king by conciliatory words; and a home by a dutiful  housewife.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Those who blaspheme Vedic wisdom, who  ridicule the life style recommended in the satras, and who deride men of  peaceful temperament, come to grief unnecessarily.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. Charity puts and end to poverty; righteous  conduct to misery; discretion to ignorance; and scrutiny to fear.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. There is no disease (so destructive) as lust;  no enemy like infatuation; no fire like wrath; and no happiness like spiritual  knowledge.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. A man is born alone and dies alone; and he  experiences the good and bad consequences of his karma alone; and he goes alone  to hell or the Supreme abode.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. Heaven is but a straw to him who knows  spiritual life (Krsna consciousness); so is life to a valiant man; a woman to  him who has subdued his senses; and the universe to him who is without  attachment for the world.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. Learning is a friend on the journey; a wife  in the house; medicine in sickness; and religious merit is the only friend after  death.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. Rain which falls upon the sea is useless; so  is food for one who is satiated; in vain is a gift for one who is wealthy; and a  burning lamp during the daytime is useless.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. There is no water like rainwater; no strength  like one’s own; no light like that of the eyes; and no wealth more dear than  food grain.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. The poor wish for wealth; animals for the  faculty of speech; men wish for heaven; and godly persons for liberation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. The earth is supported by the power of truth;  it is the power of truth that makes the sunshine and the winds blow; indeed all  things rest upon truth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. The Goddess of wealth is unsteady  (chanchala), and so is the life breath. The duration of life is uncertain, and  the place of habitation is uncertain; but in all this inconsistent world  religious merit alone is immovable.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;21. Among men the barber is cunning; among birds  the crow; among beasts the jackal; and among women, the malin (flower girl).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;22. These five are your fathers; he who gave you  birth, girdled you with sacred thread, teaches you, provides you with food, and  protects you from fearful situations.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;23. These five should be considered as mothers;  the king’s wife, the preceptor’s wife, the friend’s wife, your wife’s mother,  and your own mother.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER SIX&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. By means of hearing one understands dharma,  malignity vanishes, knowledge is acquired, and liberation from material bondage  is gained.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. Among birds the crow is vile; among beasts the  dog; the ascetic whose sins is abominable, but he who blasphemes others is the  worst chandala.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
3. Brass is polished by ashes; copper is cleaned  by tamarind; a woman, by her menses; and a river by its flow.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. The king, the brahmana, and the ascetic yogi  who go abroad are respected; but the woman who wanders is utterly ruined.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. He who has wealth has friends. He who is  wealthy has relatives. The rich one alone is called a man, and the affluent  alone are respected as pandits.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. As is the desire of Providence, so functions  one’s intellect; one’s activities are also controlled by Providence; and by the  will of Providence one is surrounded by helpers.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Time perfects all living beings as well as  kills them; it alone is awake when all others are asleep. Time is  insurmountable.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Those born blind cannot see; similarly blind  are those in the grip of lust. Proud men have no perception of evil; and those  bent on acquiring riches see no sin in their actions.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. The spirit soul goes through his own course of  karma and he himself suffers the good and bad results thereby accrued. By his  own actions he entangles himself in samsara, and by his own efforts he  extricates himself.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. The king is obliged to accept the sins of his  subjects; the purohit (priest) suffers for those of the king; a husband suffers  for those of his wife; and the guru suffers for those of his pupils.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. A father who is a chronic debtor, an  adulterous mother, a beautiful wife, and an unlearned son are enemies ( in one’s  own home).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Conciliate a covetous man by means of a gift,  an obstinate man with folded hands in salutation, a fool by humouring him, and a  learned man by truthful words.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. It is better to be without a kingdom than to  rule over a petty one; better to be without a friend than to befriend a rascal;  better to be without a disciple than to have a stupid one; and better to be  without a wife than to have a bad one.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. How can people be made happy in a petty  kingdom? What peace can we expect from a rascal friend? What happiness can we  have at home in the company of a bad wife? How can renown be gained by  instructing an unworthy disciple?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. Learn one thing from a lion; one from a  crane; four a cock; five from a crow; six from a dog; and three from an ass.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. The one excellent thing that can be learned  from a lion is that whatever a man intends doing should be done by him with a  whole-hearted and strenuous effort.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. The wise man should restrain his senses like  the crane and accomplish his purpose with due knowledge of his place, time and  ability.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. To wake at the proper time; to take a bold  stand and fight; to make a fair division (of property) among relations; and to  earn one’s own bread by personal exertion are the four excellent things to be  learned from a cock.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. Union in privacy (with one’s wife); boldness;  storing away useful items; watchfulness; and not easily trusting others; these  five things are to be learned from a crow.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. Contentment with little or nothing to eat  although one may have a great appetite; to awaken instantly although one may be  in a deep slumber; unflinching devotion to the master; and bravery; these six  qualities should be learned from the dog.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;21. Although an ass is tired, he continues to  carry his burden; he is unmindful of cold and heat; and he is always contented;  these three things should be learned from the ass.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;22. He who shall practice these twenty virtues  shall become invincible in all his undertakings.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER SEVEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. A wise man should not reveal his loss of  wealth, the vexation of his mind, the misconduct of his own wife, base words  spoken by others, and disgrace that has befallen him.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. He who gives up shyness in monetary dealings,  in acquiring knowledge, in eating and in business, becomes happy.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. The happiness and peace attained by those  satisfied by the nectar of spiritual tranquillity is not attained by greedy  persons restlessly moving here and there.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. One should feel satisfied with the following  three things; his own wife, food given by Providence and wealth acquired by  honest effort; but one should never feel satisfied with the following three;  study, chanting the holy names of the Lord (japa) and charity.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Do not pass between two brahmanas, between a  brahmana and his sacrificial fire, between a wife and her husband, a master and  his servant, and a plough and an ox.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. Do not let your foot touch fire, the spiritual  master or a brahmana; it must never touch a cow, a virgin, an old person or a  child.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Keep one thousand cubits away from an  elephant, a hundred from a horse, ten from a horned beast, but keep away from  the wicked by leaving the country.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. An elephant is controlled by a goad (ankusha),  a horse by a slap of the hand, a horned animal with the show of a stick, and a  rascal with a sword.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. Brahmanas find satisfaction in a good meal,  peacocks in the peal of thunder, a sadhu in seeing the prosperity of others, and  the wicked in the misery of others.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Conciliate a strong man by submission, a  wicked man by opposition, and the one whose power is equal to yours by  politeness or force.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. The power of a king lies in his mighty arms;  that of a brahmana in his spiritual knowledge; and that of a woman in her beauty  youth and sweet words.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Do not be very upright in your dealings for  you would see by going to the forest that straight trees are cut down while  crooked ones are left standing.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. Swans live wherever there is water, and leave  the place where water dries up; let not a man act so — and comes and goes as he  pleases.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. Accumulated wealth is saved by spending just  as incoming fresh water is saved by letting out stagnant water.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. He who has wealth has friends and relations;  he alone survives and is respected as a man.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. The following four characteristics of the  denizens of heaven may be seen in the residents of this earth planet; charity,  sweet words, worship of the Supreme Personality of Godhead, and satisfying the  needs of brahmanas.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. The following qualities of the denizens of  hell may characterise men on earth; extreme wrath, harsh speech, enmity with  one’s relations, the company with the base, and service to men of low  extraction.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. By going to the den of a lion pearls from the  head of an elephant may be obtained; but by visiting the hole of a jackal  nothing but the tail of a calf or a bit of the hide of an ass may be found.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. The life of an uneducated man is as useless  as the tail of a dog, which neither covers its rear end, nor protects it from  the bites of insects.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. Purity of speech, of the mind, of the senses,  and a compassionate heart are needed by one who desires to rise to the divine  platform.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;21. As you seek fragrance in a flower, oil in the  sesamum seed, fire in wood, ghee (butter) in milk, and jaggery (guda) in  sugarcane; so seek the spirit that is in the body by means of  discrimination.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER EIGHT&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Low class men desire wealth; middle class men  both wealth and respect; but the noble, honour only; hence honour is the noble  man’s true wealth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. The lamp eats up the darkness and therefore it  produces blackened lamp; in the same way according to the nature of our diet  (sattva, rajas, or tamas) we produce offspring in similar quality.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. O wise man! Give your wealth only to the  worthy and never to others. The water of the sea received by the clouds is  always sweet. The rainwater enlivens all living beings of the earth both movable  (insects, animals, humans, etc.) and immovable (plants, trees, etc.), and then  returns to the ocean where its value is multiplied a million fold.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. The wise who discern the essence of things  have declared that the yavana (meat eater) is equal in baseness to a thousand  candalas (the lowest class), and hence a yavana is the basest of men; indeed  there is no one more base.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. After having rubbed oil on the body, after  encountering the smoke from a funeral pyre, after sexual intercourse, and after  being shaved, one remains a chandala until he bathes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. Water is the medicine for indigestion; it is  invigorating when the food that is eaten is well digested; it is like nectar  when drunk in the middle of a dinner; and it is like poison when taken at the  end of a meal.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Knowledge is lost without putting it into  practice; a man is lost due to ignorance; an army is lost without a commander;  and a woman is lost without a husband.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. A man who encounters the following three is  unfortunate; the death of his wife in his old age, the entrusting of money into  the hands of relatives, and depending upon others for food.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. Chanting of the Vedas without making  ritualistic sacrifices to the Supreme Lord through the medium of Agni, and  sacrifices not followed by bountiful gifts are futile. Perfection can be  achieved only through devotion (to the Supreme Lord) for devotion is the basis  of all success.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. There is no austerity equal to a balanced  mind, and there is no happiness equal to contentment; there is no disease like  covetousness, and no virtue like mercy.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. Anger is a personification of Yama (the  demigod of death); thirst is like the hellish river Vaitarani; knowledge is like  a kamadhenu (the cow of plenty); and contentment is like Nandanavana (the garden  of Indra).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Moral excellence is an ornament for personal  beauty; righteous conduct, for high birth; success for learning; and proper  spending for wealth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. Beauty is spoiled by an immoral nature; noble  birth by bad conduct; learning, without being perfected; and wealth by not being  properly utilised.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. Water seeping into the earth is pure; and a  devoted wife is pure; the king who is the benefactor of his people is pure; and  pure is the brahmana who is contented.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. Discontented brahmanas, contented kings, shy  prostitutes, and immodest housewives are ruined.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. Of what avail is a high birth if a person is  destitute of scholarship? A man who is of low extraction is honoured even by the  demigods if he is learned.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. A learned man is honoured by the people. A  learned man commands respect everywhere for his learning. Indeed, learning is  honoured everywhere.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Those who are endowed with beauty and youth  and who are born of noble families are worthless if they have no learning. They  are just like the kimshuka blossoms ( flowers of the palasa tree) which, though  beautiful, have no fragrance.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. The earth is encumbered with the weight of  the flesh-eaters, wine-bibblers, dolts (dull and stupid) and blockheads, who are  beasts in the form of men.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. There is no enemy like a yajna (sacrifice)  which consumes the kingdom when not attended by feeding on a large scale;  consumes the priest when the chanting is not done properly; and consumes the  yajaman (the responsible person) when the gifts are not made.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER NINE&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. My dear child, if you desire to be free from  the cycle of birth and death, then abandon the objects of sense gratification as  poison. Drink instead the nectar of forbearance, upright conduct, mercy,  cleanliness and truth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. Those base men who speak of the secret faults  of others destroy themselves like serpents that stray onto anthills.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Perhaps nobody has advised Lord Brahma, the  creator, to impart perfume to gold; fruit to the sugarcane; flowers to the  sandalwood tree; wealth to the learned; and long life to the king.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Nectar (amrita) is the best among medicines;  eating good food is the best of all types of material happiness; the eye is the  chief among all organs; and the head occupies the chief position among all parts  of the body.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. No messenger can travel about in the sky and  no tidings come from there. The voice of its inhabitants is never heard, nor can  any contact be established with them. Therefore the brahmana who predicts the  eclipse of the sun and moon, which occur in the sky, must be considered as a  vidwan (man of great learning).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. The student, the servant, the traveller, the  hungry person, the frightened man, the treasury guard, and the steward: these  seven ought to be awakened if they fall asleep.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. The serpent, the king, the tiger, the stinging  wasp, the small child, the dog owned by other people, and the fool: these seven  ought not to be awakened from sleep.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Of those who have studied the Vedas for  material rewards, and those who accept foodstuffs offered by shudras, what  potency have they? They are just like serpents without fangs.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. He who neither rouses fear by his anger, nor  confers a favour when he is pleased can neither control nor protect. What can he  do?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. The serpent may, without being poisonous,  raise high its hood, but the show of terror is enough to frighten people —  whether he be venomous or not.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. Wise men spend their mornings in discussing  gambling, the afternoon discussing the activities of women, and the night  hearing about the activities of theft. (The first item above refers to the  gambling of King Yudhisthira, the great devotee of Krsna. The second item refers  to the glorious deeds of mother Sita, the consort of Lord Ramachandra. The third  item hints at the adorable childhood pastimes of Sri Krsna who stole butter from  the elderly cowherd ladies of Gokula. Hence Chanakya Pandita advises wise  persons to spend the morning absorbed in Mahabharata, the afternoon studying  Ramayana, and the evening devotedly hearing the Srimad-Bhagvatam).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. By preparing a garland for a Deity with one’s  own hand; by grinding sandal paste for the Lord with one’s own hand; and by  writing sacred texts with one’s own hand — one becomes blessed with opulence  equal to that of Indra.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. Poverty is set off by fortitude; shabby  garments by keeping them clean; bad food by warming it; and ugliness by good  behavior.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER TEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. One destitute of wealth is not destitute, he  is indeed rich (if he is learned); but the man devoid of learning is destitute  in every way.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. We should carefully scrutinise that place upon  which we step (having it ascertained to be free from filth and living creatures  like insects, etc.); we should drink water, which has been filtered (through a  clean cloth); we should speak only those words, which have the sanction of the  satras; and do that act which we have carefully considered.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. He who desires sense gratification must give  up all thoughts of acquiring knowledge; and he who seeks knowledge must not hope  for sense gratification. How can he who seeks sense gratification acquire  knowledge, and he who possesses knowledge enjoy mundane sense pleasure?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. What is it that escapes the observation of  poets? What is that act women are incapable of doing? What will drunken people  not prate? What will not a crow eat?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Fate makes a beggar a king and a king a  beggar. He makes a rich man poor and a poor man rich.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. The beggar is a miser’s enemy; the wise  counsellor is the fool’s enemy; her husband is an adulterous wife’s enemy; and  the moon is the enemy of the thief.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Those who are destitute of learning, penance,  knowledge, good disposition, virtue and benevolence are brutes wandering the  earth in the form of men. They are burdensome to the earth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. Those that are empty-minded cannot be  benefited by instruction. Bamboo does not acquire the quality of sandalwood by  being associated with the Malaya Mountain.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. What good can the scriptures do to a man who  has no sense of his own? Of what use is as mirror to a blind man?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Nothing can reform a bad man, just as the  posteriors cannot become a superior part of the body though washed one hundred  times.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. By offending a kinsman, life is lost; by  offending others, wealth is lost; by offending the king, everything is lost; and  by offending a brahmana (Brahmin) one’s whole family is ruined.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. It is better to live under a tree in a jungle  inhabited by tigers and elephants, to maintain oneself in such a place with ripe  fruits and spring water, to lie down on grass and to wear the ragged barks of  trees than to live amongst one’s relations when reduced to poverty.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. The brahmana (Brahmin) is like a tree; his  prayers are the roots, his chanting of the Vedas are the branches, and his  religious acts are the leaves. Consequently effort should be made to preserve  his roots for if the roots are destroyed there can be no branches or leaves.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. My mother is Kamala devi (Lakshmi), my father  is Lord Janardana (Vishnu), my kinsmen are the Vishnu-bhaktas (Vaisnavas) and,  my homeland is all the three worlds.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. (Through the night) a great many kinds of  birds perch on a tree but in the morning they fly in all the ten directions. Why  should we lament for that? (Similarly, we should not grieve when we must  inevitably part company from our dear ones).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. He who possesses intelligence is strong; how  can the man that is unintelligent be powerful? The elephant of the forest having  lost his senses by intoxication was tricked into a lake by a small rabbit. (This  verse refers to a famous story from the niti-sastra called pancatantra compiled  by the pandit Vishnusharma 2500 years ago).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. Why should I be concerned for my maintenance  while absorbed in praising the glories of Lord Vishwambhara (Vishnu), the  supporter of all? Without the grace of Lord Hari, how could milk flow from a  mother’s breast for a child’s nourishment? Repeatedly thinking only in this way,  O Lord of the Yadus, O husband of Lakshmi, all my time is spent in serving Your  lotus feet.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER ELEVEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Generosity, pleasing address, courage and  propriety of conduct are not acquired, but are inbred qualities.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. He who forsakes his own community and joins  another perishes as the king who embraces an unrighteous path.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. The elephant has a huge body but is controlled  by the ankusha (goad): yet, is the goad as large as the elephant? A lighted  candle banishes darkness: is the candle as vast as the darkness. A mountain is  broken even by a thunderbolt: is the thunderbolt therefore as big as the  mountain? No, he whose power prevails is really mighty; what is there in  bulk?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. He who is engrossed in family life will never  acquire knowledge; there can be no mercy in the eater of flesh; the greedy man  will not be truthful; and purity will not be found in a woman or a hunter.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. The wicked man will not attain sanctity even  if he is instructed in different ways, and the nim tree will not become sweet  even if it is sprinkled from the top to the roots with milk and ghee.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. Mental dirt cannot be washed away even by  one-hundred baths in the sacred waters, just as a wine pot cannot be purified  even by evaporating all the wine by fire.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. It is not strange if a man reviles a thing of  which he has no knowledge, just as a wild hunter’s wife throws away the pearl  that is found in the head of an elephant, and picks up a gunj (a type of seed  which poor tribals wear as ornaments).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. He who for one year eats his meals silently  (inwardly meditating upon the Lord’s prasadam); attains to the heavenly planets  for a thousand crore of years. ( Note: one crore equals ten million)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. The student (brahmacari) should completely  renounce the following eight things — his lust, anger, greed, desire for sweets,  sense of decorating the body, excessive curiosity, excessive sleep, and  excessive endeavour for bodily maintenance.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. He alone is a true brahmana (dvija or  “twice-born”) who is satisfied with one meal a day, who has the six samskaras  (or acts of purification such as garbhadhana, etc.) performed for him, and who  cohabits with his wife only once in a month on an auspicious day after her  menses.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. The brahmana who is engrossed in worldly  affairs, brings up cows and is engaged in trade is really called a vaishya.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. The brahmana who deals in lac-die, articles,  oil, indigo, silken cloth, honey, clarified butter, liquor, and flesh is called  a shudra.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. The brahmana who thwarts the doings of  others, who is hypocritical, selfish, and a deceitful hater, and while speaking  mildly cherishes cruelty in his heart, is called a cat.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. The brahmana who destroys a pond, a well, a  tank, a garden and a temple is called a mleccha.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. The brahmana who steals the property of the  Deities and the spiritual preceptor, who cohabits with another’s wife, and who  maintains himself by eating anything and everything s called a chandala.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. The meritorious should give away in charity  all that they have in excess of their needs. By charity only Karna, Bali and  King Vikramaditya survive even today. Just see the plight of the honeybees  beating their legs in despair upon the earth. They are saying to themselves,  “Alas! We neither enjoyed our stored-up honey nor gave it in charity, and now  someone has taken it from us in an instant.”&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
CHAPTER TWELVE&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. He is a blessed grhasta (householder) in whose  house there is a blissful atmosphere, whose sons are talented, whose wife speaks  sweetly, whose wealth is enough to satisfy his desires, who finds pleasure in  the company of his wife, whose servants are obedient, in whose house hospitality  is shown, the auspicious Supreme Lord is worshiped daily, delicious food and  drink is partaken, and who finds joy in the company of devotees.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. One who devotedly gives a little to a brahmana  who is in distress is recompensed abundantly. Hence, O Prince, what is given to  a good brahmana is got back not in an equal quantity, but in an infinitely  higher degree.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Those men who are happy in this world, who are  generous towards their relatives, kind to strangers, indifferent to the wicked,  loving to the good, shrewd in their dealings with the base, frank with the  learned, courageous with enemies, humble with elders and stern with the  wife.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. O jackal, leave aside the body of that man at  once, whose hands have never given in charity, whose ears have not heard the  voice of learning, whose eyes have not beheld a pure devotee of the Lord, whose  feet have never traversed to holy places, whose belly is filled with things  obtained by crooked practices, and whose head is held high in vanity. Do not eat  it, O jackal, otherwise you will become polluted.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. “Shame upon those who have no devotion to the  lotus feet of Sri Krsna, the son of mother Yasoda; who have no attachment for  the descriptions of the glories of Srimati Radharani; whose ears are not eager  to listen to the stories of the Lord’s lila.” Such is the exclamation of the  mrdanga sound of dhik-tam dhik-tam dhigatam at kirtana.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. What fault of spring that the bamboo shoot has  no leaves? What fault of the sun if the owl cannot see during the daytime? Is it  the fault of the clouds if no raindrops fall into the mouth of the chatak bird?  Who can erase what Lord Brahma has inscribed upon our foreheads at the time of  birth?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. A wicked man may develop saintly qualities in  the company of a devotee, but a devotee does not become impious in the company  of a wicked person. The earth is scented by a flower that falls upon it, but the  flower does not contact the odour of the earth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. One indeed becomes blessed by having darshan  of a devotee; for the devotee has the ability to purify immediately, whereas the  sacred tirtha gives purity only after prolonged contact.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. A stranger asked a brahmana, “Tell me, who is  great in this city?” The brahmana replied, “The cluster of palmyra trees is  great.” Then the traveller asked, “Who is the most charitable person?” The  brahmana answered, “The washer man who takes the clothes in the morning and  gives them back in the evening is the most charitable.” He then asked, “Who is  the ablest man?” The brahmana answered, “Everyone is expert in robbing others of  their wives and wealth.” The man then asked the brahmana, “How do you manage to  live in such a city?” The brahmana replied, “As a worm survives while even in a  filthy place so do I survive here!”&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. The house in which the lotus feet of  brahmanas are not washed, in which Vedic mantras are not loudly recited, and in  which the holy rites of svaha (sacrificial offerings to the Supreme Lord) and  swadha (offerings to the ancestors) are not performed, is like a  crematorium.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. (It is said that a sadhu, when asked about  his family, replied thusly): truth is my mother, and my father is spiritual  knowledge; righteous conduct is my brother, and mercy is my friend, inner peace  is my wife, and forgiveness is my son: these six are my kinsmen.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Our bodies are perishable, wealth is not at  all permanent and death is always nearby. Therefore we must immediately engage  in acts of merit.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. Arjuna says to Krsna. “Brahmanas find joy in  going to feasts, cows find joy in eating their tender grass, wives find joy in  the company of their husbands, and know, O Krsna, that in the same way I rejoice  in battle.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. He who regards another’s wife as his mother,  the wealth that does not belong to him as a lump of mud, and the pleasure and  pain of all other living beings as his own — truly sees things in the right  perspective, and he is a true pandit.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. O Raghava, the love of virtue, pleasing  speech, and an ardent desire for performing acts of charity, guileless dealings  with friends, humility in the guru’s presence, deep tranquillity of mind, pure  conduct, discernment of virtues, realised knowledge of the sastras, beauty of  form and devotion to God are all found in you.” (The great sage Vasistha Muni,  the spiritual preceptor of the dynasty of the sun, said this to Lord Ramachandra  at the time of His proposed coronation).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. Kalpataru (the wish fulfilling tree) is but  wood; the golden Mount Meru is motionless; the wish-fulfilling gem chintamani is  just a stone; the sun is scorching; the moon is prone to wane; the boundless  ocean is saline; the demigod of lust lost his body (due to Shiva’s wrath); Bali  Maharaja, the son of Diti, was born into a clan of demons; and Kamadhenu (the  cow of heaven) is a mere beast. O Lord of the Raghu dynasty! I cannot compare  you to any one of these (taking their merits into account).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. Realised learning (vidya) is our friend while  travelling, the wife is a friend at home, medicine is the friend of a sick man,  and meritorious deeds are the friends at death.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Courtesy should be learned from princes, the  art of conversation from pandits, lying should be learned from gamblers and  deceitful ways should be learned from women.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. The unthinking spender, the homeless urchin,  the quarrel monger, the man who neglects his wife and is heedless in his actions  — all these will soon come to ruination.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. The wise man should not be anxious about his  food; he should be anxious to be engaged only in dharma (Krsna consciousness).  The food of each man is created for him at his birth.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;21. He who is not shy in the acquisition of  wealth, grain and knowledge, and in taking his meals, will be happy.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;22. As centesimal droppings will fill a pot so  also are knowledge, virtue and wealth gradually obtained.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;23. The man who remains a fool even in advanced  age is really a fool, just as the Indra-Varuna fruit does not become sweet no  matter how ripe it might become.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER THIRTEEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. A man may live but for a moment, but that  moment should be spent in doing auspicious deeds. It is useless living even for  a kalpa (4,320,000 *1000 years) and bringing only distress upon the two worlds  (this world and the next).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. We should not fret for what is past, nor  should we be anxious about the future; men of discernment deal only with the  present moment.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. It certainly is nature of the demigods, men of  good character, and parents to be easily pleased. Near and distant relatives are  pleased when they are hospitably received with bathing, food, and drink; and  pandits are pleased with an opportunity for giving spiritual discourse.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Even as the unborn babe is in the womb of his  mother, these five are fixed as his life destiny: his life span, his activities,  his acquisition of wealth and knowledge, and his time of death.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Oh, see what a wonder it is! The doings of the  great are strange: they treat wealth as light as a straw, yet, when they obtain  it, they bend under its weight.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. He who is overly attached to his family  members experiences fear and sorrow, for the root of all grief is attachment.  Thus one should discard attachment to be happy.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. He who is prepared for the future and he who  deals cleverly with any situation that may arise are both happy; but the  fatalistic man who wholly depends on luck is ruined.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. If the king is virtuous, then the subjects are  also virtuous. If the king is sinful, then the subjects also become sinful. If  he is mediocre, then the subjects are mediocre. The subjects follow the example  of the king. In short, as is the king so are the subjects.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. I consider him who does not act religiously as  dead though living, but he who dies acting religiously unquestionably lives long  though he is dead.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. He who has acquired neither virtue, wealth,  satisfaction of desires nor salvation (dharma, artha, kama, moksa), lives an  utterly useless life, like the “nipples” hanging from the neck of a goat.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. The hearts of base men burn before the fire  of other’s fame, and they slander them being themselves unable to rise to such a  high position.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. Excessive attachment to sense pleasures leads  to bondage, and detachment from sense pleasures leads to liberation; therefore  it is the mind alone that is responsible for bondage or liberation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. He who sheds bodily identification by means  of knowledge of the indwelling Supreme Self (Paramatma), will always be absorbed  in meditative trance (samadhi) wherever his mind leads him.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. Who realises all the happiness he desires?  Everything is in the hands of God. Therefore one should learn contentment.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. As a calf follows its mother among a thousand  cows, so the (good or bad) deeds of a man follow him.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. He whose actions are disorganised has no  happiness either in the midst of men or in a jungle — in the midst of men his  heart burns by social contacts, and his helplessness burns him in the  forest.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. As the man who digs obtains underground water  by use of a shovel, so the student attains the knowledge possessed by his  preceptor through his service.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Men reap the fruits of their deeds, and  intellects bear the mark of deeds performed in previous lives; even so the wise  act after due circumspection.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. Even the man who has taught the spiritual  significance of just one letter ought to be worshiped. He who does not give  reverence to such a guru is born as a dog a hundred times, and at last takes  birth as a chandala (dog-eater).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;20. At the end of the yuga, Mount Meru may be  shaken; at the end of the kalpa, the waters of the seven oceans may be  disturbed; but a sadhu will never swerve from the spiritual path.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;21. There are three gems upon this earth; food,  water, and pleasing words — fools (mudhas) consider pieces of rocks as gems.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER FOURTEEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. Poverty, disease, sorrow, imprisonment and  other evils are the fruits borne by the tree of one’s own sins.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. Wealth, a friend, a wife, and a kingdom may be  regained; but this body when lost may never be acquired again.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. The enemy can be overcome by the union of  large numbers, just as grass through its collectiveness wards off erosion caused  by heavy rainfall.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. Oil on water, a secret communicated to a base  man, a gift given to a worthy receiver, and scriptural instruction given to an  intelligent man spread out by virtue of their nature.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. If men should always retain the state of mind  they experience when hearing religious instruction, when present at a  crematorium ground, and when in sickness — then who could not attain  liberation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. If a man should feel before, as he feels  after, repentance — then who would not attain perfection?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. We should not feel pride in our charity,  austerity, valour, scriptural knowledge, modesty and morality for the world is  full of the rarest gems.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. He who lives in our mind is near though he may  actually be far away; but he who is not in our heart is far though he may really  be nearby.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. We should always speak what would please the  man of whom we expect a favour, like the hunter who sings sweetly when he  desires to shoot a deer.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. It is ruinous to be familiar with the king,  fire, the religious preceptor, and a woman. To be altogether indifferent to them  is to be deprived of the opportunity to benefit ourselves, hence our association  with them must be from a safe distance.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. We should always deal cautiously with fire,  water, women, foolish people, serpents, and members of a royal family; for they  may, when the occasion presents itself, at once bring about our death.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. He should be considered to be living who is  virtuous and pious, but the life of a man who is destitute of religion and  virtues is void of any blessing.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. If you wish to gain control of the world by  the performance of a single deed, then keep the following fifteen, which are  prone to wander here and there, from getting the upper hand of you: the five  sense objects (objects of sight, sound, smell, taste, and touch); the five sense  organs (ears, eyes, nose, tongue and skin) and organs of activity (hands, legs,  mouth, genitals and anus).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. He is a pandit (man of knowledge) who speaks  what is suitable to the occasion, who renders loving service according to his  ability, and who knows the limits of his anger.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. One single object (a woman) appears in three  different ways: to the man who practices austerity it appears as a corpse, to  the sensual it appears as a woman, and to the dogs as a lump of flesh.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. A wise man should not divulge the formula of  a medicine which he has well prepared; an act of charity which he has performed;  domestic conflicts; private affairs with his wife; poorly prepared food he may  have been offered; or slang he may have heard.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. The cuckoos remain silent for a long time  (for several seasons) until they are able to sing sweetly (in the Spring) so as  to give joy to all.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. We should secure and keep the following: the  blessings of meritorious deeds, wealth, grain, the words of the spiritual  master, and rare medicines. Otherwise life becomes impossible.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;19. Eschew wicked company and associate with  saintly persons. Acquire virtue day and night, and always meditate on that which  is eternal forgetting that which is temporary.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER FIFTEEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. For one whose heart melts with compassion for  all creatures; what is the necessity of knowledge, liberation, matted hair on  the head, and smearing the body with ashes?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. There is no treasure on earth the gift of  which will cancel the debt a disciple owes his guru for having taught him even a  single letter (that leads to Krsna consciousness).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. There are two ways to get rid of thorns and  wicked persons; using footwear in the first place and in the second shaming them  so that they cannot raise their faces again thus keeping them at a distance.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. He who wears unclean garments, has dirty  teeth, is a glutton, speaks unkindly and sleeps after sunrise — although he may  be the greatest personality — will lose the favour of Lakshmi.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. He who loses his money is forsaken by his  friends, his wife, his servants and his relations; yet when he regains his  riches those who have forsaken him come back to him. Hence wealth is certainly  the best of relations.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. Sinfully acquired wealth may remain for ten  years; in the eleventh year it disappears with even the original stock.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. A bad action committed by a great man is not  censured (as there is none that can reproach him), and a good action performed  by a low-class man comes to be condemned (because none respects him). Just see:  the drinking of nectar is excellent, but it became the cause of Rahu’s demise;  and the drinking of poison is harmful, but when Lord Shiva (who is exalted)  drank it, it became an ornament to his neck (nila-kantha).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. A true meal is that which consists of the  remnants left after a brahmana’s meal. Love, which is shown to others, is true  love, not that which is cherished for one’s own self. To abstain from sin is  true wisdom. That is an act of charity, which is performed without  ostentation.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. For want of discernment the most precious  jewels lie in the dust at the feet of men while bits of glass are worn on their  heads. But we should not imagine that the gems have sunk in value, and the bits  of glass have risen in importance. When a person of critical judgement shall  appear, each will be given its right position.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. Sastric (scriptural) knowledge is unlimited,  and the arts to be learned are many; the time we have is short, and our  opportunities to learn are beset with obstacles. Therefore select for learning  that which is most important, just as the swan drinks only the milk in  water.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. He is a chandala who eats his dinner without  entertaining the stranger who has come to his house quite accidentally, having  travelled from a long distance and is wearied.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. One may know the four Vedas and the  Dharma-sastras, yet if he has no realisation of his own spiritual self, he can  be said to be like the ladle (spoon) which stirs all kinds of foods but knows  not the taste of any.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. Those blessed souls are certainly elevated  who, while crossing the ocean of life, take shelter of a genuine brahmana, who  is likened unto a boat. They are unlike passengers aboard an ordinary ship that  runs the risk of sinking.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. The moon, who is the abode of nectar and the  presiding deity of all medicines, although immortal like amrta and resplendent  in form, loses the brilliance of his rays when he repairs to the abode of the  sun (day time). Therefore, will not an ordinary man be made to feel inferior by  going to live at the house of another?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. This humble bee, which always resides among  the soft petals of the lotus and drinks abundantly its sweet nectar, is now  feasting on the flower of the ordinary kutaja. Being in a strange country where  the lotuses do not exist, he is considering the pollen of the kutaja to be  nice.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. (Lord Visnu asked His spouse Lakshmi why She  did not care to live in the house of a brahmana.She replied:) “O Lord a rishi  named Agastya drank up My father (the ocean) in anger; Brighu Muni kicked You;  brahmanas pride themselves on their learning having sought the favour of My  competitor Sarasvati; and lastly they pluck each day the lotus which is My  abode, and therewith worship Lord Shiva. Therefore, O Lord, I fear to dwell with  a brahmana”.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. There are many ways of binding by which one  can be dominated and controlled in this world, but the bond of affection is the  strongest. For example, take the case of the humble bee, which, although expert  at piercing hardened wood, becomes caught in the embrace of its beloved flowers  (as the petals close at dusk).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. Although sandalwood is cut, it does not  forsake its natural quality of fragrance; so also the elephant does not give up  sportiveness though he should grow old. The sugarcane does not cease to be sweet  though squeezed in a mill; so the man of noble extraction does not lose his  lofty qualities, no matter how pinched he is by poverty.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER SIXTEEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. The heart of a woman is not united; it is  divided. While she is talking with one man, she looks lustfully at another and  thinks fondly of a third in her heart.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. The fool (mudha) who fancies that a charming  young lady loves him, becomes her slave and he dances like a shakuntal bird tied  to a string.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. Who is there who, having become rich, has not  become proud? What licentious man has put an end to his calamities? What man in  this world has not been overcome by a woman? Who is always loved by the king?  Who is there who has not been overcome by the ravages of time? What beggar has  attained glory? Who has become happy by contracting the vices of the wicked?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. A man attains greatness by his merits, not  simply by occupying an exalted seat. Can we call a crow an eagle (garuda) simply  because he sits on the top of a tall building.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. The man who is praised by others as great is  regarded as worthy though he may be really void of all merit. But the man who  sings his own praises lowers himself in the estimation of others though he  should be Indra (the possessor of all excellences).&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. If good qualities should characterise a man of  discrimination, the brilliance of his qualities will be recognised just as a  gem, which is essentially bright, really shines when fixed in an ornament of  gold.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. Even one who by his qualities appears to be  all knowing suffers without patronage; the gem, though precious, requires a gold  setting.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. I do not deserve that wealth which is to be  attained by enduring much suffering, or by transgressing the rules of virtue, or  by flattering an enemy.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. Those who were not satiated with the enjoyment  of wealth, food and women have all passed away; there are others now passing  away who have likewise remained unsatiated; and in the future still others will  pass away feeling themselves unsatiated.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. All charities and sacrifices (performed for  fruitive gain) bring only temporary results, but gifts made to deserving persons  and protection offered to all creatures shall never perish.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. A blade of grass is light, cotton is lighter,  and the beggar is infinitely lighter still. Why then does not the wind carry him  away? Because it fears that he may ask alms of him.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. It is better to die than to preserve this  life by incurring disgrace. The loss of life causes but a moment’s grief, but  disgrace brings grief every day of one’s life.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. All the creatures are pleased by loving  words; and therefore we should address words that are pleasing to all, for there  is no lack of sweet words.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. There are two nectarine fruits hanging from  the tree of this world: one is the hearing of sweet words (such as Krsna-katha)  and the other, the society of saintly men.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. The good habits of charity, learning and  austerity practised during many past lives continue to be cultivated in this  birth by virtue of the link (yoga) of this present life to the previous  ones.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. One whose knowledge is confined to books and  whose wealth is in the possession of others, can use neither his knowledge nor  wealth when the need for them arises.&lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;CHAPTER SEVENTEEN&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;1. The scholar who has acquired knowledge by  studying innumerable books without the blessings of a bonafide spiritual master  does not shine in an assembly of truly learned men just as an illegitimate child  is not honoured in society.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;2. We should repay the favours of others by acts  of kindness; so also should we return evil for evil in which there is no sin,  for it is necessary to pay a wicked man in his own coin.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;3. That thing which is distant, that thing which  appears impossible, and that which is far beyond our reach, can be easily  attained through tapasya (religious austerity), for nothing can surpass  austerity.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;4. What vice could be worse than covetousness?  What is more sinful than slander? For one who is truthful, what need is there  for austerity? For one who has a clean heart, what is the need for pilgrimage?  If one has a good disposition, what other virtue is needed? If a man has fame,  what is the value of other ornamentation? What need is there for wealth for the  man of practical knowledge? And if a man is dishonoured, what could there be  worse than death?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;5. Though the sea, which is the reservoir of all  jewels, is the father of the conch shell, and the Goddess of fortune Lakshmi is  conch’s sister, still the conch must go from door to door for alms (in the hands  of a beggar). It is true, therefore, that one gains nothing without having given  in the past.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;6. When a man has no strength left in him he  becomes a sadhu, one without wealth acts like a brahmacari, a sick man behaves  like a devotee of the Lord, and when a woman grows old she becomes devoted to  her husband.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;7. There is poison in the fang of the serpent, in  the mouth of the fly and in the sting of a scorpion; but the wicked man is  saturated with it.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;8. The woman who fasts and observes religious  vows without the permission of her husband shortens his life, and goes to  hell.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;9. A woman does not become holy by offering  charity, by observing hundreds of fasts, or by sipping sacred water, as by  sipping the water used to wash her husbands feet.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;10. The hand is not so well adorned by ornaments  as by charitable offerings; one does not become clean by smearing sandalwood  paste upon the body as by taking a bath; one does not become so much satisfied  by dinner as by having respect shown to him; and salvation is not attained by  self-adornment as by cultivation of spiritual knowledge.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;11. The eating of tundi fruit deprives a man of  his sense, while the vacha root administered revives his reasoning immediately.  A woman at once robs a man of his vigour while milk at once restores it.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;12. He who nurtures benevolence for all creatures  within his heart overcomes all difficulties and will be the recipient of all  types of riches at every step.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;13. What is there to be enjoyed in the world of  Lord Indra for one whose wife is loving and virtuous, who possesses wealth, who  has a well-behaved son endowed with good qualities, and who has grandchildren  born of his children?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;14. Men have eating, sleeping, fearing and mating  in common with the lower animals. That in which men excel the beasts is  discretionary knowledge; hence, indiscreet men who are without knowledge should  be regarded as beasts.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;15. If the bees that seek the liquid oozing from  the head of a lust-intoxicated elephant are driven away by the flapping of his  ears, then the elephant has lost only the ornament of his head. The bees are  quite happy in the lotus filled lake.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;16. A king, a prostitute, Lord Yamaraja, fire, a  thief, a young boy, and a beggar cannot understand the suffering of others. The  eighth of this category is the tax collector.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;17. O lady, why are you gazing downward? Has  something of yours fallen on the ground? (She replies) O fool, can you not  understand the pearl of my youth has slipped away?&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;18. O ketki flower! Serpents live in your midst,  you bear no edible fruits, your leaves are covered with thorns, you are crooked  in growth, you thrive in mud, and you are not easily accessible. Still for your  exceptional fragrance you are as dear as kinsmen to others. Hence, a single  excellence overcomes a multitude of blemishes.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-5026169981538906209?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/02V0xlGB6Sc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/5026169981538906209/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/01/sri-chanakya-niti-shastra.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5026169981538906209?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/5026169981538906209?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/02V0xlGB6Sc/sri-chanakya-niti-shastra.html" title="SRI CHANAKYA NITI SHASTRA" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/01/sri-chanakya-niti-shastra.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYMSHw8fip7ImA9Wx9WFE8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-512992344403059587</id><published>2011-01-19T14:23:00.000+05:30</published><updated>2011-01-19T14:23:09.276+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-19T14:23:09.276+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><category scheme="http://www.blogger.com/atom/ns#" term="dll" /><title>Looking for a Dll ???</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_1SDStrjgRx4/TTamY2JTTwI/AAAAAAAAGuI/7tqenR5WBhc/s1600/dll.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_1SDStrjgRx4/TTamY2JTTwI/AAAAAAAAGuI/7tqenR5WBhc/s1600/dll.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;AllDll.net is the biggest catalog of .dll files.  Most of times we end up with a problem of missing dll in our system for a  software or an OS. Well, AllDll.net has a good collection of Dlls. You can  certainly find the dll file that you need, they have all the necessary dll files  ordered alphabetically. Its quite easy to find a dll at AllDll.net by either  looking for its first letter or by using the search option given on their  site.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-512992344403059587?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/fmnGvutjyrs" height="1" width="1"/&gt;</content><link rel="related" href="http://alldll.net" title="Looking for a Dll ???" /><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/512992344403059587/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/01/looking-for-dll.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/512992344403059587?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/512992344403059587?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/fmnGvutjyrs/looking-for-dll.html" title="Looking for a Dll ???" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_1SDStrjgRx4/TTamY2JTTwI/AAAAAAAAGuI/7tqenR5WBhc/s72-c/dll.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/01/looking-for-dll.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcNQ3g7eyp7ImA9Wx9WFE8.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-4597303463762717268</id><published>2011-01-19T14:21:00.001+05:30</published><updated>2011-01-19T14:21:32.603+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-19T14:21:32.603+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPod Touch" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><title>iPod Touch work as Phone</title><content type="html">&lt;div style="text-align: justify;"&gt;Don’t get amazed, now we can call around the  world from a device that isn’t a phone. Apple Inc’s iTunes store has few  applications which can make this true, as long as we’re in a Wi-Fi hot spot.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;These applications require the second-generation  iPod Touch and are completely free to download, making calls to other people  using these apps won’t cost you anything.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Truphone and Fring, are the two apps which will  let us make free calls to Google Talk users and type instant messages to friends  online. Both automatically queue up a list of buddies from different services we  might have, including Gmail chat, AIM and MSN Messenger, once we log in.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Truphone has a pay feature which makes it a  phone. TruPhone charges to make calls to landlines or regular cell phones, but  generally at better rates than most wireless carriers. And it’s upfront about  what we pay.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Fring uses a Skype account. The calls on these  services sound pretty good, a little tinny but clearer than regular cell phone  connection.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;For all this we need Apple’s ear buds that have a  tiny microphone on the back of the volume control along the cord or some other  earphone or headphone with a speaker.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;While the iPhone uses network providers wireless  network to provide Internet access anywhere, on the iPod Touch we need to stick  to Wi-Fi hot spots.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-4597303463762717268?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/tlwqglGRw0M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/4597303463762717268/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/01/ipod-touch-work-as-phone.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4597303463762717268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/4597303463762717268?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/tlwqglGRw0M/ipod-touch-work-as-phone.html" title="iPod Touch work as Phone" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/01/ipod-touch-work-as-phone.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MHQnw4cCp7ImA9Wx9QGEo.&quot;"><id>tag:blogger.com,1999:blog-7656617644850198977.post-2985507246414369593</id><published>2011-01-01T15:20:00.000+05:30</published><updated>2011-01-01T15:20:33.238+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-01T15:20:33.238+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mstsc" /><category scheme="http://www.blogger.com/atom/ns#" term="Error" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows" /><category scheme="http://www.blogger.com/atom/ns#" term="Remote Desktop" /><title>The terminal server has exceeded the maximum number of allowed connections</title><content type="html">&lt;div style="text-align: justify;"&gt;If you are using Microsoft’s Remote Desktop  utility over a network to connect to other remote Windows machines then you must  have encountered an error message while connecting to the machine -&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;“The terminal server has exceeded the  maximum number of allowed connections”&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;This problem usually occurs due to following  reasons :&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;In Windows, normally&amp;nbsp; only 2 users at time can connect to the same&amp;nbsp; remote  windows machine, thus if a third user wants to connect to the same remote  windows machine then he will get this error.  &lt;/li&gt;
&lt;li&gt;After using the remote desktop connection on a remote windows machine, users  normally disconnects the remote connection just by clicking on the cross button  coming up on their screen. This practice only closes the remote desktop window  opened on the user’s screen but it doesn’t closes the session made on that  remote windows machine for the user. Thus, user’s session is still running  although he has closed the window.&amp;nbsp; This leads to a situation where no user is  currently accessing the remote windows machine but when anyone try to connect to  it, we get the above error.&amp;nbsp; We should always log off form the remote machine&amp;nbsp;  instead of just clicking the cross button. &lt;/li&gt;
&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Even in this situation, Remote Desktop Connection  utility have a mechanism to connect remotely to the windows machine,&amp;nbsp; kill the  existing remote connections and even do our work on that remote system.  Executing the Remote Desktop Connection utility with some parameters provides a  third connection to the remote windows system :&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;strong&gt;mstsc -v: x.x.x.x /f  -console&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Replace the x.x.x.x with the IP Address of the  remote system and execute the above command through Start -&amp;gt; Run.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7656617644850198977-2985507246414369593?l=www.mayankagarwal.in' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/mayanklogs/~4/g3QNN6_f_ss" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.mayankagarwal.in/feeds/2985507246414369593/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.mayankagarwal.in/2011/01/terminal-server-has-exceeded-maximum.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/2985507246414369593?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656617644850198977/posts/default/2985507246414369593?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/mayanklogs/~3/g3QNN6_f_ss/terminal-server-has-exceeded-maximum.html" title="The terminal server has exceeded the maximum number of allowed connections" /><author><name>Mayank Agarwal</name><uri>https://profiles.google.com/107297090144538850060</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-svVrVr313MM/AAAAAAAAAAI/AAAAAAAAAAA/ITzsgIrTIr0/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.mayankagarwal.in/2011/01/terminal-server-has-exceeded-maximum.html</feedburner:origLink></entry></feed>

