Once there was a little island country. The land of this country was the tiny island itself. The total money in circulation was 2 dollars
as there were only two pieces of 1 dollar coins circulating around.
1) There were 3 citizens living on this island country. A owned the land. B and C each owned 1 dollar.
2) B decided to purchase the land from A for 1 dollar. So, now A and C own 1 dollar each while B owned a piece of land that is worth 1 dollar.
* The net asset of the country now = 3 dollars.
3) Now C thought that since there is only one piece of land in the country, and land is non producible asset, its value must definitely go up. So, he borrowed 1 dollar from A, and together with his own 1 dollar, he bought the land from B for 2 dollars.
*A has a loan to C of 1 dollar, so his net asset is 1 dollar.
* B sold his land and got 2 dollars, so his net asset is 2 dollars.
* C owned the piece of land worth 2 dollars but with his 1 dollar debt to A, his net residual asset is 1 dollar.
* Thus, the net asset of the country = 4 dollars.
4) A saw that the land he once owned has risen in value. He regretted having sold it. Luckily, he has a 1 dollar loan to C. He then borrowed 2 dollars from B and acquired the land back from C for 3 dollars. The payment is by 2 dollars cash (which he borrowed) and cancellation of the 1 dollar loan to C. As a result, A now owned a piece of land that is worth 3 dollars. But since he owed B 2 dollars, his net asset is 1 dollar.
* B loaned 2 dollars to A. So his net asset is 2 dollars.
* C now has the 2 coins. His net asset is also 2 dollars.
* The net asset of the country = 5 dollars. A bubble is building up.
(5) B saw that the value of land kept rising. He also wanted to own the land. So he bought the land from A for 4 dollars. The payment is by borrowing 2 dollars from C, and cancellation of his 2 dollars loan to A.
* As a result, A has got his debt cleared and he got the 2 coins. His net asset is 2 dollars.
* B owned a piece of land that is worth 4 dollars, but since he has a debt of 2 dollars with C, his net Asset is 2 dollars.
* C loaned 2 dollars to B, so his net asset is 2 dollars.
* The net asset of the country = 6 dollars; even though, the country has only one piece of land and 2 Dollars in circulation.
(6) Everybody has made money and everybody felt happy and prosperous.
(7) One day an evil wind blew, and an evil thought came to C's mind. "Hey, what if the land price stop going up, how could B repay my loan. There is only 2 dollars in circulation, and, I think after all the land that B owns is worth at most only 1 dollar, and no more."
(8) A also thought the same way.
(9) Nobody wanted to buy land anymore.
* So, in the end, A owns the 2 dollar coins, his net asset is 2 dollars.
* B owed C 2 dollars and the land he owned which he thought worth 4 dollars is now 1 dollar. So his net asset is only 1 dollar.
* C has a loan of 2 dollars to B. But it is a bad debt. Although his net asset is still 2 dollars, his Heart is palpitating.
* The net asset of the country = 3 dollars again.
(10) So, who has stolen the 3 dollars from the country? Of course, before the bubble burst B thought his land was worth 4 dollars. Actually, right before the collapse, the net asset of the country was 6 dollars on paper. B's net asset is still 2 dollars, his heart is palpitating.
(11) B had no choice but to declare bankruptcy. C as to relinquish his 2 dollars bad debt to B, but in return he acquired the land which is worth 1 dollar now.
* A owns the 2 coins; his net asset is 2 dollars.
* B is bankrupt; his net asset is 0 dollar. (He lost everything)
* C got no choice but end up with a land worth only 1 dollar
* the net asset of the country = 3 dollars.
************ **End of the story; BUT ************ ********* ******
There is however a redistribution of wealth.
A is the winner, B is the loser, C is lucky that he is spared.
A few points worth noting -
(1) when a bubble is building up, the debt of individuals to one another in a country is also building up.
(2) This story of the island is a closed system whereby there is no other country and hence no foreign debt. The worth of the asset can only be calculated using the island's own currency. Hence, there is no net loss.
(3) An over-damped system is assumed when the bubble burst, meaning the land's value did not go down to below 1 dollar.
(4) When the bubble burst, the fellow with cash is the winner. The fellows having the land or extending loan to others are the losers. The asset could shrink or in worst case, they go bankrupt.
(5) If there is another citizen D either holding a dollar or another piece of land but refrains from taking part in the game, he will neither win nor lose. But he will see the value of his money or land goes up and down like a see saw.
(6) When the bubble was in the growing phase, everybody made money.
(7) If you are smart and know that you are living in a growing bubble, it is worthwhile to borrow money (like A) and take part in the game. But you must know when you should change everything back to cash.
(8) As in the case of land, the above phenomenon applies to stocks as well.
(9) The actual worth of land or stocks depends largely on psychology (or speculation)
Adbrite Ads
Saturday, October 11, 2008
Friday, August 22, 2008
Lyrics - Soniye hiriye teri yaad aandi ye....
Soniye hiriye teri yaad aandi ye....
soniye hiriye teri yaad aandi ye
seene vich tadapta hai dil jaan jaandi ye....[2]
tuhi jind meri ye dil da karaar ni..
tuhi jind meri ye dil da karaar
tu aaja tenu rabda wasta..[2]
udekta main tera rasta
kinna tenu chaava ey na samjhi tu..
tere naam kitti zindagii,
jab tu milengi tenu dassange
tere naal meri har khusi...
tuhi jind meri ye dil da karaar ni..
tuhi jind meri ye dil da karaar
tu aaja tenu rabda wasta..[2]
udekta main tera rasta
soniye hiriye teri yaad aandi ye
seene vich tadapta hai dil jaan jaandi ye...
suna suna dil da aasiyaana hai
suni zameen ho asmaa..
khoya khoya renda mera paagal dil
aaja laut ke hun aa bhi jaa...
tuhi jind meri ye dil da karaar ni..
tuhi jind meri ye dil da karaar
tu aaja tenu rabda wasta..[2]
udekta main tera rasta
soniye hiriye teri yaad aandi ye
seene vich tadapta hai dil jaan jaandi ye...[2]
seene vich tadapta hai dil jaan jaandi ye...
soniye ......jaan jandi ye
jaan jaandi ye
singer:shael
album:aitbaar
Wednesday, August 6, 2008
How to Import an Oracle Database
Step 1: Execute the CATALOG.SQL Script on the database you are going to import to.
For more information on this see the previous section “How to export an Oracle Database”.
Step2: Run the import command pressing enter at each prompt to select defaults.
There is one tricky part here… when you are prompted for the “username” make sure you enter the database userid you gave to the import command. In this example the username is “scott”.
Note the userid/password I’m providing in this example may not be the userid and password you want to use:
> imp scott/tiger@cs325
[Note: If this article helps you, don’t forget to share with your friends. Its help them also.]
For more information on this see the previous section “How to export an Oracle Database”.
Step2: Run the import command pressing enter at each prompt to select defaults.
There is one tricky part here… when you are prompted for the “username” make sure you enter the database userid you gave to the import command. In this example the username is “scott”.
Note the userid/password I’m providing in this example may not be the userid and password you want to use:
> imp scott/tiger@cs325
[Note: If this article helps you, don’t forget to share with your friends. Its help them also.]
How to Export an Oracle Database
It’s important that you periodically export your Oracle database so that you don’t lose your work during the semester. This document describes how to do it.
Step 1: Execute the CATALOG.SQL Script
This script is ONLY EXECTUED ONCE. After executing the script once, you will then be able to export as often as you want.
Get a DOS command prompt.
Go to the following directory, where you install the orcale rdbms. for example
cd c:\oracle\ora81\rdbms\admin
Get into sqlplus using the “SYS” user:
sqlplus sys/change_on_install@cs325
Execute the catalog.sql database script:
@catalog.sql
Wait for about 5 minutes for the script to complete.
Step 2: Run the export command pressing enter at each prompt to select defaults.
Note the userid/password I’m providing in this example may not be the userid and password you want to use:
exp scott/tiger@cs325
OR
exp sys@repc_brd as sys dba/sys
You should verify at the end of the export that the tables YOU created for your project are actually being exported by observing the “exporting table” information that appears in the export log. In this example, there were four tables exported: BONUS, DEPT, EMP, and SALGRADE.
[Note: If this article helps you, don’t forget to share with your friends. Its help them also.]
Friday, July 4, 2008
How to mount iso image file into solaris
Create a loopback device file with lofiadm:
sol# /usr/sbin/lofiadm -a/img.iso
This will create, for example, /dev/lofi/1 . It can be mounted as follows:
sol# mount -F hsfs -o ro /dev/lofi/1 /mnt/dir1
In general, you can use following command too,
for who want to use short hand method,
sol# mount -F hsfs -o ro
`/usr/sbin/lofiadm -a/img.iso` /mnt/dir1
Saturday, June 28, 2008
LDAP Integration with Microsoft ADS
Previous
For configuring the ADS with your Java Code, you have to configure following setps:
Step 1: Configuring JNDI context. below is the example,
public LdapContext throws NamingException{
Hashtable env = new Hashtable();
String admin = "administrator"
String passwd= "test"
String ldapURL = "ldap://pc.test.com:389 "; //There are two type of protocol in communication,
//one is ldap & second will be ldaps. ldap protocol using 389, while ldaps
//using 636 by default.
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
// set security credentials, note using simple clear text authentication
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, adminName);
env.put(Context.SECURITY_CREDENTIALS, adminPassword);
// connect to my domain controller
env.put(Context.PROVIDER_URL, ldapURL);
ctx = new InitialLdapContext(env, null);
return ctx;
}
Step 2: With ctx (ldapContext) you can search the keyword from the ADS.
For example,
1)If you want to find the user with name, "Hitesh" then you have to pass parameters into the search function, and parameters value would be,
objectClass=user, typeKey=cn and typeValue="Hitesh".
2)If you want to find the associated groups with "Hitesh" then parameters would be
objectClass=user, typeKey=cn, typeValue="Hitesh, attribute=memberOf
/*
*@param ctx :configured LdapContext
* @param password :password for log on name
*
* @return LdapContext which is interface and use for further operation.
* @throws NamingException
*/
public NamingEnumeration search(LdapContext ctx, String objectClass,
String typeKey, String typeValue, String attribute) throws NamingException {
if(ctx==null){
return null;
}
// Create the search controls
SearchControls searchCtls = new SearchControls();
// Specify the search scope
searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
// specify the LDAP search filter
String searchFilter = null;
if (typeValue != null) {
searchFilter = "(&(objectClass=" + objectClass + ")("+typeKey+"=" + typeValue
+ "))";
} else {
searchFilter = "(&(objectClass=" + objectClass + "))";
}
// Specify the Base for the search
String searchBase = "DC="
+ domainController[domainController.length - 2] + ",DC="
+ domainController[domainController.length - 1];
NamingEnumeration answer = null;
if (attribute != null) {
// Specify the attributes to return
String returnedAtts[] = { attribute };
searchCtls.setReturningAttributes(returnedAtts);
// Search for objects using the filter
answer = ctx.search(searchBase, searchFilter, searchCtls);
} else {
answer = ctx.search(searchBase, searchFilter, searchCtls);
}
return answer;
}
Previous
Subscribe to:
Posts (Atom)