Wednesday, January 25, 2012

Computer Shortcut keys for Windows 95/2000/XP/NT/VISTA/7

 BASIC SHORTCUT KEYS
Alt + F File menu options in current program
Alt + E Edit options in current program
F1 Universal help (for all programs)
Ctrl + A Select all text
Ctrl + X Cut selected item
Shift + Del Cut selected item
Ctrl + C Copy selected item
Ctrl + Ins Copy selected item
Ctrl + V Paste
Shift + Ins Paste
Home Go to beginning of current line
Ctrl + Home Go to beginning of document
End Go to end of current line
Ctrl + End Go to end of document
Shift + Home Highlight from current position to beginning of line
Shift + End Highlight from current position to end of line
Ctrl + f Move one word to the left at a time
Ctrl + g Move one word to the right at a time

MICROSOFT® WINDOWS SHORTCUT KEYS
Alt + Tab Switch between open applications
Alt + Shift + Tab Switch backwards between open applications
Alt + Print Screen Create screen shot for current program
Ctrl + Alt + Del Reboot/Windows® task manager
Ctrl + Esc Bring up start menu
Alt + Esc Switch between applications on taskbar
F2 Rename selected icon
F3 Start find from desktop
F4 Open the drive selection when browsing
F5 Refresh contents
Alt + F4 Close current open program
Ctrl + F4 Close window in program
Ctrl + PlusKey Automatically adjust widths of all columns in Windows Explorer
Alt + Enter Open properties window of selected icon or program
Shift + F10 Simulate right-click on selected item
Shift + Del Delete programs/files permanently Holding Shift During Bootup Boot safe mode or bypass system files


WINKEY SHORTCUTS
WINKEY + D Bring desktop to the top of other windows
WINKEY + M Minimize all windows
WINKEY + SHIFT + M Undo the minimize done by WINKEY + M and WINKEY + D
WINKEY + E Open Microsoft Explorer
WINKEY + Tab Cycle through open programs on taskbar
WINKEY + F Display the Windows® Search/Find feature
WINKEY + CTRL + F Display the search for computers window
WINKEY + F1 Display the Microsoft® Windows® help
WINKEY + R Open the run window
WINKEY + Pause/Break Open the system properties window
WINKEY + U Open utility manager
WINKEY + L Lock the computer (Windows XP® & later)

OUTLOOK SHORTCUT KEYS
Alt + S Send the email
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + P Open print dialog box
Ctrl + K Complete name/email typed in address bar
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + U Underline highlighted selection
Ctrl + R Reply to an email
Ctrl + F Forward an email
Ctrl + N Create a new email
Ctrl + Shift + A Create a new appointment to your calendar
Ctrl + Shift + O Open the outbox
Ctrl + Shift + I Open the inbox
Ctrl + Shift + K Add a new task
Ctrl + Shift + C Create a new contact
Ctrl + Shift+ J Create a new journal entry

WORD SHORTCUT KEYS
Ctrl + A Select all contents of the page
Ctrl + B Bold highlighted selection
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + N Open new/blank document
Ctrl + O Open options
Ctrl + P Open the print window
Ctrl + F Open find box
Ctrl + I Italicize highlighted selection
Ctrl + K Insert link
Ctrl + U Underline highlighted selection
Ctrl + V Paste
Ctrl + Y Redo the last action performed
Ctrl + Z Undo last action
Ctrl + G Find and replace options
Ctrl + H Find and replace options
Ctrl + J Justify paragraph alignment
Ctrl + L Align selected text or line to the left
Ctrl + Q Align selected paragraph to the left
Ctrl + E Align selected text or line to the center
Ctrl + R Align selected text or line to the right
Ctrl + M Indent the paragraph
Ctrl + T Hanging indent
Ctrl + D Font options
Ctrl + Shift + F Change the font
Ctrl + Shift + > Increase selected font +1
Ctrl + ] Increase selected font +1
Ctrl + Shift + < Decrease selected font -1
Ctrl + [ Decrease selected font -1
Ctrl + Shift + * View or hide non printing characters
Ctrl + f Move one word to the left
Ctrl + g Move one word to the right
Ctrl + h Move to beginning of the line or paragraph
Ctrl + i Move to the end of the paragraph
Ctrl + Del Delete word to right of cursor
Ctrl + Backspace Delete word to left of cursor
Ctrl + End Move cursor to end of document
Ctrl + Home Move cursor to beginning of document
Ctrl + Space Reset highlighted text to default font
Ctrl + 1 Single-space lines
Ctrl + 2 Double-space lines
Ctrl + 5 1.5-line spacing
Ctrl + Alt + 1 Change text to heading 1
Ctrl + Alt + 2 Change text to heading 2
Ctrl + Alt + 3 Change text to heading 3
F1 Open help
Shift + F3 Change case of selected text
Shift + Insert Paste
F4 Repeat last action performed (Word 2000+)
F7 Spell check selected text and/or document
Shift + F7 Activate the thesaurus
F12 Save as
Ctrl + S Save
Shift + F12 Save
Alt + Shift + D Insert the current date
Alt + Shift + T Insert the current time
Ctrl + W Close document


EXCEL SHORTCUT KEYS
F2 Edit the selected cell
F5 Go to a specific cell
F7 Spell check selected text and/or document
F11 Create chart
Ctrl + Shift + ; Enter the current time
Ctrl + ; Enter the current date
Alt + Shift + F1 Insert new worksheet
Shift + F3 Open the Excel® formula window
Shift + F5 Bring up search box
Ctrl + A Select all contents of worksheet
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + C Copy selected text
Ctrl + V Paste
Ctrl + D Fill
Ctrl + K Insert link
Ctrl + F Open find and replace options
Ctrl + G Open go-to options
Ctrl + H Open find and replace options
Ctrl + U Underline highlighted selection
Ctrl + Y Underline selected text
Ctrl + 5 Strikethrough highlighted selection
Ctrl + O Open options
Ctrl + N Open new document
Ctrl + P Open print dialog box
Ctrl + S Save
Ctrl + Z Undo last action
Ctrl + F9 Minimize current window
Ctrl + F10 Maximize currently selected window
Ctrl + F6 Switch between open workbooks/windows
Ctrl + Page up & Page Down: Move between Excel® worksheets in the same document
Ctrl + Tab Move between two or more open Excel® files
Alt + = Create formula to sum all of above cells
Ctrl + ‘ Insert value of above cell into current cell
Ctrl + Shift + ! Format number in comma format
Ctrl + Shift + $ Format number in currency format
Ctrl + Shift + # Format number in date format
Ctrl + Shift + % Format number in percentage format
Ctrl + Shift + ^ Format number in scientific format
Ctrl + Shift + @ Format number in time format
Ctrl + g Move to next section of text
Ctrl + Space Select entire column
Shift + Space Select entire row
Ctrl + W Close document

Hindu Rituals - Part3

Why do we do Namaste?

Indians greet each other with namaste. The two palms are placed together in front of the chest and the head bows whilst saying the word namaste. This greeting is for all - people younger than us, of our own age, those older than friends, even strangers and us.
There are five forms of formal traditional greeting enjoined in the shaastras of which namaskaram is one. This is understood as prostration but it actually refers to paying homage as we do today when we greet each other with a namaste.
Namaste could be just a casual or formal greeting, a cultural convention or an act of worship. However there is much more to it than meets the eye. In Sanskrit namah + te = namaste. It means - I bow to you - my greetings, salutations or prostration to you. Namaha can also be literally interpreted as "na ma" (not mine). It has a spiritual significance of negating or reducing one’s ego in the presence of another.
The real meeting between people is the meeting of their minds. When we greet another, we do so with namaste, which means, "may our minds meet," indicated by the folded palms placed before the chest. The bowing down of the head is a gracious form of extending friendship in love and humility
The spiritual meaning is even deeper. The life force, the divinity, the Self or the Lord in me is the same in all. Recognizing this oneness with the meeting of the palms, we salute with head bowed the Divinity in the person we meet. That is why sometimes, we close our eyes as we do namaste to a revered person or the Lord – as if to look within. The gesture is often accompanied by words like "Ram Ram,” "Jai Shri Krishna", "Namo Narayana", "Jai Siya Ram", "Om Shanti" etc - indicating the recognition of this divinity.
When we know this significance, our greeting does not remain just a superficial gesture or word but paves the way for a deeper communion with another in an atmosphere of love and respect.

Hindu Rituals - Part2

Why do we have a prayer room?

Most Indian homes have a prayer room or altar. A lamp is lit and the Lord worshipped each day. Other spiritual practices like japa - repetition of the Lord’s name, meditation, paaraayana - reading of the scriptures, prayers, and devotional singing etc are also done here. Special worship is done on auspicious occasions like birthdays, anniversaries, festivals and the like. Each member of the family - young or old - communes with and worships the Divine here.
The Lord is the entire creation. He is therefore the true owner of the house we live in too. The prayer room is the Master room of the house. We are the earthly occupants of His property. This notion rids us of false pride and possessiveness.
The ideal attitude to take is to regard the Lord as the true owner of our homes and us as caretakers of His home. But if that is rather difficult, we could at least think of Him as a very welcome guest. Just as we would house an important guest in the best comfort, so too we felicitate the Lord’s presence in our homes by having a prayer room or altar, which is, at all times, kept clean and well-decorated.
Also the Lord is all pervading. To remind us that He resides in our homes with us, we have prayer rooms. Without the grace of the Lord, no task can be successfully or easily accomplished. We invoke His grace by communing with Him in the prayer room each day and on special occasions.

Each room in a house is dedicated to a specific function like the bedroom for resting, the drawing room to receive guests, the kitchen for cooking etc. The furniture, decor and the atmosphere of each room are made conducive to the purpose it serves. So too for the purpose of meditation, worship and prayer, we should have a conducive atmosphere - hence the need for a prayer room.
Sacred thoughts and sound vibrations pervade the place and influence the minds of those who spend time there. Spiritual thoughts and vibrations accumulated through regular meditation, worship and chanting done there pervade the prayer room. Even when we are tired or agitated, by just sitting in the prayer room for a while, we feel calm, rejuvenated and spiritually uplifted.

Hindu Rituals - Part1

Why do we light a lamp?

In almost every Indian home a lamp is lit daily before the altar of the Lord. In some houses it is lit at dawn, in some, twice a day – at dawn and dusk – and in a few it is maintained continuously - Akhanda Deepa. All auspicious functions commence with the lighting of the lamp, which is often maintained right through the occasion.
Light symbolizes knowledge, and darkness - ignorance. The Lord is the "Knowledge Principle" (Chaitanya) who is the source, the enlivener and the illuminator of all knowledge. Hence light is worshiped as the Lord himself.
Knowledge removes ignorance just as light removes darkness. Also knowledge is a lasting inner wealth by which all outer achievement can be accomplished. Hence we light the lamp to bow down to knowledge as the greatest of all forms of wealth.
Why not light a bulb or tube light? That too would remove darkness. But the traditional oil lamp has a further spiritual significance. The oil or ghee in the lamp symbolizes our vaasanas or negative tendencies and the wick, the ego. When lit by spiritual knowledge, the vaasanas get slowly exhausted and the ego too finally perishes. The flame of a lamp always burns upwards. Similarly we should acquire such knowledge as to take us towards higher ideals.
Whilst lighting the lamp we thus pray:
Deepajyothi parabrahma
Deepa sarva tamopahaha
Deepena saadhyate saram
Sandhyaa deepo namostute
I prostrate to the dawn/dusk lamp; whose light is the Knowledge Principle (the Supreme Lord), which removes the darkness of ignorance and by which all can be achieved in life.

Ancient Astrology - Hindu Myth - Vedic Samprada


Vedic astrology is an ancient system of astrology originated in India. This ancient science has been practiced in India for more than eight thousand years. It is called "Jyotish" in Hindi, which means the knowledge or science of light. Since Vedic astrology or Jyotish is a part (Vedanga) of Vedas (ancient Indian Hindu scripts), it is known as Vedic astrology.  
There are many differences between Vedic astrology and Western astrology, but the main difference is that the Vedic astrologers use the Sidereal system or fixed zodiac while Western astrologer use the Tropical system or moving zodiac. The difference between both zodiac (Ayanamsa) is now roughly 23 degrees which is almost a whole sign. This means that your Sun-sign that you see in the Magazines or Newspapers usually is not the same as your Vedic Sun-sign. In most cases it is one sign back. For example, if your Sun sign is Taurus according to a Newspaper, which uses Western astrology, it is most likely that you will be an Aries when a Vedic astrologer does your chart using the system of Vedic astrology.
Another important difference is that Western astrology mostly deals with one's psychological patterns and personality while Vedic astrology deals with more of practical matters and one's karmic patterns.
The Basic Components of Vedic Astrology
The most basic elements of Vedic astrology are the nine planets or heavenly bodies and the twelve signs of the zodiac and the twelve houses of the chart. When studying Vedic astrology, it is important to become familiar with the Sanskrit words for all the main components. To begin with, let it be known that the words planets and "grahas" are synonymous. The twelve signs of the zodiac are called "rashis" and the houses are called "bhavas" or "sthanas" .
The nine planets used in Vedic astrology are:
Common Name
Sanskrit Name
Sun
Ravi
Moon
Chandra
Mars
Kuja or Mangala
Mercury
Budha
Jupiter
Guru
Venus
Shukra
Saturn
Shani
Rahu
Raahu
Ketu
Ketu
The twelve signs, their lords, and their characteristics are given below:
Sun Sign
Sanskrit Name
Lord
Nature
Sex
Motion
Aries Mesha Mars Fire M Movable
Taurus Vrishaba Venus Earth F Fixed
Gemini Mithuna Mercury Air M Common
Cancer Karkata Moon Water F Movable
Leo Simha Sun Fire M Fixed
Virgo Kanya Mercury Earth F Common
Libra Thula Venus Air M Movable
Scorpio Vrishchika Mars Water F Fixed
Sagittarius Dhanus Jupiter Fire M Common
Capricorn Makara Saturn Earth F Movable
Aquarius Kumbha Saturn Air M Fixed
Pisces Meena Jupiter Water F Common
The following figures shows the astrology chart or horoscope in South-Indian and North-Indian styles which are used to predict ones nature, future etc.,
South-Indian Style Chart North-Indian Style Chart
Each house spans 30 degrees and the whole chart takes 360 degrees. Always, in the south-indian chart, the house where the ascendent is present is taken as the first house and going in clockwise fashion 2,3, .. and the 12th house to complete 360 degrees.
The parameters that are required to cast a chart are:
  • Date of Birth
  • Time of Birth
  • Place of Birth (Latitude and Longitude)
Based on the above parameters, the chart of the individual is casted. If there are any discrepancy in the above parameters, then the casting of the chart will result in worng casting of the chart which will result in wrong predictions. Please make sure that you provide accurate information for casting the chart.
There are different types of charts derived from the main chart (raashi chart), these are :
  • Raashi Chart (The Basic chart)
  • Hora
  • Drekkana
  • Chaturthamsha
  • Sapthamsha
  • Astamsha
  • Navamsha Kundali (Important and seen along with Raashi chart)
  • Dashamsha
  • Shodashamsha
  • Vimshamsha
  • Chaturvimshamsha
  • Bhamsha
  • Thrimshamsha
  • Khavedamsha
  • Akshavedamsha
  • Shastyamsha
What does these houses signify?
First House - Lagnasthan, Tanusthan
This house signifies life,longevity, self, health, nature and appearance of native. Complexion,vitality, sorrows, gains and profits to younger brothers and his friends. It governs head and face.
Second House - Dhana-sthan, Kutumb-sthan
This house indicates inflow of finances, bank position, right eye, family, early age or boyhood,speech, sanyas, servants and friends. Self earned wealth, loss or damage, worldly possessions, jewellery, grandfather and mother. It also denotes family, eyesight, understanding with family members,inheritance, law suits, throat, right eye, domestic comforts in general.
Third House - Bhatru-sthan, Parakram-sthan
It denotes younger brothers and sisters and their relations. It signifies courage, intelligence,education up to Higher Secondary level, taste for writing, ornaments,clothes, short journeys. Signing contracts and documents etc. Body parts are arms, right ear, shoulders etc.
Fourth House - Matru-sthan, Sukha-sthan
This house signifies mother,property, conveyance, domestic surroundings and happiness. Old age environments, private affairs, public, inheritance, false allegations,agriculture land and its produce. It represents breasts, chest, lung, stomach, elbow joints etc.
Fifth House - Vidya-sthan, Putra-sthan
Children, speculation, intellectual status and luck are gauged from this house. Pleasure,love affairs, lady love, legal or illegal amusements, kidnap, rape, etc. are also checked. Belly, heart, liver, spleen are the body parts covered by this house.
Sixth House - Ripu-sthan, Rog-sthan
This house is responsible for enemies, health, service, servants, uncle, aunts and relations on father's side. Food, subordinates, debts, obstacles in life, mental worries, theft and calamity etc. The body parts denoted are kidney,large intestine, uterus and anus.
Seventh House - Bharya-sthan, Maraka-sthan
Matters regarding wife,husband, partnership, external sex organs, conjugal happiness are checked from 7th house. This house also denotes marriage, married life, love contracts, litigations, divorce, honour and reputation in foreign country. Body parts are private parts, uterus, glands etc.
Eighth House - Mrutyu-sthan
Diseases, death, finances through unfair means, internal sex organs, longevity, mental pain obstacles, dowry of wife, gain from in laws, mode of death, imprisonment, worries and privations are checked from 8th house, It indicates body parts as scrotum, pelvis, seminal vesicles, external genitalia, etc.
Ninth House - Bhagya-sthan
This house indicates religion, foreign travel, publicity, preceptor, higher education, learning, writing books, also faith, wisdom, prosperity, powers of foresight, religious institutions, providential help, etc. Hips, thighs are body parts.
Tenth House - Karma-sthan, Pitru-sthan
This important house indicates father, profession, status in life, activities outside house, pleasures, honour, power and authority, Government favour, trade,business, command, occupation, adopted son. All questions regarding worldly activities and moral responsibilities. Body parts are knees, joints, bones, hairs and back.
Eleventh House - Labha-sthan
It accounts for accumulated wealth, elder brothers and sisters and relations with them. Friends, fluctuating money gains, club or social activities, emotional attachments, love affairs and friends, honour, social success etc. Body parts are legs, left ear, teeth, ankle etc.
Twelfth House - Vyaya-sthan
It signifies private enemies, pleasures of beds, law suits, imprisonments, secret works, moksha, hospitalisation, conjugal relations with opposite sex other than legitimate. Sorrows, debts, lost goods etc. are judged. Body parts are feet, left eye, teeth etc.
Casting and Predicting a Chart
There are two parts in astrology. One is the Casting the chart or deriving the chart from the persons date, time and place of birth as inputs. Second is the Prediction part which involves predicting the future of the person based on the casted birth chart.
Casting mainly involves mathematics and astronomy where we study the movements of planets and accordingly cast the chart based on the planetary position when the person is born.
Predicting involves in-depth study of the effects of various planets when in different zodiacs.This reqires lot of study of old astrology books, manuscripts and discussions with other astrologers and is much study involved.
While predicting a chart one has to observe the combined effects of planets, if any house is occupied by two or more planets it gives the combined effect.
Vedic Astrology is a vast and endless study and in order to predict accurately one has to study the subject for many many years and has to see the minor details as well as major details in a given chart, the different "Yogas" for a chart, etc.

Lease Agreement Template

            THIS AGREEMENT OF LEASE executed this xxth day of -->Month<-- -->Year<-- (Year in words) between the -->Name of House Owner<-- residing at -->Complete Address<-- herein after called the LESSORS which expression shall mean and include their successors and assigns of the one part and -->Tenant Name<--, -->Tenants Current/Permanent Address<--, which shall include its successors and assigns of the other part, WITNESSETH:

            WHEREAS THE LESSORS is the owner of the house bearing -->Address of house to be rented<-- and the LESSORS has agreed to rent out the above premises herein called the DEMISED PREMISES. The LESSE has also agreed to take on lease the demised premises for self residential purpose for a period of 11 months commencing from (-->DD MMM YYYY<--) on a monthly rent of Rs.-->Rent Amt<--/- (Amount in words).


3. THE LESSE HEREBY AGREES:

     (i)            That the monthly rent & maintenance charges will be payable regularly and without abatement or any reduction whatsoever except as provided ion the agreement on or before the 5th day of each month succeeding for which it is payable.

   (ii)            To pay the LESSORS as advance amount of Rs.-->Advance Amt<--/- (-->Amount in words<--) being advance and security deposit and the receipt of which the LESSORS hereby ACKNOWLADGES and this advance as INTEREST FREE security deposit will be refunded in one lump sum by the LESSORS at the time of vacation or adjusted against arrears of rental, repairs & damages if any.

 (iii)            To pay all charges relating to electricity and water consumed the demised premises.

 (iv)            To keep the premises in good and habitable condition and on the expiry of the lease for with handover possession of the premises in the same condition, as then let, subject to normal wear and tear and acts of GOD, if the lease is not renewed for a further period as provided elsewhere in the agreement.

   (v)            Not to make any structural alteration to the demised premises, without the prior consent, in writing, from the LESSORS.

 (vi)            Shall use the DEMISED premises only for the residential purpose and shall not use it for any offensive or objectionable purposes.

(vii)            Not to sub-let the above mentioned premises in the whole or part to anyone and shall handover the possession of the premises to the LESSORS at the time of vacation.


4. THE LESSORS HEREBY AGREES:

(a)    To pay the house tax, municipal tax and any other taxes or cess levied by the GOVT or local bodies pertaining to the demised premises.

(b)   To allow the LESSE to enjoy the demised premises without any hindrance or let from the LESSORS or any other person claiming through him.

(c)    To permit the LESSE to remove from the premises at the expiry or sooner termination of the tenance, all the fixtures and fittings installed by the LESSEE.

(d)   The rent is valid for 11 months of this agreement and If required for further period an increase of rent of 10% is payable.


5. IT IS HEREBY EXPREESLY AGREED BETWEEN THE PARTIES THAT:

(a)    The lease agreement is terminable on 3 months (three months) notice on either side.

(b)   IF THE LESSEE shall be desirous of continuing the tenancy hereby created for a further term at the expiration of the term hereby agreed to, after the LESSEE has expressed his intentions by a notice, in writing, TWO MONTHS before the expiration of the lease, the LESSOR may at his option renew the lease on terms and conditions to be mutually agreed upon.


IN WITNESS WHEREOF the parties have set their hands and seal to these presents on the day, month and year first hereinabove written.


SCHEDULE OF PROPERTY


-->Rented Property Address<--


WITNESS:                                                                                                    LESSORS

1.




2.

Advanced Unix Commands

Some more Unix Commands for you in addition to those posted earlier. Watch this space for more.
  • jobs --- lists your currently active jobs (those that you put in the background) and their job numbers. Useful to determine which one you want to foreground if you have lots of them.
  • bg --- background a job after suspending it.
  • fg %jobnumber --- foreground a job
  • !! --- repeat the previous command (but CTRL-p, is safer, because you have hit return in addition)
  • !pattern --- repeat the last command that starts with pattern
  • echo $VARIABLE --- shows the value of an environment variable
  • setenv --- lets you set environment variables. For example, if you typed a wrong value for the TERM variable when logging in, you don't have to log out and start over, but you can just do setenv TERM vt100 (or whatever). To see what all your environment variables are set to, type env. The one that you're most likely to have to set is the DISPLAY variable, when using an X-display.
  • unset VAR --- lets you un-set environment variables. Useful, for example, if you've usually set autologout but want to stay logged on for a while without typing for some reason, or if you set the DISPLAY variable automatically but want to avoid opening windows for some reason.
  • source filename --- you need to source your dotfiles after making changes for them to take effect (or log off and in again)
  • load --- will show you the load average graphically
  • ispell filename --- will check the spelling in your file. If you're running it on a LaTeX file use the -T option to tell it to ignore the LaTeX commands. You can create and use your own dictionary to avoid having it tell you that your own name, those of fellow linguists, and linguistics terminology are a typos in every paper you write.
  • weblint --- checks the syntax of html files
  • latex2html --- translates LaTeX files into HTML
  • wn word option --- lets you access the WordNet database and display, for example, synonyms, hypernyms, or hyponyms, depending on the option you select

Command editing in the tcsh

These things are the same as in emacs:

Backspace --- delete previous character
CTRL-d --- delete next character
CTRL-k --- delete rest of line
CTRL-a --- go to start of line
CTRL-e --- go to end of line
CTRL-b --- go backwards without deleting
CTRL-f --- go forward without deleting

Other useful things

TAB --- complete filename or command up to the point of uniqueness
CTRL-u --- cancel whole line
CTRL-p --- show the last command typed, then the one before that, etc.
(you can also use the cursor up key for this)
CTRL-n --- go forwards in the history of commands
(you can also use the cursor down key for this)
CTRL-c --- cancel the processes after it has started
CTRL-z --- suspend a running process (e.g. in order to do something else in between)
you can then put the process in the background with bg
CTRL-l --- redraws the screen
| (piping) --- Lets you execute any number of commands in a sequence.
The second command will be executed once the first is done, and so forth, using the previous command's output as input. You can achieve the same effect by putting the output in a file and giving the filename as an argument to the second command, but that would be much more complicated, and you'd have to remember to remove all the junkfiles afterwards. Some examples that show the usefulness of this:
ls | more --- will show you one screenful at a time, which is useful with any command that will produce a lot of output, e.g. also ps -aux
man ls | grep time --- checks whether the man page for ls has something to say about listing files by time - very useful when you have a suspicion some command may be capable of doing what you want, but you aren't sure.
ls -lR | grep dvi --- will show you all your dvi files - useful to solve disk space problems, since they're large and usually can be deleted. 

Basic Unix Commands


Files

  • ls --- lists your files
    ls -l --- lists your files in 'long format', which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified.
    ls -a --- lists all files, including the ones whose filenames begin in a dot, which you do not always want to see.
    There are many more options, for example to list files by size, by date, recursively etc.
  • more filename --- shows the first part of a file, just as much as will fit on one screen. Just hit the space bar to see more or q to quit. You can use /pattern to search for a pattern.
  • emacs filename --- is an editor that lets you create and edit a file. 
  • mv filename1 filename2 --- moves a file (i.e. gives it a different name, or moves it into a different directory (see below)
  • cp filename1 filename2 --- copies a file
  • rm filename --- removes a file. It is wise to use the option rm -i, which will ask you for confirmation before actually deleting anything. You can make this your default by making an alias in your .cshrc file.
  • diff filename1 filename2 --- compares files, and shows where they differ
  • wc filename --- tells you how many lines, words, and characters there are in a file
  • chmod options filename --- lets you change the read, write, and execute permissions on your files. The default is that only you can look at them and change them, but you may sometimes want to change these permissions. For example, chmod o+r filename will make the file readable for everyone, and chmod o-r filename will make it unreadable for others again. Note that for someone to be able to actually look at the file the directories it is in need to be at least executable. 
  • File Compression
    • gzip filename --- compresses files, so that they take up much less space. Usually text files compress to about half their original size, but it depends very much on the size of the file and the nature of the contents. There are other tools for this purpose, too (e.g. compress), but gzip usually gives the highest compression rate. Gzip produces files with the ending '.gz' appended to the original filename.
    • gunzip filename --- uncompresses files compressed by gzip.
    • gzcat filename --- lets you look at a gzipped file without actually having to gunzip it (same as gunzip -c). You can even print it directly, using gzcat filename | lpr
  • printing
    • lpr filename --- print. Use the -P option to specify the printer name if you want to use a printer other than your default printer. For example, if you want to print double-sided, use 'lpr -Pvalkyr-d', or if you're at CSLI, you may want to use 'lpr -Pcord115-d'. See 'help printers' for more information about printers and their locations.
    • lpq --- check out the printer queue, e.g. to get the number needed for removal, or to see how many other files will be printed before yours will come out
    • lprm jobnumber --- remove something from the printer queue. You can find the job number by using lpq. Theoretically you also have to specify a printer name, but this isn't necessary as long as you use your default printer in the department.
    • genscript --- converts plain text files into postscript for printing, and gives you some options for formatting. Consider making an alias like alias ecop 'genscript -2 -r \!* | lpr -h -Pvalkyr' to print two pages on one piece of paper.
    • dvips filename --- print .dvi files (i.e. files produced by LaTeX). You can use dviselect to print only selected pages. S

Directories

Directories, like folders on a Macintosh, are used to group files together in a hierarchical structure.
  • mkdir dirname --- make a new directory
  • cd dirname --- change directory. You basically 'go' to another directory, and you will see the files in that directory when you do 'ls'. You always start out in your 'home directory', and you can get back there by typing 'cd' without arguments. 'cd ..' will get you one level up from your current position. You don't have to walk along step by step - you can make big leaps or avoid walking around by specifying pathnames.
  • pwd --- tells you where you currently are.

Finding things

  • ff --- find files anywhere on the system. This can be extremely useful if you've forgotten in which directory you put a file, but do remember the name. In fact, if you use ff -p you don't even need the full name, just the beginning. This can also be useful for finding other things on the system, e.g. documentation.
  • grep string filename(s) --- looks for the string in the files. This can be useful a lot of purposes, e.g. finding the right file among many, figuring out which is the right version of something, and even doing serious corpus work. grep comes in several varieties (grep, egrep, and fgrep) and has a lot of very flexible options. Check out the man pages if this sounds good to you.

About other people

  • w --- tells you who's logged in, and what they're doing. Especially useful: the 'idle' part. This allows you to see whether they're actually sitting there typing away at their keyboards right at the moment.
  • who --- tells you who's logged on, and where they're coming from. Useful if you're looking for someone who's actually physically in the same building as you, or in some other particular location.
  • finger username --- gives you lots of information about that user, e.g. when they last read their mail and whether they're logged in. Often people put other practical information, such as phone numbers and addresses, in a file called .plan. This information is also displayed by 'finger'.
  • last -1 username --- tells you when the user last logged on and off and from where. Without any options, last will give you a list of everyone's logins.
  • talk username --- lets you have a (typed) conversation with another user
  • write username --- lets you exchange one-line messages with another user
  • elm --- lets you send e-mail messages to people around the world (and, of course, read them). It's not the only mailer you can use, but the one we recommend.

About your (electronic) self

  • whoami --- returns your username. Sounds useless, but isn't. You may need to find out who it is who forgot to log out somewhere, and make sure *you* have logged out.
  • finger & .plan files
    of course you can finger yourself, too. That can be useful e.g. as a quick check whether you got new mail. Try to create a useful .plan file soon. Look at other people's .plan files for ideas. The file needs to be readable for everyone in order to be visible through 'finger'. Do 'chmod a+r .plan' if necessary. You should realize that this information is accessible from anywhere in the world, not just to other people on turing.
  • passwd --- lets you change your password, which you should do regularly (at least once a year). 
  • ps -u yourusername --- lists your processes. Contains lots of information about them, including the process ID, which you need if you have to kill a process. Normally, when you have been kicked out of a dialin session or have otherwise managed to get yourself disconnected abruptly, this list will contain the processes you need to kill. Those may include the shell (tcsh or whatever you're using), and anything you were running, for example emacs or elm. Be careful not to kill your current shell - the one with the number closer to the one of the ps command you're currently running. But if it happens, don't panic. Just try again :) If you're using an X-display you may have to kill some X processes before you can start them again. These will show only when you use ps -efl, because they're root processes.
  • kill PID --- kills (ends) the processes with the ID you gave. This works only for your own processes, of course. Get the ID by using ps. If the process doesn't 'die' properly, use the option -9. But attempt without that option first, because it doesn't give the process a chance to finish possibly important business before dying. You may need to kill processes for example if your modem connection was interrupted and you didn't get logged out properly, which sometimes happens.
  • quota -v --- show what your disk quota is (i.e. how much space you have to store files), how much you're actually using, and in case you've exceeded your quota (which you'll be given an automatic warning about by the system) how much time you have left to sort them out (by deleting or gzipping some, or moving them to your own computer).
  • du filename --- shows the disk usage of the files and directories in filename (without argument the current directory is used). du -s gives only a total.
  • last yourusername --- lists your last logins. Can be a useful memory aid for when you were where, how long you've been working for, and keeping track of your phonebill if you're making a non-local phonecall for dialling in.

Connecting to the outside world

  • nn --- allows you to read news. It will first let you read the news local to turing, and then the remote news. If you want to read only the local or remote news, you can use nnl or nnr, respectively. To learn more about nn type nn, then \tty{:man}, then \tty{=.*}, then \tty{Z}, then hit the space bar to step through the manual. Or look at the man page. 
  • rlogin hostname --- lets you connect to a remote host
  • telnet hostname --- also lets you connect to a remote host. Use rlogin whenever possible.
  • ftp hostname --- lets you download files from a remote host which is set up as an ftp-server. This is a common method for exchanging academic papers and drafts. If you need to make a paper of yours available in this way, you can (temporarily) put a copy in /user/ftp/pub/TMP. For more permanent solutions, ask Emma. The most important commands within ftp are get for getting files from the remote machine, and put for putting them there (mget and mput let you specify more than one file at once). Sounds straightforward, but be sure not to confuse the two, especially when your physical location doesn't correspond to the direction of the ftp connection you're making. ftp just overwrites files with the same filename. If you're transferring anything other than ASCII text, use binary mode.
  • lynx --- lets you browse the web from an ordinary terminal. Of course you can see only the text, not the pictures. You can type any URL as an argument to the G command. When you're doing this from any Stanford host you can leave out the .stanford.edu part of the URL when connecting to Stanford URLs. Type H at any time to learn more about lynx, and Q to exit.

Miscellaneous tools

  • webster word --- looks up the word in an electronic version of Webster's dictionary and returns the definition(s)
  • date --- shows the current date and time.
  • cal --- shows a calendar of the current month. Use e.g., 'cal 10 1995' to get that for October 95, or 'cal 1995' to get the whole year.  

C Coding Algorithm for producing Beep Sound with Different frequency


// beepcodes.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include
#include
#include

void GenerateSoundPattern(unsigned short code)
{
unsigned short temp;
while(code > 0)
    {
temp = code & 0xC000;
switch(temp)
{
 case 0x0000:
                        Beep(1000,1000);
break;
 case 0x4000:
                        Beep(1000,250);
break;
 case 0xC000:
                  return;
}
        Sleep(500);
code <<= 2;
    }

}

int main()
{
  GenerateSoundPattern(0x543C);  //01 01 01 00 00 11 11 00
  return 0;
}

Windows Genuine Advantage Notification

If you are using XP and if you have installed a Third Party OS, then a Windows Genuine Advantage Notification will POP out during the system startup. This may be very irritating to many users. Here are some simple methods to remove it.

Type1:
Step1: Go to C:\WINDOWS\system32
Step2: Rename the following files whichever is present and then give an extension of your choice other than *.dll
wlnotify.dll
WGA

Type2:
Step1: Go to Run option in the Start Menu in the desktop
Step2: Type regedit.exe and press OK
Step3: Registry Editor window will open and in that go to the following folder structure
HKEY_LOCAL_MACHINE->SOFTWARE->Microsoft->WindowsNT->Winlogon->Notify
Step4: In the Notify folder search for wgalogon folder and delete it.

Wednesday, January 18, 2012

Thursday, January 12, 2012

Food Adulteration at its peak in India


Sad Day for India especially to the Growing Kids after the Food Agency Corp has announced that the Milk supplied in India isn't pure. They are either diluted or contaminated. 

Long before the Food Safety Standards Authority of India undertook its recent nationwide survey to study the level of adulteration in milk, milkmen across the country have been routinely mixing milk with generous doses of water (its purity levels notwithstanding) before delivering it at our doorsteps. 

In that sense, the issue of milk adulteration is perhaps as old as the human habit of consuming milk itself. But the dilution of milk with water is one thing; adding harmful chemicals to it that can lead to an array of diseases and health conditions is another. This explains the public furore over the FSSAI’s National Survey on Milk Adulteration 2011 which has revealed that a dangerous assortment of adulterants, including fat, solid-not-fat (SNF), neutralisers, acids, hydrogen peroxide, sugar, starch, glucose, urea, salt, skimmed milk powder, formalin, vegetable fat and even detergent were found in milk samples across the country.

In fact, not only loose samples of milk produced and distributed by the unorganised sector but also samples of store-bought, branded milk were found to contain traces of adulterants. This has comes as a rude shock to consumers who have always believed that branded milk, even though more expensive, would at least be free of adulteration. Expectedly, over the past few days major dairy brands have gone into damage-control mode but that has done little to quell consumer fears.

The Government’s lackadaisical attitude towards the issue has only made matters worse. Not only has the Government woefully failed to monitor the safe production and distribution of an essential commodity like milk, it has also not cared to put on even a charade of concern since the publication of the report. Hence, there is little reason to believe that there will be any appreciable change in the quality of the milk we consume.

Remember how nothing happened in 2010 after the Navi Mumbai Police busted an adulteration racket in which sealed milk packets were injected with contaminants and then sold primarily in rural areas. Indeed, it is with regard to such indifferent attitude of the authorities that the consumers have the most to worry about. A similarly callous disregard by Government officials had recently claimed 125 lives in West Bengal, when victims consumed adulterated alcohol sold from an outlet that had been allowed to operate despite its dubious credentials.

Perhaps, then, it is not surprising that all the milk samples taken from that State, along with those collected from other States ,were found to be contaminated. However, the fact that even the more developed States, including the national capital, did only nominally ‘better’ — with Delhi reporting a contamination in 70 per cent of the samples that were collected — underlines the gravity of the issue and the need for the Government to act.