Monday, April 27, 2009

18 ways to improve your body language

18 ways to improve your body language: "Continuing from the previous post 6 reasons to improve your body language, here is just a few of many pointers on how to improve your body language. Improving your body language can make a big difference in your people skills, attractiveness and general mood.

There is no specific advice on how to use your body language. What you do might be interpreted in several ways, depending on the setting and who you are talking to. You’ll probably want to use your body language differently when talking to your boss compared to when you talk to a girl/guy you’re interested in. These are some common interpretations of body language and often more effective ways to communicate with your body.

First, to change your body language you must be aware of your body language. Notice how you sit, how you stand, how you use you hands and legs, what you do while talking to someone.

You might want to practice in front of a mirror. Yeah, it might seem silly but no one is watching you. This will give you good feedback on how you look to other people and give you an opportunity to practise a bit before going out into the world.

Another tip is to close your eyes and visualize how you would stand and sit to feel confident, open and relaxed or whatever you want to communicate. See yourself move like that version of yourself. Then try it out.

You might also want observe friends, role models, movie stars or other people you think has good body language. Observe what they do and you don’t. Take bits and pieces you like from different people. Try using what you can learn from them.

Some of these tips might seem like you are faking something. But fake it til you make it is a useful way to learn something new. And remember, feelings work backwards too. If you smile a bit more you will feel happier. If you sit up straight you will feel more energetic and in control. If you slow down your movements you’ll feel calmer. Your feelings will actually reinforce your new behaviours and feelings of weirdness will dissipate.

In the beginning easy it’s to exaggerate your body language. You might sit with your legs almost ridiculously far apart or sit up straight in a tense pose all the time. That’s ok. And people aren’t looking as much as you think, they are worrying about their own problems. Just play around a bit, practice and monitor yourself to find a comfortable balance.

1. Don’t cross your arms or legs – You have probably already heard you shouldn’t cross your arms as it might make you seem defensive or guarded. This goes for your legs too. Keep your arms and legs open.

2. Have eye contact, but don’t stare – If there are several people you are talking to, give them all some eye contact to create a better connection and see if they are listening. Keeping too much eye-contact might creep people out. Giving no eye-contact might make you seem insecure. If you are not used to keeping eye-contact it might feel a little hard or scary in the beginning but keep working on it and you’ll get used to it.

3. Don’t be afraid to take up some space – Taking up space by for example sitting or standing with your legs apart a bit signals self-confidence and that you are comfortable in your own skin.

4. Relax your shoulders – When you feel tense it’s easily winds up as tension in your shoulders. They might move up and forward a bit. Try to relax. Try to loosen up by shaking the shoulders a bit and move them back slightly.

5. Nod when they are talking – nod once in a while to signal that you are listening. But don’t overdo it and peck like Woody Woodpecker.

6. Don’t slouch, sit up straight – but in a relaxed way, not in a too tense manner.

7. Lean, but not too much – If you want to show that you are interested in what someone is saying, lean toward the person talking. If you want to show that you’re confident in yourself and relaxed lean back a bit. But don’t lean in too much or you might seem needy and desperate for some approval. Or lean back too much or you might seem arrogant and distant.

8. Smile and laugh – lighten up, don’t take yourself too seriously. Relax a bit, smile and laugh when someone says something funny. People will be a lot more inclined to listen to you if you seem to be a positive person. But don’t be the first to laugh at your own jokes, it makes you seem nervous and needy. Smile when you are introduced to someone but don’t keep a smile plastered on your face, you’ll seem insincere.

9. Don’t touch your face – it might make you seem nervous and can be distracting for the listeners or the people in the conversation.

10. Keep you head up - Don’t keep your eyes on the ground, it might make you seem insecure and a bit lost. Keep your head up straight and your eyes towards the horizon.

11. Slow down a bit – this goes for many things. Walking slower not only makes you seem more calm and confident, it will also make you feel less stressed. If someone addresses you, don’t snap you’re neck in their direction, turn it a bit more slowly instead.

12. Don’t fidget – try to avoid, phase out or transform fidgety movement and nervous ticks such as shaking your leg or tapping your fingers against the table rapidly. You’ll seem nervous and fidgeting can be a distracting when you try to get something across. Declutter your movements if you are all over the place. Try to relax, slow down and focus your movements.

13. Use your hands more confidently – instead of fidgeting with your hands and scratching your face use them to communicate what you are trying to say. Use your hands to describe something or to add weight to a point you are trying to make. But don’t use them to much or it might become distracting. And don’t let your hands flail around, use them with some control.

14. Lower your drink – don’t hold your drink in front of your chest. In fact, don’t hold anything in front of your heart as it will make you seem guarded and distant. Lower it and hold it beside your leg instead.

15. Realise where you spine ends – many people (including me until recently) might sit or stand with a straight back in a good posture. However, they might think that the spine ends where the neck begins and therefore crane the neck forward in a Montgomery Burns-pose. Your spine ends in the back of your head. Keep you whole spine straight and aligned for better posture.

16. Don’t stand too close –one of the things we learned from Seinfeld is that everybody gets weirded out by a close-talker. Let people have their personal space, don’t invade it.

17. Mirror - Often when you get along with a person, when the two of you get a good connection, you will start to mirror each other unconsciously. That means that you mirror the other person’s body language a bit. To make the connection better you can try a bit of proactive mirroring. If he leans forward, you might lean forward. If she holds her hands on her thighs, you might do the same. But don’t react instantly and don’t mirror every change in body language. Then weirdness will ensue. :)

18. Keep a good attitude – last but not least, keep a positive, open and relaxed attitude. How you feel will come through in your body language and can make a major difference. For information on how make yourself feel better read 10 ways to change how you feel and for relaxation try A very simple way to feel relaxed for 24 hours.

You can change your body language but as all new habits it takes a while. Especially things like keeping you head up might take time to correct if you have spent thousands of days looking at your feet. And if you try and change to many things at once it might become confusing and feel overwhelming.

Take a couple of these body language bits to work on every day for three to four weeks. By then they should have developed into new habits and something you’ll do without even thinking about it. If not, keep on until it sticks. Then take another couple of things you’d like to change and work on them."

Thursday, April 16, 2009

My Pets



8 steps to stop being sick with loneliness, Mind - Mind Power,Times Wellness Online

8 steps to stop being sick with loneliness, Mind - Mind Power,Times Wellness Online: "When you're missing friends and family, blood pressure may soar and your immune system weaken, Chicago University researchers said this week. Scientists have known for years that people with a good network of friends tend to live longer than those without. They're also less likely to fall victim to depression.

However, loneliness is more common these days. We live longer, have fewer children and are more likely to move away from our home towns, so we're no longer part of close-knit communities.

The study found that loneliness:

Raises blood pressure: The loneliest people had blood pressure readings 30 points higher than the most sociable, making them three times more likely to get heart disease or have a stroke than those with normal blood pressure.

Lowers immunity: High levels of stress hormone cortisol, found to be more common in lonely people, can suppress ability to fight off infection.

Interferes with sleep: Poor sleep is linked to obesity and depression.

Encourages bad habits: The lonelier you are, the more likely you are to comfort-eat fatty, sugary foods and the less likely you are to exercise.

Faster progression of Alzheimer's: It's not known why but could be the result of lack of mental stimulation.

How you can get connected

(1) Make the effort with family: Ask your family to stay in touch and try to plan regular meetings. If you have more spare time than them, accept that you may have to do more of the running. Meanwhile, stay in touch with phone calls, texts and emails.

(2) Get out of the house daily: Even if it's just to go to the shops. Smile at people and make conversation with anyone you see regularly, like a local shopkeeper. Smiling not only releases feelgood chemicals, cheering you up no end, it attracts people to you.

(3) Learn a new skill: Learning something new not only keeps your brain active, it could open up a whole new world, including new friends. Check out local education authority courses.

(4) Exercise: Not only does regular exercise help prevent heart disease, stroke, some cancers and slow the progression of Alzheimer's, it's as effective for mild to moderate depression as some antidepressants.

(5) Join a group: If you choose something you're really interested in - whether it's rambling, reading or music - you'll instantly find you're with like-minded people.

(6) Be a volunteer: People who do voluntary work for two hours a week have lower depression rates and better health than those who don't.

(7) Eat healthy, mood-boosting food: Instead of fatty comfort foods, go for oily fish such as sardines, salmon and mackerel, plus fresh fruit and vegetables, wholemeal bread, nuts and lean chicken.

(8) Get a pet: Owning a pet helps lower blood pressure, boost immunity and ease depression. And walking a dog every day is a great way to get out and meet people.

Source: Daily Mirror"

Mental exercises to sharpen your brain, Mind - Mind Power,Times Wellness Online

Mental exercises to sharpen your brain, Mind - Mind Power,Times Wellness Online: "“Mental exercises are a must to stimulate the neurons; brain cells. It is like if you do not use your eye you get a lazy-eye syndrome. Similarly, if you do not use your brain, you may end up with lazy-brain syndrome”, says Dr Hemant Thacker, consultant physician at the Jaslok and Breach Candy Hospitals, Mumbai.



Exercising ‘tiny’ brains



Mental exercises can begin right from childhood. Says Dr Prakash Vaidya, consultant paediatrician at the Wockhardt Hospital, Mumbai, “These help children as a sort of training modality and any number of hours spent on practicing a particular skill would certainly translate into better peformance.” According to the educational and cognitive scientists, certain mental exercises can teach children to become more self-possessed at earlier ages, reducing stress levels at home and improving their experience in school.



A variety of exercises can help improve working memory and intellectual flexibility as well as improving motor skills in children. These include reading to a child while continually keeping an eye contact, by tilting the book so that the pictures become difficult to understand and ask the youngsters to follow the words carefully, holding more of them in mind at one time, which is a function of working memory.



Memorising helps children use their brain to focus and retain the information. Word searches and crossword puzzles are great activities for children to exercise their brains by using the focus and thinking that they require. Working with modeling clay or play-dough is good for children as it helps develop agility and hand-brain coordination.



Young adult minds



As such young minds are curious and eager to learn, learning novel tasks can be a good exercise for the brain. For instance, you can learn a new language, learn square dancing, chess, perform tai chi or try and control the computer mouse with your opposite hand.



Pick out new challenges for the brain and it will turn sharper. Challenging the brain early in life is crucial to building up more cognitive reserve to counter brain-damaging diseases, adds Dr David Bennett, Rush University, Chicago, USA. And reading-habits prior to age 18 are a key predictor of later cognitive function.



Keep your brain sharpened



You have a vibrant enthusiastic 70-year old on one hand and a serious thinker at the age of 30 on the other. Experts vouch that mental ability is genetic but they also say that brain exercising can improve mental acuity and agility.



Intellectual activity during middle-age puts you at a lesser risk of Alzheimer’s disease. So breaking your brain over brain teasers, scrabble, crossword puzzles or playing computer-based games will not go in vain any more. They will all help sharpen your brain. Reading, playing scrabble, learning a new language or starting a new hobby stimulates the brain to think. Interestingly, travelling is also stimulating.



Practicing ‘neurobics’



According to Dr Lawrence C Katz, professor of neurobiology at the Duke University Medical Centre, Durham, NC, USA, just as you can exercise your body to fight off the effects of physical aging, you can keep your brain stronger longer with special mental exercises called neurobics. Neurobic exercises involve one or more senses in a novel way, which helps you shake up your daily routine. “Use all your senses as far as possible. And these may be more important for the mentally disabled, for instance those with dementia or Alzheimer’s disease”, adds Dr Thacker. The fun part is that neurobics can be done at any time and anywhere.



Get going

*
Get dressed with your eyes closed
*
Communicate using only visual clues at the dining table
*
Listen to the music while smelling flowers
*
Tap your fingers while listening to rain drops fall
*
Play with modelling clay while looking out of the window admiring clouds
*
Try eating or writing with the opposite hand
*
Break your routine. Go to work on a new route

Physical exercises are good for the brain in the elderly



Physical exercises have a protective effect on the brain and may also help prevent Alzheimer's disease. Studies have shown that senior citizens who walk regularly show improved memory skills, learning ability, concentration and abstract reasoning. Elderly women who walked regularly are less likely to experience age-related memory loss.



Morning exercises in the bed such as wriggling toes, stretching activate the nerves in your brain making you alert and energised. ‘Elderobics’ – cardiovascular exercises as in aerobics can improve memory and reasoning skills even beyond the age of 70.



Your brain is the boss of your body. And it needs to be taken care of. Inactivity and lack of mental exercises can result in mental decline. Your brain learns by interacting with the worldly matters through perception and action. The good news is that the brain has the capacity to rewire itself and thus even in old age it can grow neurons. So start using your brain; keep it active all through your life with stimulating mental exercises."

My 10-step plan to keep your brain sharp..., Mind - Mind Power,Times Wellness Online

My 10-step plan to keep your brain sharp..., Mind - Mind Power,Times Wellness Online:

Here's my own 10-step plan for keeping your brain sharp...

(1) Make work more enjoyable

Doing something you hate that doesn't really tax you is not healthy for your brain in the long run. Plus, if you don't feel useful or appreciated, it can seriously damage your general health and your memory. Now, I know that leaving work because you don't like your job is probably not an option in the current economic climate but you can take steps to get more from work.

When I was a doctor doing research there was one department that always clashed with mine and made work miserable.
So I went to my boss with a list of ways we could improve things - and you could do the same. Your boss will be pleased you've taken the initiative and, hopefully, you'll then get more from your job.

(2) Take ginseng

The herb ginseng has been found to seriously improve memory - especially for women in their late-50s. Ginseng has also been found to boost brain function in both sexes following a stroke. You can find it at your local pharmacy or health food store.

(3) Try something new

I'm always encouraging people to try something different, such as learning a new language, as it gets the mind working hard. Our brain is wired to respond to new things - meeting new people, doing activities you haven't tried before, taking trips to strange places or just talking about a different subject all stimulate the frontal lobes - the ones most susceptible to ageing. Even simple tricks like using the other hand to apply eyeliner or taking a different route to work can have beneficial effects.

(4) Have fun pottering about

Older people often feel guilty about pottering without serious intent but it's great for your brain. Weeding in the garden is good, while many men enjoy tinkering with an old engine in the garage. Both activities require thought and problem-solving skills such as 'which plant should I pull up?' or 'what tool should I use?' - and, crucially, they both involve being on your feet, which has been found to make you live longer.

(5) Be more active

Exercise can have a huge impact on boosting your memory, whatever your age. The good news is it doesn't have to be anything too extreme - it's doing the job as long as it increases your heart rate. Try a brisk walk, cycle or swim three or four times a week for 45 minutes at a time.

(6) Make time to sleep easy

Have you ever tried to take a test or do the crossword after a sleepless night? It becomes 10 times harder, so it's no surprise that a good night's sleep significantly improves brain functions such as memory and attention. It's worth going to bed early at least twice a week.

(7) Have a power nap

I know a quick nap can really boost your mental faculties. I often have a doze in the back of the car between meetings. You don't need a lot of time - in fact, the shorter the better or you can wake up groggy. Sometimes I don't sleep but go into what I call my 'twilight zone', where I think of nothing and zone out for two or three minutes. It's enough to refresh me.

(8) Enjoy a cuppa

I'm a tea addict and drink a minimum of six cups a day. I have to drink at least a pint to really get going in the morning. When you drink green tea, or even ordinary builders' tea, antioxidant levels in your blood soar, revving up your brain. Studies show that tea can help prevent age-related memory loss and keep dementia, such as Alzheimer's disease, at bay.

(9) Put more fish on the menu
Fish is an amazing brain booster. It's been found that healthy middle-aged people who regularly eat oily fish such as salmon, fresh tuna or mackerel have a much lower risk of memory loss and stroke. Brains of people who eat fish also show far less ageing - probably because the omega-3 fats in oily fish have a protective effect. Eat two portions a week for maximum benefits. However, if you really don't like the taste, a daily dose of good old-fashioned cod liver oil will do the trick.

(10) Exercise the old grey matter
Puzzles such as sudoku can help keep the brain active but activities where you have to interact with other people are even better - for example, playing cards with a friend. I think electronic brain-training games are a waste of money - I bought one and found it far too easy.

Using a mobile or BlackBerry to text is much better, as you have to think on your toes. I used to text with one thumb until I noticed that teenagers used both thumbs, so I became determined to learn this way. It took me two weeks and was hard going - but I got there and my text speed is now twice as fast. I think everyone over 50 should text at least once a day to ward off dementia.

Source: Daily Mirror"

Quickies for gdb

Quickies for gdb: "Debugging

* gdb'ing specific architectures [permalink]
With a fat binary (32/64bit), gdb picks the 64 bit version. If you're trying to debug a 32-bit unit test on the command-line though, the 64-bitness of /Developer/Tools/otest gets in the way:

% gdb /Developer/Tools/otest
2008-10-31 19:29:50.834 otest[711:813] Error loading
/blah/blah/blah/build/Debug/Tests.octest/Contents/MacOS/Tests:
dlopen(/blah/blah/blah/build/Debug/Tests.octest/Contents/MacOS/Tests,
265): no suitable image found. Did find:
/blah/blah/blah/build/Debug/Tests.octest/Contents/MacOS/Tests:
mach-o, but wrong architecture
2008-10-31 19:29:50.887 otest[711:813] The test bundle at
build/Debug/Tests.octest could not be loaded because it is built for a
different architecture than the currently-running test rig (which is
running as unknown).
2008-10-31 19:29:50.904 otest[714:203] *** NSTask: Task create for
path '/blah/blah/blah/build/Debug/Tests.octest/Contents/MacOS/Tests'
failed: 8, 'Exec format error'. Terminating temporary process.

You can supply a -arch flag to pick what you want:

% gdb -arch i386 /Developer/Tools/otest

And then debug your 32-bit unit test.

General

* Break on szone_error not working [permalink]
Sometimes when you have memory corruption issues, the malloc library happily informs you:

Borkdoku(11062,0xcec0600) malloc: *** error for object 0xd109010:
incorrect checksum for freed object - object was probably modified
after being freed, break at szone_error to debug

Which is fine and dandy, but it lies. I've never gotten szone_error to actually do anything. Try breaking on malloc_printf instead.

* Breaking on exceptions [permalink]
It can be annoying tracking down the cause of thrown exceptions in Cocoa. you get a notice like 2007-05-05 17:18:00.702 QueenStitcher[2804:117] *** Assertion failure in -[NSColorWell setColor:], NSColorWell.m:497, u suk l0s3r, and then the runloop happily runs again, giving you no clue where the problem is. I tell gdb to always break on Cocoa exceptions:

fb -[NSException raise]
fb objc_exception_throw()

For maximal enjoyment, add these two lines to your ~/.gdbinit file, so they'll get set no matter how you invoke gdb (no need to add these to every single project, for instance).

I've been told VoiceOver uses exceptions heavily, so if you're doing VoiceOver development, these breaks may cause you pain.

* Displaying four-character ints [permalink]
Old-school Mac programming (and Quicktime, and other places) use four-character ints, things like 'bork'. You can have gdb print them out if you need to look at one or two of them:

(gdb) print/T 1936746868
$4 = 'spit'

(thanks to Daniel Jalkut for the print/T trick)

* Finding 'self' on Intel [permalink]
(gdb) po *(int*)($ebp+8)

* Ignoring signals [permalink]
(gdb) handle SIGTRAP nostop

The signal still goes to your program. Another handy option is 'ignore' to prevent it coming to the program. Also there is 'print' to print a message go on.

* Printing method arguments [permalink]
If you've hit a breakpoint on a method that doesn't have debug symbols, you can sometimes get useful information by looking in the processor registers. Arguments start in $r3 and go up from there. For Objective-C method sends, $r3 has 'self', and $r4 has the name of the method. Subsequent arguments are in $5 and so on.

(gdb) print (char*) $r4
$5 = 0x90874160 'drawRect:'

(gdb) po $r5
<BWStitchView: 0x1a6670>

* Printing object retain count in gdb [permalink]
In the gdb console:
(gdb) print (int)[theObject retainCount]

If you're expecting to have an excessively high number of retains, you can use (unsigned int) in the cast. I find (int) a skootch faster to type.

* Printing wide character strings [permalink]
gdb won't by default let you print wide character strings. Here is a little bit of gdb code that'll let you print them. In case that page moves, here is the relevant stuff. Paste this into your .gdbinit and then you can use wchar_print:

define wchar_print
echo '

set $i = 0
while (1 == 1)
set $c = (char)(($arg0)[$i++])
if ($c == '\0')
loop_break
end
printf '%c', $c
end

echo '

end

document wchar_print
wchar_print <wstr>
Print ASCII part of <wstr>, which is a wide character string of type wchar_t*.
end

* Seeing functions and selectors [permalink]
info selectors will show you all of the selectors in the application's symbol table. info functions will show you all of the functions. You can supply regular expressions to limit the output.

* Using libgmalloc in gdb [permalink]
libgmalloc puts guard pages at the end of malloc'd blocks of memory, letting you catch buffer overruns. (This will hugely inflate your program's working set, and may lead to swapping) To turn on libgmalloc in gdb, do this:

(gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib

* calling objective-C methods in gdb [permalink]
To call an Objective-C method in the gdb console, you have to cast the return type (since gdb doesn't really know what the return value is):

(gdb) call (void)[textField setStringValue: @'Bork']

Hacks

* Loading a bundle into a running program [permalink]
Sometimes it's handy to load a bundle into a running app to do some poseAsClass: for doing some debugging or reverse engineering. Make a Cocoa bundle which has the code you want to load, then do:

(gdb) call (id) objc_getClass('NSBundle')
$1 = (struct objc_object *) 0xa0a051d8

gdb) call (id)[$1 bundleWithPath:@'/blah/blah/PoseAsClassBundle.bundle']
$2 = (struct objc_object *) 0x51467e0

(gdb) call (BOOL)[$2 load]
Reading symbols for shared libraries . done"

Quickies for emacs

Quickies for emacs: "# Disabling control-Z from backgrounding emacs [permalink]
I find emacs' control-Z behavior to be pretty annoying (it backgrounds the program if you're in a shell, or hides the window if you're in X). Add this to your .emacs file:
(global-set-key 'C-Z' nil)

# Fixing 'no job control in this shell' [permalink]
Emacs in Mac OS X 10.1.3 (and other versions) has an annoying habit of having broken shells when you do M-x shell. You get an error like 'Inappropriate ioctl for device, no job control in this shell', which makes interrupting or backgrounding programs in shell mode impossible. Domo-kun gave me a one-line patch to the emacs source:
#define DONT_REOPEN_PTY
. Add that to darwin.h and build emacs. You can get the emacs source from the Darwin projects page. If you'd like a binary, drop us some mail.

# Fixing emacs C mode indenting [permalink]
Here's a way to change the C indenting style to a major style, and override some of the pre-set values (like how emacs 21 changed the bsd indent level from 4 to 8. Gee thanks guys):

(setq c-default-style 'bsd'
c-basic-offset 4)

# Fixing emacs backspace in screen [permalink]
When running emacs insde of screen, screen helpfully turns the backspace/delete key into '^[[3~', which gets turned into a forward-delete. Unfortunately, just bashing deletechar into backward-delete-char-untabify causes backspace in incremental search to cancel the search, which is annoying.

One option is to set the TERM env var to rxvt:

% setenv TERM rxvt

Before cranking up screen.

# Macro recording [permalink]
C-x ( : start recording keyboard macro
C-x ) : stop recording keyboard macro
C-x e : replay current keyboard macro

# Make emacs indent code with spaces instead of tabs [permalink]
Personally, I prefer emacs' default indentation with a mixture of tabs and spaces. If you're working on a project or for a client that requires indentation with spaces, add this to your .emacs file. This will make spaces the indent character, and use 4 spaces per indent level, for C, C++, and Objective C:

(setq c-mode-hook
(function (lambda ()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))
(setq objc-mode-hook
(function (lambda ()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))
(setq c++-mode-hook
(function (lambda ()
(setq indent-tabs-mode nil)
(setq c-indent-level 4))))

# Resetting shell mode's idea of the current working directory [permalink]
Sometimes the shell mode will get confused as to what the current working directory is (like if you use aliases to move to a new directory, or if you use the conveniences like !$). M-x dirs will tell the shell buffer to figure out what the current working directory is.

# Restrict editing to the region [permalink]
M-x narrow-to-region

Hides everything not in the current region.

# Revisiting / reloading a file in emacs [permalink]
The $Id: $ tags for CVS are nice, but it can be a pain when you're doing lots of checkins and have to re-load the file each time. You can either execute M-x revert-bufer or bind that to a key, or else use a trick by doing C-x C-v which invokes find-alternate-file, but just so happens to have the current buffer name, so you just have to do C-x C-v RET

# Running shell command pasting result back into the buffer [permalink]
So to run uuidgen, for instance:

C-U M-! ret uuidgen ret

# Scroll line with cursor to the top of the window [permalink]
C-U 0 C-L

(you can put in another number besides zero to scroll the line with the cursor to that particular line in the buffer)

# Setting variables when loading a file [permalink]
So say you're working on a project with two-space indents, but most of your other work happens with four-space indents. If the two-space crowd is amenable, add this to the bottom of the file:

/* For the emacs weenies in the crowd.
Local Variables:
c-basic-offset: 2
End:
*/

# Showing current column position [permalink]
M-x column-number-mode

# Toggling read-only mode in a buffer [permalink]
C-X C-Q

# Turning off command highlighting in shell mode [permalink]
Emacs 21, which comes with Mac OS X 10.2, 'helpfully' puts into bold the commands you execute in the shell. This drives me nuts, so I figured out how to turn it off. Add this to your .emacs file:

(setq comint-highlight-input nil)

# Turning off font-lock mode everywhere [permalink]
(global-font-lock-mode -1)

# Turning off incremental-search highlighting [permalink]
Emacs 21, which comes with Mac OS X 10.2, has highlighting enabled when doing incremental search (which drives me nuts). You can turn that off by setting this in your .emacs file:

(setq search-highlight nil)

You may also need to
(setq isearch-lazy-highlight nil)

To turn off underlining of matching results. Only some OS X installs need this setting.

# Turning off scroll-to-end in shell-mode [permalink]
(setq comint-scroll-show-maximum-output nil)

# Undo within a given region [permalink]
C-U C-_

# Unnarrowing the region [permalink]
M-x widen

# Use only spaces when indenting code [permalink]
(setq indent-tabs-mode nil)

# Using carriage returns in query-replace / replace-string [permalink]
Use C-Q C-J (control-Q control-J) each time you want to include a carriage return. e.g. to double-space everything

M-x replace-string RET C-Q C-J RET C-Q C-J C-Q C-J RET

Or to put 'bloogie ' at the beginning of every line

M-x replace-string RET C-Q C-J RET C-Q C-J b l o o g i e SPACE RET

# compiling emacs .el files [permalink]
Big emacs .el files take a long time to load. You can compile them into .elc files by using:
% emacs -batch -f batch-byte-compile filename.el

# emacs registers [permalink]
Stick something into a register:

(select stuff)
C-x r x 1

where '1' is the register identifier.

Getting stuff out of a register:

C-x r g 1"

Monday, April 13, 2009

Warren Buffett's 10 Ways To Get Rich

"With an estimated fortune of $62 billion, Warren Buffett is the richest man in the entire world. In 1962, when he began buying stock in Berkshire Hathaway, a share cost $7.50. Today, Warren Buffett, 78, is Berkshire's chairman and CEO, and one share of the company's class A stock worth close to $119,000. He credits his astonishing success to several key strategies, which he has shared with writer Alice Schroeder. She spend hundreds of hours interviewing the Sage of Omaha for the new authorized biography The Snowball. Here are some of Warren Buffett's money-making secrets -- and how they could work for you.

1. Reinvest Your Profits: When you first make money, you may be tempted to spend it. Don't. Instead, reinvest the profits. Warren Buffett learned this early on. In high school, he and a pal bought a pinball machine to pun in a barbershop. With the money they earned, they bought more machines until they had eight in different shops. When the friends sold the venture, Warren Buffett used the proceeds to buy stocks and to start another small business. By age 26, he'd amassed $174,000 -- or $1.4 million in today's money. Even a small sum can turn into great wealth.

2. Be Willing To Be Different: Don't base your decisions upon what everyone is saying or doing. When Warren Buffett began managing money in 1956 with $100,000 cobbled together from a handful of investors, he was dubbed an oddball. He worked in Omaha, not Wall Street, and he refused to tell his parents where he was putting their money. People predicted that he'd fail, but when he closed his partnership 14 years later, it was worth more than $100 million. Instead of following the crowd, he looked for undervalued investments and ended up vastly beating the market average every single year. To Warren Buffett, the average is just that -- what everybody else is doing. to be above average, you need to measure yourself by what he calls the Inner Scorecard, judging yourself by your own standards and not the world's.

3. Never Suck Your Thumb: Gather in advance any information you need to make a decision, and ask a friend or relative to make sure that you stick to a deadline. Warren Buffett prides himself on swiftly making up his mind and acting on it. He calls any unnecessary sitting and thinking 'thumb sucking.' When people offer him a business or an investment, he says, 'I won't talk unless they bring me a price.' He gives them an answer on the spot.

4. Spell Out The Deal Before You Start: Your bargaining leverage is always greatest before you begin a job -- that's when you have something to offer that the other party wants. Warren Buffett learned this lesson the hard way as a kid, when his grandfather Ernest hired him and a friend to dig out the family grocery store after a blizzard. The boys spent five hours shoveling until they could barely straighten their frozen hands. Afterward, his grandfather gave the pair less than 90 cents to split. Warren Buffett was horrified that he performed such backbreaking work only to earn pennies an hour. Always nail down the specifics of a deal in advance -- even with your friends and relatives.

5. Watch Small Expenses: Warren Buffett invests in businesses run by managers who obsess over the tiniest costs. He one acquired a company whose owner counted the sheets in rolls of 500-sheet toilet paper to see if he was being cheated (he was). He also admired a friend who painted only on the side of his office building that faced the road. Exercising vigilance over every expense can make your profits -- and your paycheck -- go much further.

6. Limit What You Borrow: Living on credit cards and loans won't make you rich. Warren Buffett has never borrowed a significant amount -- not to invest, not for a mortgage. He has gotten many heart-rendering letters from people who thought their borrowing was manageable but became overwhelmed by debt. His advice: Negotiate with creditors to pay what you can. Then, when you're debt-free, work on saving some money that you can use to invest.

7. Be Persistent: With tenacity and ingenuity, you can win against a more established competitor. Warren Buffett acquired the Nebraska Furniture Mart in 1983 because he liked the way its founder, Rose Blumkin, did business. A Russian immigrant, she built the mart from a pawnshop into the largest furniture store in North America. Her strategy was to undersell the big shots, and she was a merciless negotiator. To Warren Buffett, Rose embodied the unwavering courage that makes a winner out of an underdog.

8. Know When To Quit: Once, when Warren Buffett was a teen, he went to the racetrack. He bet on a race and lost. To recoup his funds, he bet on another race. He lost again, leaving him with close to nothing. He felt sick -- he had squandered nearly a week's earnings. Warren Buffett never repeated that mistake. Know when to walk away from a loss, and don't let anxiety fool you into trying again.

9. Assess The Risk: In 1995, the employer of Warren Buffett's son, Howie, was accused by the FBI of price-fixing. Warren Buffett advised Howie to imagine the worst-and-bast-case scenarios if he stayed with the company. His son quickly realized that the risks of staying far outweighed any potential gains, and he quit the next day. Asking yourself 'and then what?' can help you see all of the possible consequences when you're struggling to make a decision -- and can guide you to the smartest choice.

10. Know What Success Really Means: Despite his wealth, Warren Buffett does not measure success by dollars. In 2006, he pledged to give away almost his entire fortune to charities, primarily the Bill and Melinda Gates Foundation. He's adamant about not funding monuments to himself -- no Warren Buffett buildings or halls. 'I know people who have a lot of money,' he says, 'and they get testimonial dinners and hospital wings named after them. But the truth is that nobody in the world loves them. When you get to my age, you'll measure your success in life by how many of the people you want to have love you actually do love you. That's the ultimate test of how you've lived your life.'"

Sunday, April 12, 2009

5 Minute Management Course

Lesson 1:
A man is getting into the shower just as his wife is finishing up her
shower, when the doorbell rings. The wife quickly wraps herself in a
towel and runs downstairs. When she opens the door, there stands Bob, the
next-door neighbor.
Before she says a word, Bob says, "I'll give you $800 to drop that
towel." After thinking for a moment, the woman drops her towel and stands
naked in front of Bob After a few seconds, Bob hands her $800 and leaves.

The woman wraps back up in the towel and goes back upstairs. When she
gets to the bathroom, her husband asks, "Who was that?"
"It was Bob the next door neighbor," she replies.
"Great!" the husband says, "did he say anything about the $800 he
owes me?"

Moral of the story :
If you share critical information pertaining to credit and risk with
your shareholders in time, you may be in a position to prevent
avoidable exposure.

******************
Lesson 2:
A priest offered a Nun a lift. She got in and crossed her legs,
forcing her gown to reveal a leg. The priest nearly had an accident. After
controlling the car, he stealthily slid his hand up her leg.

The nun said, "Father, remember Psalm 129?" The priest removed his
hand. But, changing gears, he let his hand slide up her leg again.
The nun once again said, "Father, remember Psalm 129?"
The priest apologized "Sorry sister but the flesh is weak"
Arriving at the convent, the nun sighed heavily and went on her way.
On his arrival at the church, the priest rushed to look up Psalm 129
It said, "Go forth and seek, further up, you will find glory."
Moral of the story:
If you are not well informed in your job, you might miss a great
opportunity.

*****************************
Lesson 3:
A sales rep, an administration clerk, and the manager are walking to
lunch when they find an antique oil lamp. They rub it and a Genie
comes out.
The Genie says, "I'll give each of you just one wish."
"Me first! Me first!" says the admin clerk. "I want to be in the
Bahamas , driving a speedboat, without a care in the world."
Puff! She's gone.

"Me next! Me next!" says the sales rep. "I want to be in Hawaii ,
relaxing on the beach with my personal masseuse, an endless supply of
Pina Coladas and the love of my life."

Puff! He's gone.

"OK, you're up," the Genie says to the manager.
The manager says, "I want those two back in the office after lunch."

Moral of the story:
Always let your boss have the first say.
*****************************
Lesson 4
An eagle was sitting on a tree resting, doing nothing. A small rabbit saw the eagle and asked him,

Can I also sit like you and do nothing?"
The eagle answered: "Sure , why not."
So, the rabbit sat on the ground below the eagle and rested. All of a
sudden, a fox appeared, jumped on the rabbit and ate it.

Moral of the story:
To be sitting and doing nothing, you must be sitting very, very high > >> up.

******************************
Lesson 5:
A turkey was chatting with a bull. "I would love to be able to get to
the top of that tree," sighed the turkey, "but I haven't got the
energy."
"Well, why don't you nibble on some of my droppings?" replied the
bull.
They're packed with nutrients."
The turkey pecked at a lump of dung, and found it actually gave him
enough strength to reach the lowest branch of the tree. The next day,
after eating some more dung, he reached the second branch. Finally
after a fourth night, the turkey was proudly perched at the top of
the tree.
He was promptly spotted by a farmer, who shot him out of the tree.

Moral of the story:

Bull might get you to the top, but it won't keep you there.
***********
Lesson 6:
A little bird was flying south for the Winter. It was so cold the
bird froze and fell to the ground into a large field. While he was lying
there, a cow came by and dropped some dung on him.
As the frozen bird lay there in the pile of cow dung, he began to
realize how warm he was. The dung was actually thawing him out! He
lay there all warm and happy, and soon began to sing for joy.

A passing cat heard the bird singing and came to investigate.
Following the sound, the cat discovered the bird under the pile of cow dung,
and promptly dug him out and ate him.

Morals of the story:

(1) Not everyone who s on you is your enemy.
(2) Not everyone who gets you out of is your friend.
(3) And when you're in deep , it's best to keep your mouth shut!

THIS ENDS THE 5-MINUTE MANAGEMENT COURSE

Friday, April 10, 2009

101 Interesting Human body and Health Facts

1. When you are looking at someone you love, your pupils dilate, and they do the same when you are looking at someone you hate.

2. The human head is one-quarter of our total length at birth but only one-eighth of our total length by the time we reach adulthood.

3. Your body gives off enough heat in 30 minutes to bring half a gallon of water to a boil.

4. Blondes have more hair. The average human head has 100,000 hair follicles, each of which is capable of producing 20 individual hairs during a person’s lifetime. Blondes average 146,000 follicles. People with black hair tend to have about 110,000 follicles, those with brown hair have 100,000 follicles. Redheads have the least dense hair, averaging about 86,000 follicles.

5. At the moment of conception, you spent about half an hour as a single cell.

6. In a lifetime, the average person produces about 25,000 quarts of saliva, enough to fill two swimming pools.

7. There are about 60,000 miles of blood vessels in the human body.

8. Heart pumps about 2,000 gallons of blood through those vessels every day.

9. Men without hair on their chests are more likely to get cirrhosis of the liver than men with hair.

10. The human brain cell can hold 5 times as much information as the Encyclopedia Britannica.

11. The acid in your stomach is strong enough to dissolve razor blades.

12. Your nose can remember 50,000 different scents.

13. The average woman is 5 inches shorter than the average man.

14. One uses 200 muscles to take one step.

15. The largest cell in the human body is the female egg and the smallest is the male sperm.

16. One gets a new stomach lining every three to four days. If you didn’t, the strong acids your stomach uses to digest food would also digest your stomach.

17. Scientists say the higher your I.Q. The more you dream.

18. Forty-one percent of women apply body and hand moisturizer at least three times a day.

19. The width of your armspan stretched out is the length of your whole body.

20. There are as many hairs per square inch on your body as a chimpanzee. You don’t see all of them because most are too fine and light to be noticed.

21. Women hearts beat faster than men.

22. Three years after a person quits smoking, there chance of having a heart attack is the same as someone who has never smoked before.

23. Scientists have discovered that the longer the ring finger is in boys the less chance they have of having a heart attack.

24. The right lung of a human is larger than the left one. This is because of the space and placement of the heart.

25. In a lifetime, the heart pumps about one million barrels of blood.

26. People that suffer from gum disease are twice as likely to have a stroke or heart attack.

27. At one time it was thought that the heart controlled a person’s emotions.

28. Women are twice as likely to be diagnosed with depression than men in the United States.

29. From all the oxygen that a human breathes, twenty percent goes to the brain.

30. People who ride on roller coasters have a higher chance of having a blood clot in the brain.

31. Once a human reaches the age of 35, he/she will start losing approximately 7,000 brain cells a day. The cells will never be replaced.

32. It is not possible to tickle yourself. The cerebellum, a part of the brain, warns the rest of the brain that you are about to tickle yourself. Since your brain knows this, it ignores the resulting sensation.

33. In America, the most common mental illness is Anxiety Disorders.

34. Your brain is 80% water.

35. Your brain is move active and thinks more at night than during the day.

36. The chances of getting a cavity is higher if candy is eaten slowly throughout the day compared to eating it all at once and then brushing your teeth.

37. If an identical twin grows up without having a certain tooth, the other twin will most likely also grow up with that tooth missing.

38. Gardening is said to be one of the best exercises for maintaining healthy bones.

39. Although the outsides of a bone are hard, they are generally light and soft inside. They are about 75% water.

40. Your thigh bone is stronger than concrete.

41. By donating just one pint of blood, four lives can be saved.

42. Blood is such a good stain that Native Americans used it for paint.

43. A woman has approximately 4.5 liters of blood in her body, while men have 5.6 liters.

44. Women blink twice as often as men.

45. The shark cornea has been used in eye surgery, since its cornea is similar to a human cornea.

46. The number one cause of blindness in adults in the United States is diabetes.

47. The eye of a human can distinguish 500 shades of the gray.

48. People generally read 25% slower from a computer screen compared to paper.

49. Men are able to read fine print better than women can.

50. All babies are colour blind when they are born.

51. The reason why your nose gets runny when you are crying is because the tears from the eyes drain into the nose.

52. The most common injury caused by cosmetics is to the eye by a mascara wand.

53. The highest recorded speed of a sneeze is 165 km per hour.

54. It is impossible to sneeze with your eyes open.

55. While sleeping, one man in eight snores, and one in ten grinds his teeth.

56. 85% of the population can curl their tongue into a tube.

57. On average, a man spends about five months of his life shaving.

58. Hair will fall out faster on a person that is on a crash diet.

59. Hair is made from the same substance as fingernails.

60. People that use mobile phones are 2.5 times more likely to develop cancer in areas of the brain that are adjacent to the ear they use to talk on the mobile phone.

61. Over 90% of diseases are caused or complicated by stress.

62. Chances of a women getting breast cancer are increased by excessive use of alcohol.

63. A person that is struck by lightning has a greater chance of developing motor neurons disease.

64. A headache and inflammatory pain can be reduced by eating 20 tart cherries.

65. Each year in America there are about 300,000 deaths that can be attributed to obesity.

66. A study indicates that smokers are likely to die on average six and a half years earlier than non-smokers. A person who smokes a pack of cigarettes a day will on average lose two teeth every ten years.

67. Studies indicate that listening to music is good for digestion.

68. Lack of sleep can affect your immune system and reduce your ability to fight infections.

69. Over 40 million Americans have chronic bad breath.

70. Carbon monoxide can kill a person in less than 15 minutes. (It is present in smoke caused by fires)

71. Every day the human stomach produces about 2 liters of hydrochloric acid.

72. The risk of cardiovascular disease is twice as high in women that snore regularly compared to women who do not snore.

73. It has been medically been proven that laughter is an effective pain killer.

74. The first known contraceptive was crocodile dung, used by Egyptians in 2000 B.C.

75. A pregnant woman’s dental health can affect her unborn child.

76. When a women is pregnant, her senses are all heightened.

77. Studies show that couples that smoke during the time of conception have a higher chance of having a girl compared to couples that do not smoke.

78. Kissing can aid in reducing tooth decay. This is because the extra saliva helps in keeping the mouth clean.

79. Studies have shown that the scent of Rosemary can help in better mental performance and make individuals feel more alert.

80. Scientists say that babies that are breastfed are more likely to be slimmer as adults than those that are not breastfed.

81. People have the tendency to chew the food on the side that they most often use their hand.

82. One out of 20 people have an extra rib.

83. People with darker skin will not wrinkle as fast as people with lighter skin.

84. People with allergies can lower allergy reactions by laughing.

85. People that smoke have 10 times as many wrinkles as a person that does not smoke.

86. Girls have more tastebud than boys.

87. Eighty percent of 10 year old girls in the USA go on a diet.

88. Children who are breast fed tend to have an IQ seven points higher than children who are not.

89. Eating chocolate three times a month helps people live longer as opposed to people who overeat chocolate or do not eat chocolate at all.

90. The average person has at least seven dreams a night.

91. The average person walks the equivalent of twice around the world in a lifetime.

92. The average person laughs about 15 times a day.

93. The vocabulary of the average person consists of 5,000 to 6,000 words.

94. About 10% of the world’s population is left-handed.

95. The average man’s penis is three times the length of his thumb.

96. One human hair can support 3 kgs of weight

97. Bile produced by the liver is responsible for making your feces a brownish, green colour.

98. From the age of thirty, humans gradually begin to shrink in size.

99. The average person falls asleep in about 12 to 14 minutes.

100. People over the age of fifty will start to lose their dislike for foods that taste bitter.

101. It takes more muscles to frown than it does to smile.