MathJax

Wednesday, August 17, 2011

Just An Epigram

 

Surely someone have already said that before,

 

If you have enough power of will each and every time to act in accordance with your best judgment then you will not regret anything in life and yours is the world, I Believe.

Sunday, August 7, 2011

VHDL - Using Image attribute to report value of scalar types.

Here is example of how to report values of scalar type to console. This maybe handy for unit test and first stages of code development. For serious test benches other approaches should be considered maybe something like -

http://bear.cwru.edu/VHDL/doc/snug2002_20020313_paper.pdf (http://bear.cwru.edu/VHDL/)

Any way this is example of how it works:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

---------------------------------------------
entity test is
---------------------------------------------
end entity;

---------------------------------------------
architecture test of test is
---------------------------------------------

signal signal_a: std_logic;
signal signal_b: boolean;
signal signal_c: natural;
signal signal_d: std_logic_vector(1 downto 0);

begin

signal_a <= '0';
signal_c <= 567;
signal_d <= "11";

---------------------------------------------
test_proc:process is
---------------------------------------------
begin
report "signal signal_a is " & std_logic'image(signal_a);
report "signal signal_b is " & boolean'image(signal_b);
report "signal signal_c is " & natural'image(signal_c);
report "signal signal_d is " &
integer'image(to_integer(unsigned(signal_d)));
wait for 100 ns;
end process;

end;
And the results:

# ** Note: signal signal_a is '0'
# Time: 100 ns Iteration: 0 Instance: /test
# ** Note: signal signal_b is false
# Time: 100 ns Iteration: 0 Instance: /test
# ** Note: signal signal_c is 567
# Time: 100 ns Iteration: 0 Instance: /test
# ** Note: signal signal_d is 3
# Time: 100 ns Iteration: 0 Instance: /test

Saturday, August 6, 2011

How to export windows search results to Excel.

Technorati Tags: ,,

You can use “sysExplorter” utility to do that.

This tool allows you to -

…grab the data stored in standard
list-views, tree-views, list boxes, combo boxes, text-boxes, and
WebBrowser/HTML controls from almost any application running on your
system, and export it to text…

Search of what ever you wish, when search is finished run this utility. Find the search in the upper window of the utility, choose it, the results will appear in the lower window. Select all the results from the lower window, copy it. Open excel and past the results there, that’s it.

Wednesday, August 3, 2011

In everything I seek to grasp… - Poem by Boris Pasternak.

One of my best loved poems. I read this poem in Russian, I think the translation is OK, but may be not really.

I am really perplexed by two opposites of the poem on one hand it fells simple, poem flows very naturally and generates vivid images yet the every day words are used intricately and originally conveying those images concisely and precisely:

“…О, если бы я только мог Хотя отчасти, Я написал бы восемь строк О свойствах страсти. О беззаконьях, о грехах, Бегах, погонях, Нечаянностях впопыхах, Локтях, ладонях…”

[ Oh, if my skill did but suffice After a fashion, In eight lines I'd anatomize The parts of passion. I'd write of sins, forbidden fruit, Of chance-seized shadows; Of hasty flight and hot pursuit, Of palms, of elbows.]

***

pasternak

***


In everything I seek to grasp
The fundamental:
The daily choice, the daily task,
The sentimental.

To plumb the essence of the past,
The first foundations,
The crux, the roots, the inmost hearts,
The explanations.

And, puzzling out the weave of fate,
Events observer,
To live, feel, love and meditate
And to discover.

Oh, if my skill did but suffice
After a fashion,
In eight lines I'd anatomize
The parts of passion.

I'd write of sins, forbidden fruit,
Of chance-seized shadows;
Of hasty flight and hot pursuit,
Of palms, of elbows.

Define its laws and origin
In terms judicial,
Repeat the names it glories in,
And the initials.

I'd sinews strain my verse to shape
Like a trim garden:
The limes should blossom down the nape,
A double cordon.

My verse should breathe the fresh-clipped hedge,
Roses and meadows
And mint and new-mown hay and sedge,
The thunder's bellows.

As Chopin once in his etudes
Miraculously conjured
Parks, groves, graves and solitudes-
A living wonder.

The moment of achievement caught
Twixt sport and torment…
A singing bowstring shuddering taut,
A stubborn bow bent.
Во всем мне
хочется дойти До самой сути.
В работе,в поисках пути,
В сердечной смуте.

До сущности протекших дней,
До их причины,
До оснований, до корней,
До сердцевины.

Всё время схватывая нить
Судеб, событий,
Жить, думать, чувствовать, любить,
Свершать открытья.

О, если бы я только мог
Хотя отчасти,
Я написал бы восемь строк
О свойствах страсти.

О беззаконьях,о грехах,
Бегах, погонях,
Нечаянностях впопыхах,
Локтях,ладонях.

Я вывел бы ее закон,
Ее начало,
И повторял ее имен
Инициалы.

Я б разбивал стихи, как сад.
Всей дрожью жилок
Цвели бы липы в них подряд,
Гуськом, в затылок.

В стихи б я внес дыханье роз,
Дыханье мяты,
Луга, осоку, сенокос,
Грозы раскаты.

Так некогда Шопен вложил
Живое чудо
Фольварков, парков, рощ, могил
В свои этюды.

Достигнутого торжества
Игра и мука -
Натянутая тетива
Тугого лука.
1956

How to restore Bookmarks in FireFox5

Interestingly it took me some time to figure out how to do this.

A little prologue here,

Previously I had Firefox 3, before I formatted my PC I just saved my whole folder of Firefox3 with everything in it (Laziness…) I was sure I would be able to restore my bookmarks somehow in future out of this stored folder.

After I had formatted my computer, and installed Firefox 5 I restore my bookmarks this way -

First: I located backed up bookmarks files in Firefox3 stored folder here they are:

Mozilla –> E:\Mozilla\Firefox\Profiles\h1ga50qq.default\bookmarkbackups.

There are several files with extension json, like “bookmarks-2011-06-16.json”.

Second: Now open Firefox 5, Go to:

Bookmarks –> Show all bookmarks –> Import and Back up –> Restore –> Choose file.

You will be prompted to choose some “.json” file, choose “bookmarks-2011-06-16.json” from location in Firefox 3.

And That’s it.

Lolita – Book by Vladimir Nabokov.

I have just finished hearing Lolita, No doubt it's interesting and unusual book, also the story feels relatively simple, the book is unique due to to fact that we glance at the soul of the narrator to his disgusting but fascinating personality. The book really conveys his character it seem that we understand what kind of man the narrator is. How selfish and cruel he is...
The language is very nice and elegant.

Sunday, July 31, 2011

The Alchemist – Book by Paulo Coelho.

This is rather unusual book - pursue your personal legend is the main and the only motive of this book.
It feel like some Arabian fairytale, In fact I think I read somewhere that this story very strongly resembles one story form the One Thousand and One Nights.
This is good motivational book that will tell you to throw everything away and peruse your dreams.
I think that there are many people for how it is hard to give up there dream, and if they wont pursue them than they will be nagged all their life,
so in general it's good to settle down all your desires by trying things. But on the other hand we all know that if you do things only based on
your emotions you may end up in a pretty bad situation, you have to consider the reality of life. From this point of view the book is to naive to
be considered something other then motivational fairytale.

The Old man and the See – Book by Ernest Hemingway.

I haven't read this book I listened to it , this was audio book, of excellent quality. The narrator made different voices for the characters the feeling was as if you were attending real performance.
The book is a short but it doesn't feel like one. Hemingway dives into many details of the progressing adventure of the old man, which makes this
story feel rich full of many insights and motives - its is motivational and desperate funny and sad, but mostly it's about the power of will and persistence.
I think the book is really good, but If you rush and wish to know quickly what's going to happen then
you will probably get restless, never-the-less this is classics so even if you think you may become restless consider reading it... classics is expected to be much longer so
here you can't complain.

Saturday, July 30, 2011

Buzz - Book by Stephen Braun.

I am interested in this subject so I was delighted reading this book, It is a short, focused book, on two most consumed drugs.

Here is primary things I wish to remember -

  • Alcohol affects many systems in the body, It modestly increases dopamine levels in the reward circuits of the brain it strongly affects excitatory neurotransmitter, glutamate. Thus slowing down activity in many parts of the brain.
  • Caffeine primary action is on adenosine receptors, The adenosine produced by working cells is used as a signaling molecule in an elegant, self-regulating control system. Adenosine signals the brain to slow down. Caffeine blocks adenosine receptors, so the brain thinks it’s not working hard and is not self slowed.
  • Caffeine causes the heart to beat more rapidly, it constricts some blood vessels, and it causes certain types of muscles to contract more easily. But, paradoxically, caffeine can also cause a relaxation response. It can, for instance, relax the airways of the lungs and cause certain types of blood vessels to open.

And very important -

  • Humans generally become tolerant to a given dose of caffeine - whether a single can of soda or ten cups of coffee - in a week to twelve days. This tolerance can be remarkably complete; that is, the brain's ability to compensate for caffeine can be so effective that tolerant users experience very little, if any, true stimulation by their customary dose… In general, withdrawal symptoms begin within twelve to twenty-four hours after the last use and peak anywhere from twenty to forty-eight hours after caffeine consumption stops. Withdrawal symptoms then typically taper off, but it usually takes a full week for a return to normal

This only a small fraction of many interesting issues raised in the book, I recommend this book for those who are interested in the subject. Personally I will go over this book again, this time summarizing interesting issues for future reference. So once I’ll wish to recall this subject I wont need to re read this book but just go over my summary.

***

Here is this summary

  • Sumerians were accomplished brewers 5,500 years ago
  • Ethanol is alcohol: It's the oxygen-hydrogen group on the upper right. Any molecule with this group attached to a carbon atom is called an alcohol.
  • Glycol is the alcohol in antifreeze, and cholesterol is a complicated type of alcohol vital for many bodily functions
  • You also can get drunk on ethanol's simpler cousin, methanol, which can be produced by the fermentation of wood and thus has the common name wood alcohol:Although cheap to produce, methanol has a rather serious drawback as an intoxicant: it is broken down in the body by an enzyme found in particular abundance in the retinas of the eyes.
  • Because it dissolves easily in water, it is rapidly absorbed from the digestive tract and mixes easily with blood. Because it also dissolves in fats, it freely passes through cell membranes, which are basically double-walled bubbles of fat.
  • Alcohol comes from sugar. They also know that this transformation isn't spontaneous—it requires the assistance of one-celled fungi called yeast.
  • The process starts with glucose, which is the sugar both humans and yeast use to power their bodies. Other sugars, such as the sucrose (table sugar) used by the Soviet home distillers, must be converted to glucose before things get going, chemically speaking. Like humans, yeast cells prefer to burn their glucose with oxygen to produce energy. But yeast cells sometimes find themselves in situations where oxygen is scarce— for instance, when they are trapped in the bottom of huge vats of grape juice. In such circumstances, they manage to carry on by using backup metabolic machinery designed to burn glucose without oxygen.
  • This anaerobic system is much less efficient than the primary, oxygen-using system. Instead of gradually (and completely) breaking down the glucose molecule with oxygen to release lots of energy, the anaerobic system simply splits the glucose in two, which results in a relatively feeble amount of energy—just enough to sustain minimum life functions until oxygen returns.
  • The details of that process are interesting in their own right,but all we're really concerned with here are those two shards remaining after the glucose is finally split. Those shards are molecules of ethanol.
  • The birth of alcohol via this inefficient splitting of glucose has one very salient consequence for humans: most of the chemical energy of the original glucose molecule remains bound up in the ethanol fragments.
  • That energy equals calorics: about seven per gram—which works out to about a hundred calories in a standard drink from the alcohol alone. Alcohol, in other words, is no diet drink.
  • Yeast cells struggling to survive under suffocating conditions quickly excrete the ethanol fragments because they are basically poisonous. Ethanol interferes with many of the reactions vital to the life of a cell.
  • As a result, yeasts excrete ethanol, which slowly builds up in the surrounding liquid—exactly where the brewer or vintner wants it.
  • Given an adequate amount of glucose, the ethanol content of a fermenting liquid rises until it reaches about 12 percent. At this point, it starts to back up inside the yeast cells because it can no longer diffuse across the cell wall. Unable to dispose of the poisonous waste, the yeasts shut down and become dormant.
  • Distillation, by the way, is possible only because ethanol molecules happen to evaporate more quickly than water molecules from a liquid mixture such as wine or beer
  • The term "proof" dates to the seventeenth century when various means were devised for checking, or "proving," that a beverage had the alcohol content its label claimed. The proof number is just about double the percentage by volume of alcohol
  • Like yeast, the cells in our bodies usually bum glucose with oxygen because it releases so much energy. But even for highly mobile humans, oxygen isn't always available. In fact, it's exactly those parts of the body that are used most vigorously that may face an oxygen shortfall. In strenuous running, for example, certain muscles use oxygen more quickly than it can be replenished by the blood, leading to a localized condition rein inisccnt of that faced by yeast: in the bottom of fermentation vats. At such times, muscle cells fall back on the same inefficient anaerobic machinery used by yeast—machinery we inherited from our single-celled ancestors.
  • It's not surprising, therefore, that in humans and other animals the process of anaerobic metabolism is slightly altered to avoid the production of ethanol. that the two resulting fragments are molecules of lactic acid, not ethanol. Too much lactic acid, of course, can cause muscle soreness and fatigue, but at least it left our forebears sober while they fled from saber-toothed tigers and their ilk.
  • At your molecular scale, it appears monstrous. You're looking at a fungiform papilla—one of the 9,000 or so small bumps on the tongue that most people call taste buds.
  • The receptors for the four basic tastes—salt, sour, sweet, and bitter—are all stimulated to one degree or another by the molecules in the scotch.
  • The end result is a complicated taste message sent to the brain—a message made even more complex by the simultaneous reception of signals from the nose, which has a much more diverse set of receptors than the tongue.
  • sweet. But ethanol clearly does interact with a separate set of nerve receptors in our mouth, nose, and esophagus called polymodal pain fibers. These receptors outnumber taste receptors by about two to one. They are very sophisticated nerve cells that respond to three kinds of stimuli: physical pressure, temperature, and specific chemicals. When these receptors are over stimulated, we perceive pain or irritation.
  • We experience burning because ethanol somehow stimulates the receptors the same way that high temperature does. (Ethanol isn't the only molecule capable of "tricking" these receptors. Capsaicin, a molecule produced by many species of pepper plants, does the same thing.)
  • As most drinkers know from experience, these burning sensations can be reduced significantly by chilling the liquid prior to consumption. Chilling actually serves several purposes. First, cool ethanol molecules have less vibrational energy than warm ethanol molecules. Less energy means less impact when the molecules physically bump into the mouth and throat's pain receptors. It also reduces the ability of ethanol to move through the layers of skin cells to get to the receptors in the first place. Cooling also makes it harder for ethanol molecules to escape as vapor. This effect is particularly important when the liquid is contained in glasses such as brandy snifters.
  • But Ethanol molecules, because they are so small and stable, are immune to acidic destruction.
  • Ethanol stimulates these glands to produce more acid by means that are not yet understood. The increased acid goes unnoticed by most people, but those with either sensitive stomachs or large appetites for alcohol may experience stomach pain or indigestion from the excess acid.
  • Why does this enzyme exist? Why do we have genes for building an enzyme specifically tailored to destroy alcohol Clearly, these genes did not just magically appear with the advent of the human discovery of fermentation. The answer to these questions lies in our guts. The helpful bacteria that populate our intestines often work under conditions similar to those experienced by yeast at the bottom of fermentation vats. Deprived of oxygen, these bacteria produce minute amounts of ethanol as a result of anaerobic metabolism. Apparently, natural selection favored creatures that could get rid of these tiny quantities of ethanol.
  • Interestingly, this heightened ethanol sensitivity in women appears to apply only to young women. Another study, done by German researchers, showed that the situation just described reverses in men and women over age fifty (Seitz et al. 1990). Alcohol dehydrogenase activity in men decreases significantly with age, to the point where the activity drops below that found in women of the same age. This means that men become increasingly sensitive to ethanol as they age, ultimately rendering them more sensitive than women.
  • When a sizable meal is consumed, the exit valve of the stomach—a muscular gate called the pylorie sphincter—closes so that the stomach can get to work digesting the food. This traps alcohol in the stomach, which not only prevents it from being rapidly absorbed in the small intestine but also increases the chances that it will be destroyed by the alcohol dehydrogenase found in the stomach lining
  • Working full-tilt, these enzymes can intercept and disable all the roughly 200 quintillion ethanol molecules in a half-ounce of pure ethanol in about an hour. This fact is the basis for the one-drink-an-hour rule of thumb for remaining sober. As we've seen, however, this rule must be applied carefully. It's most accurate for young, healthy males who slowly consume a modest drink over the course of an hour, who are taking no other drugs (such as aspirin) that interfere with the action of alcohol dehydrogenase, and who are not drinking on an empty stomach. Changing any of these variables means that more time must be allowed between drinks to ensure sobriety.
  • In reality, alcohol directly stimulates the brain and exerts a host of more complicated effects as well. It's true that, like ether, alcohol—especially at moderate to high doses—can act as a general anesthetic, depressing a broad range of central nervous system functions. But alcohol also mimics the action of the drugs cocaine, amphetamine, Valium, and opium
  • And alcohol also resembles opium because it can release our internal stores of the morphine like compounds called endorphins, thus tapping into the brain's core pleasure circuits
  • Alcohol's lack of specificity makes it a somewhat maddening quarry for research scientists. It increases the firing of some nerve cells, or neurons, while decreasing the firing of others. It stimulates some regions of the brain while depressing others. And the effects it exerts can change with time and dose.
  • A better estimate, therefore, of the brain's true size can be found by multiplying 100 billion neurons by 1,000—a rather conservative average of the number of dendritic connections that each neuron makes with another. The result: 100 trillion synapses. 100 trillion functional units. As one neuroscientist quipped, "100 trillion synapses, hell, you can do anything with that. That's more than enough to contain a soul" (Johnson 1991).
  • but the total possible number of connections—the number of ways neurons can be linked together into discrete patterns. This number cannot be Reliably estimated, though it is widely viewed as far higher than 1078
  • Neurons can "fire" because they generate a relatively large electrical charge across their membranes. In a sense, neurons are like microscopic batteries gradually storing charge, and then releasing it when fired.The electrical charge used by neurons is carried by ions—those electrically charged atoms mentioned previously. When positive and negative ions are mixed together, as they are in most parts of the body, their charges cancel out and the result is an electrically neutral solution. But if positive and negative ions are separated and concentrated, a charge difference is developed—a difference measured in volts. Neurons achieve a separation of charge by forcibly moving ions on one side or the other of the fatty cell membrane, which is an excellent electrical insulator.
  • Special protein molecules called ion pumps ferry positive ions out of cells, which leaves the outside of the cell positive and the inside negative. The process of firing generally begins with incoming signals from other neurons. These "signals" are actually tiny surges of positive or negative ions entering the dendrites through ion channels. As a result, the electrical charge inside the neuron is in constant flux, moving above and below the average maintained by the ion pumps. In a very real sense, each neuron is performing a calculation: it is adding up the signals coming into it via the dendrites. If negative ions predominate, nothing happens. The cell is already negative and so adding more negative ions just pushes the cell farther in an electrically negative direction. But if large quantities of positive ions enter the neuron, the electrical charge produced by all those ion pumps is partially neutralized. If the cell's overall charge is neutralized below a certain critical point, a trigger is pulled causing a special class of ion channels to spring open near the base of the axon—the main fiber carrying messages away from the cell. These channels let in a flood of even more positive ions, which obliterates the electrical charge at that spot.The sudden collapse of electrical potential around the base of the axon is "felt," in turn, by adjacent ion channels a bit farther down the axon. These channels now open. The charge collapses at this new point, triggering yet more channels to open farther down the axon. The process continues, like the flame of a firecracker fuse. This traveling wave of altered electrical potential is called an action potential, more commonly known as a nerve impulse.
  • Action potentials zip down axons at about 225 miles per hour. When they reach the end of the axon, they don't automatically cause the next neuron in line to fire. Such an arrangement wouldn't be terribly effective, since a single firing neuron would quickly ignite a crippling chain-reaction of firing throughout the brain. To avoid this problem, all of the brain's billions of neurons are separated from each other by tiny, insulating gaps called synapses (Figure 3). To cross this gap, an action potential must be converted from an electrical signal to a chemical signal.
  • In milliseconds, neurotransmitter molecules drift across the synapse and dock into specially designed receiving molecules on the "downstream" neuron. This docking is a matter of molecular geometry: the bumps and knobs of a neurotransmitter fit into corresponding dimples and holes on the surface of a receiving molecule called a receptor. Receptors come in dozens of varieties, each specially designed to accommodate one of the dozens of neurotransmitters used by the brain.\
  • The end result of neurotransmitters crossing a synapse is usually the flow of ions into (or out of) the receiving neuron. If the ion channel lets positive ions into the receiving neuron, the neuron is pushed toward firing. But if the receptor lets in negative ions, the downstream neuron is made more resistant to firing. Anything that interferes with these receptors influences the messages being sent from neuron to neuron in the brain. Now it's time for a drink (figuratively speaking, of course).
  • One of the major neurotransmitters used to send "fire" messages from one neuron to another is a molecule called glutamate. When glutamate is released into a synapse, it docks at a receptor that lets positive ions rush in. Since this makes it more likely that the receiving cell will fire, glutamate is called an excitatory neurotransmitter. When you take a drink, alcohol molecules that escape destruction in the liver are quickly pumped up to the brain, where they infiltrate synapses everywhere. There they can bind to glutamate receptors.
  • but it somehow warps the structure of the receptor just enough to interfere with its ability to open normally, thus muting glutamate's normal "fire" message. Alcohol's inhibition of glutamate receptors can be profound. After consumption of the equivalent of about two drinks in the space of an hour, glutamate receptor function can be reduced by more than 80 percent
  • By inhibiting the brain's most common excitatory neurotransmitter, alcohol effectively slows down activity in many parts of the brain. If the neurons in those areas control muscles, the inhibition can lead to relaxation and discoordination. If the neurons control speech, words slur and become increasingly imprecise.
  • he current theory of memory suggests that you remember something when a specific constellation of neurons is stimulated vigorously. Whether it's a whiff of cinnamon or a catchy song, an incoming stimulus instantly lights up a particular constellation of neurons. If conditions are right, the connections between the neurons in the constellation are automatically strengthened in the process. If this pattern of neurons is stimulated in exactly the same way again, the network "lights up" more easily than it did previously.
  • Disrupting NMDA receptors has serious consequences. Rats, rabbits, and other animals injected with chemicals that block NMDA-receptor channels can't learn new tasks, such as negotiating their way through a maze, and they are incapable of forming new memories. Their abilities return when the effects of the chemicals wear off. This research shows that alcohol—even at very low doses— disrupts the cellular machinery most widely believed to underlie our ability to form new memories.
  • Anxiety is an unpleasant emotional state that differs from related states such as fear, aggression, and confusion. Not only does anxiety feel different, but at a purely neurological level, it's different. Evidence for this comes from experience with a family of drugs called ben/odiaxepines, of which Valium is the most well known. At low to moderate doses, these drugs significantly reduce anxiety without impairing or disrupting other brain systems.
  • Valium works by enhancing the function of a receptor that plays yin to glutamate's yang in the brain. Instead of passing on a message to "fire," this receptor makes it harder for a neuron to fire. The receptor in question is triggered by a neurotransmitter known as gamma-aminobutyric acid, or GABA. When GABA docks at its receptor, the associated channel opens and lets negative ions rush in, which pushes the cell even farther from its trigger point for firing. Although such inhibition might seem counterproductive, it is actually crucial. Normal brain function depends on both excitatory and inhibitory neurotransmitters . The situation is analogous to the operation of an automobile, which requires both an accelerator and a brake. Glutarnate is one of the brain's accelerators, and GABA is one of its brakes
  • We've already seen that by interfering with glutamate channels, alcohol interferes with the accelerator, making it harder to gain speed. Now we'll see that another way alcohol slows the brain is by increasing the sensitivity of the brakes. This, in fact, is how Valium and other benzodiazepines work. These compounds bind to GABA receptors, which alters their shape and makes them three times more sensitive to GABA molecules (Ashton 1992). Valium, in other words, makes the brain's natural "brake" three times stronger.
  • Cocaine, Heroin, Amphetamine, Nicotine, and a great many other drugs give humans a lever for accessing their pleasure centers.
  • Alcohol modestly increases dopamine levels in the reward circuits of the brain, making it a weak cousin of cocaine and amphetamine (Di Chiara and Imperato 1988). This release of dopamine is thought to underlie the initially stimulating, energizing feelings often experienced by drinkers. The "high" one gets from alcohol is, of course, quite different from that achieved by cocaine and amphetamine. These drugs are much more potent and arc practically surgical in their effects. They /ero in on dopamine while leaving other neurotransmitters untouched. The stimulation produced by alcohol, in contrast, is modest to begin with and must compete with the simultaneous depressant effects caused by the inhibition of glutamate channels and the enhancement of GABA channels. Alcohol's effect on dopamine levels has been found to be most pronounced in the first twenty minutes of exposure
  • The other mediators of pleasure being actively investigated are endorphins, the body's natural painkillers. During times of severe stress or injury, endorphin molecules are released from the pituitary gland and block pain messages arriving from various parts of the body. Secondary to this important task, endorphins also trigger the release of dopamine in the brain's mesolimbic reward center, which, as we've seen, directly elicits pleasurable feelings. Endorphin release is thus doubly rewarding: it dampens pain and produces, via dopamine, a mild "high."
  • If this were alcohol's only effect, drinking it would produce a subtle "high" similar to that felt by marathon runners and other athletes who come by their endorphins naturally. As it is, drinkers experience an endorphin boost simply as one of many elements in a very potent mix—yet another dimension in the subjective experience of intoxication. Alcohol thus resembles opium and its derivatives morphine and heroin, all of which target the endorphin system
  • Opiate molecules fit snugly into the molecular receptors designed for endorphins. They are, essentially, fake endorphins. Opiate users thus can give themselves an "endorphin rush" far more intense than anything possible with only their own natural supply of these pleasure compounds. But ethanol molecules don't look anything like endorphin molecules. They aren't fake endorphins at all. All alcohol can do is tap into one's existing store of endorphins. Since no new endorphins or endorphin look-al ikes are added to the system, the opiate-like high achievable with alcohol is limited. As with dopamine, the precise mechanisms behind alcohol-induced endorphin release aren't yet known.
  • One important research subject is the neurotransmitter serotonin, the target of the widely used antidepressant drug Prozac. By boosting serotonin levels, Prozac can alleviate depression, enhance motivation, and increase self-confidence. Preliminary studies suggest that alcohol also acts on the serotonin system. It has been found, for instance, that moderately high doses of alcohol increase the electrical current associated with one type of serotonin receptor by almost 60 percent
  • alcohol almost always exacerbates the feelings of hopelessness and inertia associated with clinical depression. For another, it generally takes four to six weeks for Prozac's positive effects to "kick in," whereas alcohol's effects are felt very rapidly
  • And finally, drinking modest amounts of wine or other types of alcohol is hardly the only way to reduce the risk of heart disease. Other methods, such as losing weight, quitting smoking, and exercising, offer even greater benefits and have fewer associated risks. The moral of the French paradox is that if you don't drink, don't start just to help your heart—it's not worth it. If you drink moderately, current research suggests that you needn't worry that you're hurting your heart—in fact, you're probably helping it. And if you drink more than two or three drinks a day, you should probably cut back,
  • But alcohol actually makes a rather poor sleeping pill. It may, indeed, nudge you into dreamland, but you don't necessarily stay there and you have a very good chance of waking in the morning feeling decidedly un-rested.
  • As we've seen, alcohol is both a depressant and a stimulant. Among other things, it boosts dopamine and Endorphin levels, both of which can elicit stimulating or mildly euphoric sensations. These effects are particularly pronounced at relatively low doses—just the kind of doses typical of a "nightcap." Thus a single shot of whiskey or a small glass of wine taken just before bedtime may have an effect that is exactly the reverse of the one being sought by the drinker.
  • Caffeine is broken down by the liver much more slowly than alcohol. It takes about five hours for the liver to metabolize half of a given dose of caffeine
  • When the art of distillation was discovered in the Middle Ages, the potent extract that resulted was deemed both a good medicine in itself and an ideal base for the creation of other remedies by the addition of herbs and other ingredients. In fact, the original name for alcohol was aqua vitae, Latin for "water of life." It was regarded as a life-giving, life-affirming liquid.
  • The penis and clitoris would respond to this inhibition in very similar ways because, anatomically speaking, they are nearly identical except for size.
  • Sexual arousal is thus fundamentally dependent on relaxation, not tension.
  • It might seem natural to assume that since alcohol is a muscle relaxant, it would facilitate sexual arousal by relaxing those all-important penile and clitoral arteries. But note that the arteries just mentioned relax in response to the firing of nerves, not the inhibition of firing
  • Despite scientific evidence that at a purely physical level alcohol retards sexual response, many people report that moderate amounts of alcohol are good for sex
  • The answer to this apparent paradox lies in the old joke about the brain being the body's most important sex organ
  • he pounding headache common to hangovers has two possible sources. First of all, as Shakespeare's Porter again pointed out, alcohol is a diuretic—that is, it promotes urination
  • f the microscopic tubes that carry urine out of the kidney. Normally, most of the water in urine is recycled through the porous walls of the collecting tubes. But when ADH release is blocked by alcohol, the tubes become less porous The second way alcohol can induce a headache is by relaxing and enlarging the same vessels in the head—an action that compounds the low-blood pressure problem created by dehydration.
  • The second way alcohol can induce a headache is by relaxing and enlarging the same vessels in the head—an action that compounds the low-blood pressure problem created by dehydration.
  • Taking an aspirin or two may help also, though only by masking the pain
  • Drinking a caffeine-containing beverage in the morning may help also because caffeine constricts cerebral blood vessels
  • Drinking alcohol can do roughly the same thing, though by a different route. The enzymatic destruction of alcohol in the liver requires many important "helper" molecules. Buf these helper molecules are normally used to process many other toxins, including lactic acid machinery drop what they're doing and go to work on the alcohol.
  • There is little one can do—other than wait—to correct such imbalances. Mild exercise may help a little by increasing blood circulation and thus flushing lactic acid from the muscles.
  • Hypersensitivity to light or sound may be due to the "rebound" effect discussed earlier in this chapter. A heavy bout of drinking will produce temporary withdrawal symptoms as the brain and body strive to rebalance themselves. Since withdrawal generally produces symptoms that are the antithesis of the original effects of a particular drug, the rebound from alcohol often brings with it increased excitability, depressed mood, and sensitivity to stimuli.
  • The phrase comes from an old British saying: "A hair of the dog that bit you"
  • Alcoholism tends to run in families.
  • Evidence to support this model of alcoholism has been accumulating for decades. The discovery of those alcohol preferring mice.

Caffeine

  • Caffeine, in contrast, quite literally grows on trees. And bushes. And some kinds of cactus. And some species of lily and holly and camellia. In fact, at last count, more than a hundred plant species produce caffeine molecules in their seeds,
  • Two other popular plantproduced molecules—nicotine and morphine are same size and complexity as caffeine, but both arc produced in only a single plant species: tobacco (Nicotiana tabacum) and opium poppies.
  • Coffea arabica and Coffea robusta. Arabica beans arc harder to grow, produce more flavorful coffee, and contain about half the caffeine of robusta beans.
  • Coffee is a close second, and because a typical cup of coffee contains about twice as much caffeine as a cup of tea, coffee is actually the single largest source of caffeine worldwide
  • In fact, the word "cola" comes from "kola," the name of the African tree that produces the caffeine containing seeds from which a flavor extract is made. This kola extract was one of the ingredients in the original recipe for Coca-Cola, invented by Georgia pharmacist John Pemberton in 1886. Pemberton's brew also contained cocaine, derived from the coca plant of South America, which is where the "coca" in Coca-Cola" comes from. After the addictive potential of cocaine was recognized around the turn of the century, the drug was eliminated from the recipe and replaced with caffeine. Today, both Coke and Pepsi contain about 45 milligrams of caffeine per 12-ounce can—roughly the same as a cup of tea or half a cup of coffee.
  • Almost all the caffeine in these drinks is purchased by soda manufacturers from the makers of decaffeinated coffees and teas, for which caffeine is a valuable by-product indeed.
  • The alkaloid family referred to by Bentley is a large and generally poisonous group of nitrogen-containing compounds that includes strychnine, nicotine, morphine, mescaline, and emetine; the last of these is the deadly ingredient in poison hemlock, the herb used by the ancient Athenians to execute the philosopher Socrates.
  • Similar kinds of chemical self-defense systems have been discovered in many other plants, so the role of caffeine as a kind of natural nerve poison makes a good deal of sense.
  • The most commonly used unit is the 100 milligrams of caffeine found in an average (8-ounce) cup of regular coffee Just as a shot of whiskey, a glass of wine, and a can of beer contain about a half-ounce of alcohol, an average cup of coffee, two cups of black tea, and two 12-ounce cans of caffeinated soda contain roughly 100 milligrams of caffeine. The standard dose of alcohol is thus roughly 142 times larger than the standard dose of caffeine.
  • An example of a truly potent drug is lysergic acid dicthylamide, or LSD. A typical "hit" of LSD is a mere tenth of a milligram. Picture cutting a single grain of salt into ten pieces and using just one of those pieces. That's how little LSD it takes to produce a neurological impact far more dramatic than that caused by a cup of coffee.
  • Caffeine opens up bronchial passages also—though less dramatically than theophylline
  • Roosevelt turned to the people around him and declared the coffee "good to the last drop," thus giving Clark and his brand of coffee—Maxwell House®— a slogan that lives to this day.
  • Caffeine's other cousin, the relatively weak theobromine, is consumed by countless millions every clay. Most people know that chocolate contains a small amount of caffeine—roughly 20 milligrams in a 1-ounce portion. That's not much—only one-fifth the amount in an average cup of coffee. But most people don't realize that chocolate also contains theobromine. In fact, theobromine is seven times more abundant than caffeine in chocolate—about 130 milligrams in a 1-ounce piece. This abundance neatly compensates for theobromine's lack of raw pharmacological punch. Basically, when theobromine's influence is added to caffeine's, a 1-ounce piece of chocolate can be said to have the stimulating power of roughly 40 milligrams of caffeine, about the same as that found in a cup of tea (Gilbert 1992).
  • the "buzz" you get from a cup of coffee lias as much to do with the breakdown products of caffeine as with the caffeine itself.
  • he half-life of caffeine averages between five and six hours, which is far slower than the rate at which we eliminate alcohol.
  • Women taking oral contraceptives require about twice the normal time to eliminate caffeine (Yesair 1984). For such women, the stimulation from a single cup of coffee might last all day. A similar, though less dramatic increase in caffeine's half-life has been reported for women during the luteal phase of the menstrual cycle—the time between ovulation and the beginning of menstruation. In one study, caffeine elimination took about 25 percent longer during this time.
  • And in infants, the half-life of caffeine is radically extended because their livers have not yet developed the enzymes needed to break down caffeine.
  • By a still imperfectly understood mechanism, cigarette smoking "revs up" the liver's caffeine-destroying enzymatic machinery (Benowitz et al. 1989). As a result, the half-life of caffeine among smokers is reduced to an average of three hours (Parsons and Neims 1978). This double-speed elimination of caffeine may explain the long-standing observation that smokers drink more coffee than nonsmokers. Smokers may simply be adjusting their caffeine intake to maintain the same degree of stimulation achieved by nonsmokers.
  • Brain-wave patterns change dramatically throughout the night as we pass through four major phases of sleep; several distinct brain structures cooperate to induce and maintain sleep; and not one, but several substances have been put forth as candidates for the sleep-inducing chemical sought by the French researchers at the turn of the century. Recent study of one of these substances, called adenosine, has revealed much about how caffeine works. The harder a cell works, the more adenosine is created.
  • The adenosine produced by working cells is used as a signaling molecule in an elegant, self-regulating control system. How this control system works to regulate sleep and wakefulness was described by Robert Greene and his colleagues at the Harvard Medical School When adenosine latches onto one particular kind of adenosine receptor, a chemical chain reaction is triggered inside the cell that almost immediately opens ion channels in the membrane. The opening of these channels either directly inhibits a neuron from firing or reduces the amount of neurotransmitter released into the synapse
  • As we use our brains while we are awake, adenosine builds up in these areas and a "brake" is applied with ever-increasing force, gradually quieting activity all over the brain. We become drowsy and feel a keen urge to sleep. Once asleep, the adenosine outside the cells is reabsorbed and recycled for use in energy production the next day.
  • Adenosine resembles another of the brain's potent "brakes": GABA, which, as we saw earlier, is one of the neurochemical substances used by the brain to offset and balance equally powerful "accelerator" neurotransmitters such as glutamate.
  • This tighter fit enables caffeine to plug the receptor, thus preventing adenosine from binding.
  • I have enough caffeine in me 1 can just feel my brain going from a barely conscious level to this high pitch, as though I've taken a drug. I'm suddenly enormously awake and very manic, as you can sec. Ideas tumble out—almost all to be discarded by noon, unfortunately. But if I can focus on something where I really know the facts, where I really understand the problem, that's when something might happen.
  • Another line of research is also encouraging. Work from several laboratories has suggested that emotional arousal plays a critical role in memory. Basically, our strongest memories are of things that arc emotionally provoking, in either pleasant or unpleasant ways. When adrenaline, the classic "fight-or-flight" hormone, is released during such arousal, it seems to "prime" the brain to remember things in unusual clarity.It is at least theoretically possible that by stimulating emotional arousal and, specifically, by increasing levels of adrenaline, caffeine may prime the brain the same way that provocative experiences do.
  • In one study, a 250-milligram close of caffeine raised adrenaline levels 207 percent and noradrenaline levels 75 percent.
  • In general, the studies have shown that caffeine improves mental ability on tasks requiring "speed," but degrades or has no effect on it with tasks requiring "power." For instance, caffeine is helpful in relatively passive, automatic, "data-driven" tasks such as auditory reaction time, visual-choice reaction time, and performing simple arithmetic. It also improves the ability to attend to something in a focused, sustained way. But in studies of more complicated tasks such as logical reasoning, numerical reasoning, reading comprehension, and complicated arithmetic—all of which require greater "central processing power"—caffeine either has had no detectable effect or has actually degraded performance.
  • It causes the heart to beat more rapidly, it constricts some blood vessels, and it causes certain types of muscles to contract more easily. But, paradoxically, caffeine can also cause a relaxation response. It can, for instance, relax the airways of the lungs and cause certain types of blood vessels to open.
  • Gerasch was found to have 16 micrograms of caffeine per milliliter of blood—a level considerably higher than the official limit of 12 micrograms per milliliter.
  • Some athletes find it helpful, while others find that they suffer from an acid stomach, increased nervousness, or dehydration and thus avoid it.
  • The Olympic legal limit of 12 micrograms per milliliter (which has been widely adopted for other sporting events) is equivalent to about six cups of coffee consumed within thirty minutes.
  • (The companies selling the pills promptly replaced caffeine with another stimulant: phenylpropanolamine, one of the mildest members of the large amphetamine family.)
  • We just saw one effect that might seem to justify the dieter's belief in caffeine: its ability to release fat and break it down into useful fatty acids. This is potentially significant for athletes because they are exercising so hard that their muscles readily burn the liberated fatty acids. But for more sedentary types, the fatty acids released by a cup or two of coffee are likely to simply be reconverted to fat once caffeine levels drop. Caffeine, in other words, isn't a "fat burner," but a "fat releaser.".
  • Caffeine by itself simply sets the stage—and even then the effect is relatively small and of use primarily to athletes for whom even a 2 percent increase in energy availability might prove to be the winning margin.
  • Caffeine's diuretic effect is usually mild and harmless. But for athletes and others who are likely to perspire heavily, excessive consumption of caffeine could lead to dehydration.
  • Headaches afflict millions of people every day. The vast majority—about 90 percent—are caused by excessive tension in the head and neck muscles. But about 8 percent are vascular headaches, caused by the excessive dilation of blood vessels in the brain. Migraines are a particularly intense kind of vascular headache. Hangover headaches are another type.
  • The diameter of cerebral blood vessels is regulated by smooth muscles, which, in turn, are controlled by adenosine. When adenosine levels rise, blood vessels relax and open up. Blocking adenosine receptors with caffeine negates this effect, causing vessels to constrict, this vasoconstriction is relatively minor and usually goes unnoticed, but for people suffering from vascular headaches the reduction of cerebral blood flow is welcomed.
  • But if caffeine intake is suddenly stopped, the increased relaxation is no longer counterbalanced by caffeine. The vessels dilate much more.
  • his potential for rebound headaches and the general difficulty of accurately self-administering effective doses of caffeine are the primary reasons that migraine sufferers are advised to abstain from caffeine, even though it may bring temporary relief during an attack.
  • Two separate studies hinting that decaf—but not regular coffee—might increase the risk of heart disease.
  • There are two basic ways to remove caffeine from coffee beans. In the "water process," green coffee beans are soaked in hot water for ten minutes to two hours. In addition to leeching out most of the caffeine, this process removes most of the compounds that give coffee its flavor and body. Make coffee from the beans at this stage, and a truly wretched brew will result. That's why manufacturers take great pains to return as much of those lost flavor compounds as they can. After the soaking, the caffeine-laced water is drawn off and the caffeine is removed, So-called solvent processing is more direct. Here, the green coffee beans are washed with a caffeine solvent (again usually methylene chloride but sometimes ethyl acetate) in tubs or rotating drums. The caffeine is then filtered from the liquid solvent. Because this process is relatively fast and because solvents arc more specific than water in their action, more of the delicate flavor compounds arc usually retained in solvent processed beans.
  • Solvents evaporate at temperatures between 100 and 120 degrees. In comparison, steam is 212 degrees and coffee beans arc roasted at temperatures of 350 to 425 degrees.
  • solvents evaporate at temperatures between 100 and 120 degrees. In comparison, steam is 212 degrees and coffee beans arc roasted at temperatures of 350 to 425 degrees.
  • Some people can drink several cups of coffee after dinner, fall soundly asleep an hour later, and sleep peacefully until morning. Others find that even one cup of coffee early in the day induces a fitful night's sleep. Likewise, the caffeine in a single cup of tea makes susceptible individuals anxious and unpleasantly nervous, while for others caffeine is both a relaxant and a mood-enhancer.
  • Longtime heroin users, for instance, have been observed to require ten thousand times the dose they injected when they began their habit. Their brains adapt to heroin to such an extent that they inject themselves with quantities of this narcotic that could kill a person not tolerant to heroin.
  • One way the brain responds to drug-induced perturbations is to change the number of receptors in the affected neurotransmitter system.
  • The opposite response, called down-regulation is typically seen in reaction to drugs—such as heroin—that directly stimulate neurotransmitter receptors.
  • It appears that chronic caffeine use may cause up-regulation or down-regulation of other neurotransmitter systems as well.
  • Tolerance in humans develops a bit more slowly, probably because humans do not ingest the large amount of caffeine typically administered to test animals. Still, humans generally become tolerant to a given dose of caffeine—whether a single can of soda or ten cups of coffee—in a week to twelve days.
  • This tolerance can be remarkably complete; that is, the brain's ability to compensate for caffeine can be so effective that tolerant users experience very little, if any, true stimulation by their customary dose. This was demonstrated by a particularly rigorous experiment in which thirty-two healthy volunteers participated in a month long study of the subjective effects of caffeine . Evidently, the brains of the caffeine consumers had adapted fully and relatively quickly to caffeine—to the extent that they were "normal," at least compared with those of their non-caffeine-consuming peers.
  • Without the "weight" of caffeine to push against, the brain goes overboard. The result is withdrawal: a constellation of physical and psychological symptoms that in the ease of caffeine can range from imperceptible to intensely unpleasant—though caffeine withdrawal is never lethal the way withdrawal from alcohol or heroin can be.
  • Such postoperative headaches have traditionally been considered an unavoidable side effect of the anesthesia itself. But in 1989, three doctors at Hammersmith Hospital near London questioned this assumption (Galletly ct al. 1989). They decided to test another theory about the origin of the postoperative headache: that it is due to caffeine withdrawal initiated by the standard requirement that patients undergoing elective surgery involving general anesthesia abstain from both food and caffeinated beverages prior to their operation.
  • In general, withdrawal symptoms begin within twelve to twenty-four hours after the last use and peak anywhere from twenty to forty-eight hours after caffeine consumption stops (Hughes 1992). Withdrawal symptoms then typically taper off, but it usually takes a full week for a return to normal.These timings are significant. Most regular consumers of caffeine are in the first stages of caffeine withdrawal when they wake up in the morning (assuming they didn't drink coffee just before going to bed the previous night). For this reason, caffeine users, in general, are likely to feel more tired, irritable, and groggy in the morning than people who abstain from caffeine. Also, if morning caffeine intake is skipped, a headache is likely later in the morning or early that afternoon. Drinking caffeine, of course, quickly alleviates these withdrawal symptoms, just as the classic "hair-of-the-dog" nip of alcohol "cures" a hangover.
  • The average daily consumption of caffeine of these participants was 357 milligrams, which is somewhat but not strikingly higher than the 280-milligram average consumed in the United States.
  • In each of these cases the disagreeable symptoms disappeared when the patients stopped taking caffeine or other stimulants (Caffeine 1990). For these people, in other words, caffeine was acting as a depressant, not a stimulant: instead of energy, motivation, and heightened mood, they experienced lethargy, sleepiness, and depression. There are several possible explanations for this paradoxical effect of caffeine, according to Ouentin Regestein, the director of the Sleep Clinic .of Brigham and Women's Hospital in Boston, where these patients were treated. For instance, the heavy caffeine use by these people might have interfered with their sleep at night to such an extent that they were simply exhausted during the day—so much so that more caffeine could not overcome their torpor. or simply hypersensitive to the depressant effects of very high doses of caffeine,
  • The neurological mechanisms behind the effects of stimulants such as caffeine or Ritalin® (a popular drug treatment for ADHD) are not yet known.
  • It is estimated that in general only 10 to 20 percent of alcohol's intoxicating effect can be attributed to increased adenosine levels (Dunwiddic 1995). That means that even if you drank enough caffeine to plug every last adenosine receptor in your brain, you would not be staving off more than one-fifth of alcohol-induced inebriation.
  • When the amount of alcohol circulating in the brain is low and the amount of caffeine is high, the antagonism of alcohol by caffeine can be significant. In one study, 200 to 400 milligrams of caffeine reversed poor performance on some measures of driving ability in subjects with blood alcohol levels of .04 percent to .06 percent.
  • The neocortex—the most recent addition to the human brain from an evolutionary point of view—is the seat of language, music, abstraction, reason, foresight, and reflection. It is speculated that humans use their neocortex to form their sense of who they are—their self awareness and their self-consciousness. The neocortex "understands" information presented verbally, logically, and sequentially: information such as that presented in books about the nature of alcohol and caffeine, for instance. Other parts of the brain, however, do not work in this way. The limbic system, for example, is believed to support emotions such as empathy, anger, territoriality, aggression, and maternal bonding. And there are brain structures that generate sexual desire, thirst, hunger, pain, pleasure, and other primal sensations. All these structures are the neurological substrates of Whitman's" multitudes.
  • If I were to boil down the contents of this book to a few intensely-flavored drops of advice, I believe I'd end up with something very similar to some bits of wisdom carved more than 2000 years ago into the stone face of the temple of Apollo at Delphi. Two simple phrases were etched so deeply that to this day you can still read them easily: "know thyself," and "nothing to excess."

Adding code snippets to blogg post using SyntaxHighlighter

I had problems posting code snippets, I didn't know how to do it properly so
I just posted the code as image. Which, of cause, is terrible thing to do.

I took the time to do a little research on the subject...

Turns out you can use "SyntaxHighlighter" to nicely post code snippets.

Nicely is the matter of taste... I don't really like the appearance of the snippet that you get from this tool but for now it will do.


Here are the steps I did to get this thing working:

step 1: In your blogger, go to Dashboard -> Design -> Edit Html.
step 2: Under "Edit Template" check the "Expand Widget Templates" check box.
step 3: Find </head> and paste all this mess just before it:

<pre class="brush: csharp">
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css">
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css">
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'" type="'text/javascript'/"> <br /><script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js'" type="'text/javascript'/"> <br /><script language="'javascript'"> <br />SyntaxHighlighter.config.bloggerMode = true;<br />SyntaxHighlighter.config.clipboardSwf = &#39;http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf&#39;;<br />SyntaxHighlighter.all();<br /></script>
</pre>

step 4: Save template.
step 5: Make a test post by coping this code -

<pre class="brush: csharp">
// Comment
public class Testing {
public Testing() {
}
public void Method() {
/* Another Comment
on multiple lines */
int x = 51;}}
</pre>

When published, this code will look like this -
// Comment
public class Testing {
public Testing() {
}
public void Method() {
/* Another Comment
on multiple lines */
int x = 51;}}

So you get the idea, right?

Every time you wish to publish a code snippet just
paste it between <pre...> and </pre> tags.

One last important thing to mention: if you wish to publish snippet that has "<" or ">" in it or some other meta character you will get an error, you have to replace all those characters to publish them properly, here is the list of "bad" meta characters and their replacements -

(1) <
(2) >
(3) &

(1) &lt;
(2) &gt;
(3) &amp;

Check out http://fiftyeightbits-precode-code-window-plugi.software.informer.com/
this tool will do the replacement for you, (it also adds itself to Windows Live Writer, if you using one) this tool requires .NET Framework 3.5, which is easy to install from Microsoft site.

Here image for reference -