You are currently browsing the monthly archive for February 2009.
Don’t take life so seriously, it’s not permanent!
God and love are the two greatest illusions of life.
Where you stumble there lies your treasure.
Love comes unseen, we only see it go.
My best dreams and the worst nightmares have the same people in them.
The price of anything is the amount of life we exchange for it.
A life filled with wanderings doesn’t define the directionlessness or meaninglessness of it! Instead it defines the complication and the stubbornness to give-in to, what is known as usual!!!
My words speak louder than actions
“There is more to life than simply increasing its speed.” ~ Mahatma Gandhi – I didn’t like him any ways.
If life is a waste of time, and time is a waste of life, why don’t we all get wasted and have the time of our lives?
Truth will always be truth, regardless of lack of understanding, disbelief or ignorance.
If you really want to do something, you will find a way. If you don’t, you will find an excuse.
In this world, it is not what we take up, but what we give up, that makes us rich.
Do first what you dread the most.
Many people take no care of their money till they come nearly to the end of it, and others do just the same with their time.
When you get to the end of your rope, tie a knot and hang on.
A new study shows that licking the sweat off a frog can cure depression. The down side is, the minute you stop licking, the frog gets depressed again.
It is better to aim at perfection and miss, than to aim at imperfection and hit it.
Wherever you are — be there.
The thing I hate about an argument is that it always interrupts a good discussion.
What single ability do we all have? The ability to change.
Too many people miss the silver lining because they’re expecting gold.
The deeper that sorrow carves into your being, the more joy you can contain.
Perhaps the best thing about the future is that it comes one day at a time.
The words I want to say to you are locked away inside the pocket of my heart.
Life is an onion. You peel it off one layer at a time, and sometimes you weep.
I not only use all the brains I have but all that I can borrow.
The real trap of fame is its irresistibility.
If everybody was satisfied with himself, there would be no heroes.
I came. I saw. I clicked.
Sincerity is the highest compliment you can pay.
Veni. Vidi. Codi.
Veni. Veni. Veni. (I came, I came, I came)
Wealth consists not in having great possessions, but in having few wants.
If it doesn’t matter who wins, then how come they keep score?
Vegetarian is an old Indian word meaning bad hunter.
Life is hard. It’s even harder if you’re stupid.
Fear is something to be moved through, not something to be turned from.
“You don’t know what you’ve got till it’s gone”
If at first you don’t succeed, skydiving is not for you.
Happiness is not a reward — it is a consequence. Suffering is not a punishment — it is a result.
Nature has given to us the seeds of knowledge, not knowledge itself.
The happiest people don’t necessarily have the best of everything. They just make the best of everything.
Encouragement is like a premium gasoline – it helps to take knocks out of living.
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Champions aren’t made in the gyms. Champions are made from something they have deep inside of them – a desire, a dream, a vision. They have last-minute stamina, they have to be a little faster, they have to have the skill, and the will. But the will must. - Muhammad Ali
If you can’t beat your computer at chess, try kickboxing.
All my life, I always wanted to be somebody. Now I see that I should have been more specific.
Critics are like eunuchs in a harem. They’re there every night, they see it done every night, they see how it should be done every night, but they can’t do it themselves.
If misery loves company, misery has company enough.
In life, as in chess, forethought wins.
I do not agree with a word that you say, but I will defend to the death your right to say it. – Voltaire
Creativity is the sudden cessation of stupidity.
Hit any user to continue.
What I hear, I forget. What I see, I remember. What I do, I understand. Confucius
Discovery consists of seeing what everybody has seen and thinking what nobody has thought.
Magnify you Skills…or else Modify your Goals.
Act as if it were impossible to fail.
I’ll note you in my book of memory.
After three days, fish and guests stink.
When all else fails, read the instructions.
If at first you don’t succeed… make sure nobody finds out you tried!
Marry and make a woman happy OR remain a bachelor and make several women happy!
The impact of recession is so great that women are actually marrying for love!
Start every day off with a smile and get it over with.
Men achieve a certain greatness unawares, when working to another aim.
Hurry! I never hurry. I have no time to hurry.
Not all chemicals are bad. Without chemicals such as hydrogen and oxygen, for example, there would be no way to make water, a vital ingredient in beer.
I refuse to answer that question on the grounds that I don’t know the answer.
The secret of success is sincerity. Once you can fake that you’ve got it made.
Nothing makes a man so modest about his income as a tax form to fill out.
Tact: getting your point across without stabbing someone with it.
I still miss my ex, but my aim is improving.
I used to be indecisive, now I’m not so sure.
Man is God’s greatest masterpiece. But who says so? — Man.
Talents are best nurtured in solitude; character is best formed in the stormy billows of the world.
What you get by achieving your goals is not as important as what you become by achieving your goals.
A talent can be cultivated in tranquility; a character only in the rushing stream of life.
Treat a man as he is and he will remain as he is. Treat a man as he can and should be and he will become as he can and should be.
He is happiest, be He king or peasant, who finds peace in his home.
Whatever you can do, or dream you can, begin it. Boldness has genius, power and magic in it.
Men show their characters in nothing more clearly than in what they think laughable.
For a man to achieve all that is demanded of him he must regard himself as greater than he is.
The best of all governments is that which teaches us to govern ourselves.
Beware of dissipating your powers; strive constantly to concentrate them. Genius thinks it can do whatever it sees others doing, but is sure to repent of every ill-judged outlay.
The easiest way to find something lost around the house is to buy a replacement.
Sex is like air; it’s not important unless you aren’t getting any.
Never take life seriously. Nobody gets out alive anyway.
Life is beautiful. Let’s fuck it.
Nobody gets out alive. Life fucks all.
One good turn gets most of the blankets.
There are two kinds of pedestrians — the quick and the dead.
Life is sexually transmitted.
An unbreakable toy is useful for breaking other toys.
If quitters never win, and winners never cheat, then who is the fool who said “Quit while you’re ahead”?
ASCII stupid question, get a stupid ANSI.
Health is merely the slowest possible rate at which one can die.
It’s not hard to meet expenses, they’re everywhere.
Jury — Twelve people who determine which client has the better lawyer.
Marriage is the triumph of imagination over intelligence. Second marriage is the triumph of hope over experience.
Before marriage, a man yearns for the woman he loves. After marriage, the ‘Y’ becomes silent.
If you want your spouse to listen and pay strict attention to every word you say, talk in your sleep.
You look like s***! Is that the style now?
I haven’t committed a crime. what i did was fail to comply with the law.
“you make my software hard.”
People who drink to drown their sorrows should know that sorrows knows how to swim.
I’m trying to see from your viewpoint, but I can’t seem to fit my head that far up my *ss.
I’m busy right now, I’ll ignore you later
If you must lie, be brief.
Some of them are inspired, and some have been straight frame by frame, scene by scene remakes. In the earlier days they got away with this, but not now …. hail the Internet
Feel free to add more and point out any mistakes.
Fight Club – Fight Club
Akele Hum Akele Tum – Kramer vs Kramer
Paap – Witness
Zeher – Out of Time
Main Aisa Hi Hoon – I Am Sam
Heyy Babyy – Three Men and a Baby
Agneepath – Used a lot of references to Scarface
Road – The Hitcher
Dhamaal – Rat Race
Black – The Miracle Worker
Bade Miyan Chote Miyan – Some scenes inspired from Bad Boys
Salaam Namaste – Nine Months (1995)
Kyon Ki – One Flew Over The Cuckoo’s Nest (1975)
Kucch To Hai – I Know What you did Last Summer (1997)
Awara Paagal Deewana – The Whole Nine Yards (2000)
Deewangee – Primal Fear (1996)
Kartoos – Point of No Return (1993)
Yeh Kya Ho Raha Hai – American Pie (1999)
Yaarana – Sleeping with the Enemy (1991)
Murder – Unfaithful (2002)
Krrish – Some part inspired from Paycheck
Dil lage – Sabrina
Mein Anari tu khiladi – The hard way
The Train – Derailed
Speed – Cellular
Malamaal Weekly – Waking Ned Divine
Ek Ajnabee – Man on Fire
The Killer – Collateral
Raaz – What Lies Beneath
Kaante – Reservoir Dogs
Chocolate – The Usual Suspects
Alag – Powder
Deewane Huye Paagal – There’s Something About Mary
Hum Tum – When Harry Met Sally /Before Sunset
Mere Yaar Ki Shaadi Hai – My Best Friend’s Wedding
Aap Ki Khatir – The Wedding Date
Kyonki Main Jhuth Nahin Bolta – Liar Liar
Papi Gudia – Child’s Play
Zinda – Old Boy (Korean Movie, not Hollywood)
Main Hoon Na – Never Been Kissed
Dil Hai ki Manta nahi – It Happenned One night / Sure Thing
Ram Jaane – Angels with Dirty Face
Phir Hera Pheri – Lock, Stock and Two Smoking Barrels.
Taxi # 9211 – Changing Lanes
Aak Ruka Hua Faisala – 12 Angry men
sadak – taxi driver
darr – cape fear
takkar – unlawful entry (also see fareb)
Bachke Rehna Re Baba – Heartbreakers
Bunty aur Babli – Bonnie & Clyde
Kya Kool Hain Hum – The Monster
Maine Pyar kyun kiya – Cactus Flower
Yakeen – Shattered
Ghulam – On the waterfront
Aitbaar – Fear
Sholay – The seven samurai / magnificent seven
munnabhai mbbs – patch adms
ghajini – Memento
God father – inspired Sarkar and Sarkar Raj
Bruce Almighty – God Tussi Great ho
Kahi Pyar na Ho Jaye – The Wedding Singer
Life in a metro – the Apartment
u me aur hum – the notebook
love story 2050 – the time machine
Mr ya miss – Switch
sequel to partner – Wedding crashers
Omkara – othello
aitraaz – disclosure
Chori chori – house sitter
ek hasina thi – double jeporody
musafir – U turn
mujshe shaadi karogi – anger management
qayamat – the rock
kuch kuch hota hain – sleepless in seattle
chak de india – miracle on ice
jab we met – a walk in the clouds
race – bad lovers
andaz apna apna – dirty rotten squandrel
dhoom2 – payback
Naksha – The Rundown (2003) / Welcome to the Jungle
Tathastu – John Q
Shaadi Se Pehle – Meri Biwi Ki Shaadi
Rang De Basanti – All My Sons
Mr Ya Miss – Hot Chic
Sauda The Deal – Indecent Proposal
Aabra Ka Dabra – Harry Potter
Dhoom – The Fast and the Furious & Ocean’s Eleven
Taarzan: The Wonder Car – Christine
Koi Mil Gaya – E.T. the Extra-Terrestrial, Forrest Gump
Aapko Pehle Bhi Kahin Dekha Hai – Meet the Parents
3 Deewarein – The Shawshank Redemption
Chor Machaaye Shor – Blue Streak & Hindi Movie Gol Maal
Kuch Khatti Kuch Meethi – The Parent Trap
Karobaar: The Business of Love – Indecent Proposal
Baadshah – Nick Of Time, The Mask, Rush Hour, Mr. Nice Guy
Judwaa – Comedy of Errors/ The Twin Dragons.
Fareb – Unlawful Entry (also see takkar)
Agni Sakshi – Sleeping with the Enemy
Daraar – Sleeping with the Enemy
Criminal – The Fugitive
Hum Hain Kamaal Ke – See No Evil, Hear No Evil
Akayla – Cobra
Main Azaad Hoon – Meet John Doe
Maalamaal – Brewster’s Millions
Janbaaz – Duel in the Sun
The Burning Train – Shinkansen Daibakuha
Partner - Hitch
Bichhoo – Léon
Hum kaun hai – The Others
Bazigar – A kiss before dying
36 China Town – Once Upon a Crime
Jism – Body Heat
Raghu Romeo – Atame! (also known as Tie Me Up! Tie Me Down)
Dansh – Death and the Maiden
Sangharsh – Silence of the Lambs
Ek Din 24 Ghante – Lola Rennt (also known as Run Lola Run)
Gulzar’s classic Parichay – The Sound of Music
Josh – West Side Story
Dostana – I now pronounce you chuck and larry
Bluffmaster – Matchstick Men
I am not a final authority on Bollywood. My views are my own. Please feel free to disagree with the comparisons made here. I wrote this ‘coz I obviously felt there wore some striking similarities.
This started as a notepad file on my desktop wherein I put anything that helped in my daily office work.
- vi editor is by default not unicode i.e. it supports utf-8 and not utf-16. So if you have a file containing a unicode character (a 2 byte character) so when you open this file using vi, you will be seeing two funny looking characters instead of what you expected. The solution is to use vim, which is an enhanced version of vi.
- The following would round off a decimal number. This would always consider the last digit. So the algo involves calculating the decimal part of a number and then rounding off the number accordingly (Assuming that input contains the number to be rounded off): temp = inuput;
while(temp / 10 > 1)
++i
totalLen = input.ToString().length();
decPartlen = totalLen – i – 1;
float tenMult = pow(10, decPartLen);
double result = ((int) ((tenMult * input) + 0.5)) / tenMult;ORtemp = inuput;
int len = (temp % 1).ToString().length() – 2;
float tenMult = pow(10, len);
double result = ((int) ((tenMult * input) + 0.5)) / tenMult; - If you by chance give an extra space at console and unix takes you to the next line e.g. HOME:>ls -l | egrep `^d’
> t
> quit
> break
> exit
> :q
> q
>
>
>
> end
> exit
> esc
> fi
> finish
> end
> break
> exit
> ^C
you can come out of it by pressing Ctrl + C. I’ve been stuck here a lot of time. And as you can see tried everything except the obvious at first. - UNIX does not have an option of listing only directories so you can try this: ‘
ls -l | egrep `^d''and for listing files use this ‘ls -l | egrep -v `^d'‘ - Process Explorer is a wonderful nifty utility to check for what all dll’s have been loaded corresponding to your exe. This is freely available for download from Microsoft website. A similar utility on Linux is also available. For KDE, KSysguard:
http://docs.kde.org/development/en/kdebase/ksysguard/ and for GNOME there is an app called Gnome System Monitor:
http://freshmeat.net/projects/gnome-system-monitor/. On Linux console you can use the ‘top’ or ‘ps’ command. Or you can also use htop, http://htop.sourceforge.net. Also try looking if ‘ldd’ solves your purpose. - To run a shell script from C++, you can use the following syntax: ‘long sysret = system(testscript.ksh);’. In most of the environments the return value zero would mean the system command executed successfully. Similarly if you want to run an exe or bat file from within a C++ code use CreateProcess command.
- To output a parameter that has been passed to your script, to another file, use ‘echo $1 > $filename’. I was by mistake doing this instead ‘$1 > $filename’. $1 is essentially similar to giving the parameter $1 at the prompt. echo $1 would actually echo out the value and then that value can be redirected to your file.
- If TaskManager has been disabled: http://windowsxp.mvps.org/Taskmanager_error.htm
find . -exec grep -l “string to find” {} \;
OR
find . -exec grep -H “string to find” {} \;
OR
grep -l “string to find” `find .`
OR
grep -H “string to find” `find .`
grep can search through your entire directory tree, scanning every file along the way:
grep -r “modules” .
You can also use grep to search for multiple words:
grep -r “text1\|text2\|text3″ .
In this example, grep will search only file names starting with “log”:
grep -lr “mod.*” ./log*
Search many files for a string. This example finds the string “thingy.” This is useful when I want to find, say, a CSS class name that has changed, and update it in all of my .js, .jsp and .jspf files:
find \( -name “*js” -o -name “*jsp” -o -name “*jspf” \) | xargs grep -niP ‘thingy’
To find for a particular filename use this command:
find . -name “filename” -print
To search for one or more strings in one or more files. E.g.
Search for the string ‘searchText' in all the files in current directory’ and print out each line that matches.
grep "searchText" *.*
Extended grep search all files for ’search” or ‘Text” case insensitive (-i) and if found display line number (-n) along with the line contents.
egrep -in "search|Text" *.*
Another way to search for a text in files with a particular extension:
find . -name “*.mk” | xargs grep “search.text”
AIX – OS
General stuff
http://www.scribd.com/doc/2309604/AIX-Disk-Tuning-Guidelines
1. Avoid disk I/O where possible. Turn off un-necessary logging.
2. Spread I/O over as many disks and adapters as economically feasible
3. Locate most active partitions at optimum spot on the disk – How?
4. Isolate most active partitions on their own disk
5. Randomize the sequencing of LV partitions across disks
6. Rule of thumb – There is a problem if
a. vmstat shows “wa” column averaging over 20-30% (wa = processor idle time due to disk / NFS I/O requests)
b. iostat shows %tm_act column averaging over 50-60% (tm_act = % of time the physical disk/tape was active. (bandwidth utilization for the drive) )
c. from iostat results: dividing Kbps by the tps gives the average disk transfer size(adts, not an official ETLA). This can be used to check if I/O is random ( adts 4K)
d. Formula to calculate Nbr of Disks for No Raid config – N = TPS / IOS (IOS=60 for random access and 1400 for serial access). For Raid see url..
Tools
nmon
DB2
General
Using BUFFPAGE parameter is a good thing. (See Details)
Tools
1. db2look – used to look at the schema. Can generate the DDL for selected objects.
db2look -d $DBLOC -i $DBUID -w $DBUID -t
-e > ddl_for_table.txt
db2look -d $DBLOC -i $DBUID -w $DBUID -e > ddl_for_schema.txt
2. db2 – This can launch an interactive shell or can be used to fire sqls directly or special commands. Depending on the node you are logged on some commands will not work
db2 “select * from item_master” > all_items.txt
db2 -x list applications (lists all the active connections, requires to be executed on the DB server)
db2 get snapshot for locks on (get current locks on the DB, DB Server only)
db2 get snapshot for all on (get all the snapshots, results can get huge!!, DB Server only)
db2 “alter table trans_invn alter column trans_invn_type_char drop expression”
db2 attach to user using (to change default node associated with a login into the DB Server)
3. db2advis – Tuning advisor (DB Server only). Makes recommendations for sql performance tuning. Note, this most likely _always_ recommends something. So we do need to cross check whether we need to do everything this tool advises. But it is a good starting point\
db2advis -d $DBLOC -i -t
4. db2exfmt – Formatter (DB Server only)5. db2expln – Explains plan.
db2expln -d $DBLOC -u $DBUID $DBPWD -o -f [-z delimiter -g Visual Graph]
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.cmd.doc/doc/r0005736.html
6. Catalog commands
a. Db2 catalog tcpip node remote server
b. Db2 catalog db as at node
Details
http://www-128.ibm.com/developerworks/db2/library/techarticle/anshum/0107anshum.html
Running stats on all the table and indexes
db2 -v connect to DB_NAME
db2 -v “select tbname, nleaf, nlevels, stats_time from sysibm.sysindexes”
db2 -v reorgchk update statistics on table all
db2 -v “select tbname, nleaf, nlevels, stats_time from sysibm.sysindexes order by stats_time”
db2 -v terminate
Running stats for one table
db2 -v runstats on table TAB_NAME and indexes all
Checking if stats have been run recently
db2 -v “select tbname, nleaf, nlevels, stats_time from sysibm.sysindexes”
Determine whether BUFFPAGE is being used
db2 -v connect to DB_NAME
db2 -v SELECT * from SYSCAT.BUFFERPOOLS
db2 -v connect reset
db2 -v terminate
Edit settings for BUFFPAGE
db2 -v connect to DB_NAME
db2 -v select * from syscat.bufferpools
db2 -v alter bufferpool IBMDEFAULTBP size -1
db2 -v connect reset
db2 -v update db cfg for dbname using BUFFPAGE bigger_value
db2 -v terminate
Verifying Buffer Pool is sufficient
db2 -v update monitor switches using bufferpool on
db2 -v get monitor switches db2 -v reset monitor all
– run your application –
db2 -v get snapshot for all databases > snap.out
db2 -v get snapshot for dbm >> snap.out
db2 -v get snapshot for all bufferpools >> snap.out
db2 -v reset monitor all db2 -v terminate
Buffer Hit Ratio (BHR) = (1 – ((buffer pool data physical reads + buffer pool index physical reads) / (buffer pool data logical reads + pool index logical reads) )) * 100%
Ideally BHR should be greater than 95%
LOGBUFSZ parameter….
db2 connect to user using
http://www.cse.yorku.ca/course_archive/2006-07/W/6421/db2notes/import.html

Recent Comments