How to Save an Unproductive Day in 25 Minutes

How often have you had a work day when, as mid-afternoon races toward late-afternoon, you realize that you haven’t really gotten anything done?

Painfully often, if you’re like many of the professionals we talked to for a recent study on everyday work life through Harvard Business School.

Not only do unproductive days like this detract from the success of your projects, your team and your organization; they can endanger your own well-being.

We discovered that nothing makes people feel happier and more engaged at work than making meaningful progress on something they care about. We call that the progress principle. But this progress principle has a serious downside: Nothing makes people feel worse than being stalled in their work and this negative effect is much stronger.

Most often, the cause of an unproductive day is fragmentation trying to juggle many competing, and usually unexpected, demands on your time. It’s what happens when you’ve worked like crazy all day, and still you have the sense that you haven’t been productive. Sound familiar?

Work-life management experts Tony Schwartz, David Allen, and others have useful techniques for setting up routines to get more done. But how can you save a day where you simply haven’t been able to get to the work that matters most? [Read more...]

Magento – Get Product View Price By JavaScript

1,use prototype overwriting Product.Options.prototype.reloadPrice

Product.Options.prototype.oldReloadPrice = Product.Options.prototype.reloadPrice;
Product.Options.prototype.reloadPrice = function(){
    this.oldReloadPrice();
    var currentPrice = howToGetThePrice();
    doSomethingWithTheCurrentPrice(currentPrice);
};

2,use jQuery get the current price by cleaning the html inside an span

function getCurrentPrice(){
    var ds = optionsPrice.priceFormat.decimalSymbol,
    gs =optionsPrice.priceFormat.groupSymbol,
    pf=optionsPrice.priceFormat.pattern;

    var price = 0;
    jQuery('#product-price-<?php echo $_product->getId() ?>_clone span')
        .html()
        .replace(new RegExp("\\"+gs,'g'),'')
        .replace(new RegExp("\\"+ds,'g'),'.')
        .sub(/([0-9\.\,]+)/,function(matches){
            price = parseFloat(matches[1]);
    });
    return price;
}

3,Update element value with this code,you can update total price with qty.

$('totalPrice').innerHTML = currentPrice * $('qty').value

Magento – Get the Total Price of items currently in the Cart

If you want to get the total price of items in your Magento cart, you can use code like this:

<?php
echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal());
?>

Home Remedies To Reduce Dark Under Eye Circles

Dark circles around the eyes have plagued many individuals for centuries. It appears that most families have at least one or two recipes for natural remedies, handed down from generation to generation, up their sleeve.

Some of these remedies, or at least part of the ingredients, have made it into many of today’s best organic eye creams. These ingredients include, among others, caffeine (from use of tea bags), cucumber, ginseng and gynostemma extracts, as well as aloe vera.

Natural Home Remedies

  • Tea Bags It does sound very much like a cliche, but placing used tea bags onto the closed eyes for up to 10 minutes really does reduce dark circles and swelling. This is mostly due to the antioxidants and the caffeine present in tea. The best types of tea to use are black, green and white tea. Apart from chamomile, which has anti-inflammatory properties, herbal teas are not suitable as they do not contain caffeine.
  • Cucumber As well as providing a positively soothing effect through the coldness, thin cucumber slices placed onto the eyes for around 10 minutes also act as a natural lightening agent.
  • Lemon Juice Lemon juice is another natural lightener, as well as providing vital vitamin C and astringent properties. Combined into a paste with tomato juice, gram and turmeric powder and applied to they affected area (taking great care not to get it into the eyes!) for 10 minutes, it will work to lighten the area, cool it and draw out excess fluids.

Combining lemon juice with cucumber juice and either using it in a cold compress or adding lanolin cream and applying the resultin paste will equally cool and lighten the area. [Read more...]

How Facebook tracks its users behaviors

Facebook Tracking Details Released

Facebook’s tracking begins when you visit Facebook for the first time. If you register for an account, you get two cookies: a browser and a session cookie, the first of which allows Facebook to show an alternative message the next time you arrive and the second of which declares which account you’re using. If you don’t register for an account, you’ll only get the browser cookie.

Facebook-cookies

The information on how data is tracked was compiled by USA Today, with sources including Facebook representatives Arturo Bejar (Facebook’s engineering director), Gregg Stefancik (Facebook’s engineering manager), Andrew Noyes (Facebook spokesman), and Barry Schnitt (Facebook corporate spokesman).

This alone is hardly worrisome; basic session cookies are very common. However, every page that has a Facebook plugin, including a Facebook “like” button, will then manipulate your cookies. Since the cookie stores information on every page that you visit that has a Facebook plugin, and a huge number of pages have such plugins, Facebook is able to keep an accurate log of which sites you’ve visited. This information is stored by Facebook for 90 days. [Read more...]

Simple Page Peel Effect with jQuery & CSS

You have probably seen these forms of advertisings where you can peel a corner of a website and see a message underneath. It seems most are flash driven, but I decided to try it out using some simple lines of jQuery.

1. HTML – Page Peel Wireframe

The “pageflip” div will act as the container, mainly used to establish the relative positioning. Then nest the image and the span class of “msg_block” wrapped in an <a> tag.

Note – If you don’t have any conflicting absolute/relative positioning properties, you technically don’t need the “pageflip” container at all.

<div id="pageflip">
	<a href="#">
		<img src="page_flip.png" alt="" />
		<span class="msg_block">Subscribe via RSS</span>
	</a>
</div>

2. CSS – Page Peel Styles

Set the image property to a smaller size (50px by 50px) by default and set the absolute positioning to be in the top right corner. The image will be used similar to the “masking” technique in Photoshop or Flash, where it will be placed on top of the hidden message, so only a portion of the message will be shown. Check out the image below for a visual:

The actual message behind the “peeling” effect, is all within the “msg_block” class. By default, it will start at 50px by 50px, positioned on the top right corner of the page. The text-indent will shoot the text off of the page for anyone with CSS enabled.

#pageflip {
	position: relative;
}
#pageflip img {
	width: 50px; height: 52px;
	z-index: 99;
	position: absolute;
	right: 0; top: 0;
	-ms-interpolation-mode: bicubic;
}
#pageflip .msg_block {
	width: 50px; height: 50px;
	position: absolute;
	z-index: 50;
	right: 0; top: 0;
	background: url(subscribe.png) no-repeat right top;
	text-indent: -9999px;
}

Note that the “msg_block” height is off by 2px compared to the image property – this is taking in consideration of the drop shadow that the image has.

3. jQuery – Animating Page Peel

All we are doing here is expanding the image and msg_block on hover, then retracting to its default size on hover out.

$("#pageflip").hover(function() { //On hover...
	$("#pageflip img , .msg_block").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: '307px',
			height: '319px'
		}, 500);
	} , function() {
	$("#pageflip img").stop() //On hover out, go back to original size 50x52
		.animate({
			width: '50px',
			height: '52px'
		}, 220);
	$(".msg_block").stop() //On hover out, go back to original size 50x50
		.animate({
			width: '50px',
			height: '50px'
		}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
});

Using Facial Exercises to Reduce Dark Circles

Dark circles below the eye can often be prevented or reduced by regularly performing some facial exercises specifically designed for this purpose by beauty experts or you can prevent dark circles by healthy diet.

  • Exercise One This simple exercise consists of closing the eyes tightly for five seconds, opening them again for five seconds, closing them again, etc, for seven or eight times in total.
  • Exercise Two Sitting comfortably, the hands are rubbed together until they begin to feel warm. The closed eyes are then covered lightly with cupped palms, avoiding pressure on the eyeballs. The palms should be placed so the nose is not covered, and they eyes are behind the palms, allowing no light to enter through gaps between the fingers or the nose and the side of the palms.

It may be possible to just see traces of lingering colour. It is now necessary to imagine and focus on total blackness, while taking deep, slow and even breaths and thinking of a happy incident or distant scene.  Once nothing but blackness is seen, the palms are removed. After re-adjusting to the light, the steps are repeated. This exercise should be continued for between three and five minutes. [Read more...]

Using Acupressure to Reduce Dark Circles

Acupressure, a healing art using pressure applied to certain points located all over the body with the fingers, can also be applied to assist in beauty and anti-aging treatments.

Dark circles, as well as bags, below the eyes can be effectively treated and reduced by applying a sequence of self-acupressure exercises. Application of gentle pressure to the correct spots situated both above and below the eyes balances and strengthens vital energy flows within this area, improves circulation and assists in the drainage of secretions, toxins, dust, lymph, etc.

Finding the Pressure Points

The first step ist to find the location of the relevant pressure points, marked by indentations in the bone. This is easily done by following the contour of each eye socket with the finger.

  • Top of Eye As the finger moves along the bone above each eye, three indentations can be felt. One is located close to the outside corner of each eye, a second is directly above the centre of the iris, while the third indentation is near the inner eye corner.
  • Bottom of Eye Feeling along the edge of the lower half of each eye socket, it will become clear that the indentations here are directly opposite those on the top.

How to apply Acupressure

Gentle pressure is applied to each relevant point using the pad of either the thumb or the index finger. Using the fingertps should be avoided, as they tend to be too harsh and there is a risk of digging in a nail.

To effectively reduce dark circles, the sequence described below should be used morning and evening for the first week, or two weeks if the circles are particularly severe.

Once a visible improvement has been achieved, the frequency of using the sequence can be reduced to once per day as part of a daily maintenance routine.

Dark Circle Removal Acupressure Sequence

  • Step One Locate the indentation situated above the eyes, on the inner corner. Apply even, gentle pressure to this point and count to ten. Release the pressure, then repeat two more times.
  • Step Two Locate the indentation below the iris, the apply pressure to this point. Count to ten again, release, repeat twice more.
  • Step Three Locate the indentation on the outer corner, again below the eye and repeat the steps detailed for the first two points.
  • Step Four Locate the outer corner indentation above the eye and apply pressure as above, but only repeat twice altogether.
  • Step Five Close eyes and gently massage the temples again using the pads of the fingers and counting to ten. Relax, repeat twice.
  • Step Six Keeping the eyes closed, but relaxed, very gently massage the eye lids, using small, circular movements. This assists lymph drainage and relaxes the eyes.

It is likely that vision will be blurred slightly for a few minutes after performing this sequence. This is perfectly alright and will return to normal very quickly. It is, in fact, a sign that the exercise was carried out correctly.

Changing Your Lifestyle to Prevent Dark Circles

The life style an individual leads can have a terrific impact on their skin, in particular the thin, sensitive layer of skin around, but in particular underneath, the eyes.

Regular lack of sleep, a poor diet, stress, smoking, lack of exercise and excessive alcohol can all be to blame for prematurely aging skin and development of dark circles.

To reduce these circles, or even better, prevent them in the first place, certain changes have to be made to one’s life style. These changes not only reduce dark circles, they will promote better health for the whole body.

Changes for the Better

  • Lack of Sleep Consistent lack of sleep deprives the body of the rest it needs to heal and generate itself. Ensuring that adequate, restful periods of sleep are maintained on a daily basis is vital to overall health and skin condition.

Discomfort should be combated by assessing what causes the discomfort. Lack of fresh air or too much heat can often be responsible for poor sleep and can be easily averted by simply keeping a window open during the night.

Inadequate pillows, lumpy mattresses and old beds can cause serious discomfort, aches and pains and seriously disrupt restful sleep. Investing in a new bed seems quite an expense, but a healthier body will compensate easily for this.

  • Stress Public enemy number one, stress, is the cause of many problems, including lack of sleep and dark circles. Stress can rarely be avoided today, but learning to deal with in different ways and making time to relax at regular intervals will help to reduce stress induced problems. A long, warm soak in the bath, surrounded by the light of preferably scented candles and calming music works wonders.
  • Smoking The nicotine inhaled when smoking has a whole range of negative effects on a body, as we all know. One of these effects is the inhibition of collagen production. This promotes premature skin aging and can increase dark circles in no time. Smoky atmospheres also irritate both eyes and skin, making matters worse still. Giving up is easier said than done, but is definitely a potentially life saving decision.
  • Alcohol Regular intake of large amounts of alcohol damages the liver, kidneys and the skin. It does so by dehydrating the body, causing fluid retention and disrupting regular sleeping patterns. What more needs to be said? Reducing intake to a minimum and combating the occasional binge with lots of water are the only answer.
  • Caffeine There is nothing like a cup of coffee to revive the spirit first thing in the morning. Nothing wrong with that. If too much caffeine is introduced into the body during the day, however, it can cause stomach as well as kidney problems, dehydration and fluid retention, as well as making restful impossible. Reducing intake drastically and avoiding coffee altogether from the afternoon onwards will do wonders for the skin and help to reduce dark circles much quicker.
  • Exercise What does exercise have to do with dark circles, one may well ask. The fact is, exercises not only tone muscles and help to keep trim, they also stimulate blood circulation and thereby distribution of oxygen into the far corners, so to speak,  of the body. There is nothing quite like good circulation for the state of one’s skin and dark circles can only be prevented or reduced by keeping the skin young and healthy.
  • Diet Poor diets and bad eating habits starve the body of vital vitamins, elements, etc. Eating too much or too little at the wrong times can actually prevent restful sleep, too. Heavy meals late in the evening are often the cause of poor sleep. [Read more...]

How To Prevent Dark Circles By Healthy Diet

Everybody is fully aware that eating a healthy and well balanced diet is essential for the well being of body and mind in general. Certain nutrients, such as vitamins, element, proteins, fibre, particular oils and fats and a variety of others, are needed to grow, maintain and regenerate and without them, illness may ensue.

What many people are unaware of, however, is the fact that adding or removing particular items from one’s list of daily foods can not only improve skin complexion as a whole, but have some very specific results, like the reduction of dark circles, for instance.

Foods to reduce Dark Circles

Foods particularly suited to reduce dark circles need to be rich in iron and vitamins C, E and K in particular. Some of the best foods to add to a diet are listed here.

  • Vitaminc C Some of the most beneficial foods in the reduction of dark circles through vitamin C are all citrus fruits, such as oranges, grapefruit, and kiwis, for example; all berries, guavas, melons, mangos, tomatoes and papayas, as well as green leafy vegetables, peppers, etc.
  • Vitamin E This vitamin can be found in nuts, most vegetables, whole grains, sunflower and other seeds, as well as in asparagus, avocadoes, apples, carrots, celery, seafoods and beef.
  • Vitamin K Cheese, leafy vegetables, such as spinach, celery and kale, as well as asparagus, liver, bacon and green tea, among others, are particularly rich in vitamin K.
  • Iron This element is found in foods such as spinach, chard, thyme, turmeric and most seeds, as well as in shiitake mushrooms, green beans, cereals, grains, fish and meat.

Essential Nutrients for Healthy Skin

To maintain, and regain, healthy skin, it is important to add foods containing large quantities of vitamin C, vitamin E, vitamin K, as well as B complex and foods delivering elements such as iron, copper, zinc and selenium are essential.

Adding at least a few of them to the daily diet will stimulate the cells of the skin to produce the neccesary components to repair damage such as weakening of capillaries and thinning of the skin, two of the main reasons for dark circles, and maintain a healthy look.

Foods generally beneficial to healthy SkinThere are many foods that are beneficial to healthy skin in general, obviously also assisting in the repair of damages like cold treatment dark circles.

Additional Foods containing essential Vitamins

  • Fruits As well as the already mentioned fruits, peaches, apricots and olives also contain high quantities of these vital vitamins.

Adding cranberries not only adds vitamins, but also assists the function of the urinary system and kidneys in particular, an excellent measure in preventing fluid retention.

  • Vegetables Other vegetables rich in essential vitamins include pumpkins, squash, spring onions and Brussels sprouts, as well as most members of the bean and pea families. Broccoli and carrots will add vitamin A.

Foods containing additional Elements

Iron is not the only element needed for healthy skin. Copper, selenium and zinc are equally important and some of the following foods are particularly rich in these elements.

  • Seafood Various seafood items not only contain vitamin E, but also high concentrations of the vital elements. These foods include oysters, clams, lobster and clams, as well as many other shellfish and molluscs.
  • Meat Most meats, including beef, lamb and pork, as well as chicken, provide proteins as well as being rich in the elements necessary for perfect skin.
  • Legumes Nuts, peas, beans and lentils are all rich in these elements as well as vitamins.
  • Vegetables High amounts of elements selenium, zinc and copper, as well as obviously the above mentioned vitamins, are contained within most mushrooms, chives and leeks; green and red peppers; oriental radishes, sun dried tomatoes and seaweed. Kale, spinach and other dark leafed vegetables are especially rich in zinc and iron.
  • Cocoa This warming, relaxing beverage lends itself as an element-rich alternative to coffee, especially as a bedtime drink.

Omega 3 Oil

Omega 3 oil is another essential in skin care diets. It is not found in a huge variety of foods, but can be obtained from sources such as linseed or canola oil and a variety of fish. The top 11 Omega 3 oil providing fish, in reverse order, are

  • Bluefish
  • Anchovies
  • Canned Sardines
  • Atlantic Sturgeon
  • Freshwater Whitefish
  • Albacore Tuna
  • Salmon
  • Blue Fin Tuna
  • Herring
  • Trout
  • Mackerel
  • Water Everything alive needs water to survive. Drinking sufficient quantities of water each day will keep the body free from toxins by stimulating the kidneys into action and prevent dehydration and fluid retention. This in turn will assist the skin, as dehydration, fluid retention and toxins are some of the skin’s worst enemies.

Additional Thoughts

While adding these types of food to one’s diet will no doubt make a major difference in the long run, some things should be avoided or changed within one’s life style in order for them to really come into effect.

  • Life Style Changes One of the main causes of dark circles is fatigue. Getting plenty of restful sleep is therefore a must. Fresh air and comfortable temperatures in bedrooms, a comfortable bed, raised pillows and sufficient relaxation before bedtime will all promote restful sleep, allowing the skin – and the rest of the body – to regenerate.
  • Exercise Any type of exercise will tone muscles, stimulate circulation and generally benefit the whole body, as well as skin. Walking or running in fresh air is especially beneficial, although care should be taken to protect the skin from harsh sunlight.
  • Sunlight All skin should be protected from too much UV exposure, but the skin around the eyes is particularly sensitive and needs to be taken special care of in order to prevent and/ or reduce dark circles.

Effective sunglasses should be worn on bright days (it should not be possible to see one’s eyes when looking into a mirror with the sunglasses on. If they can be seen, the sunglasses are not strong enough and will not protect the eyes adequately.) and a good, high factor sunscreen fortified with antioxidants, as well as vitamin C, should be applied.

  • Eye Exercises Specifically designed eye exercises and acupressure routines will greatly enhance the benefits of adding the above foods to one’s daily diet. These exercises tone the muscles around the eyes, stimulate circulation within skin tissue and prevent fluid build-up by assisting drainage.

Most of these exercises are performed sitting down and involve rolling or opening and closing the eyes, while others require focusing on various spots close up and at a distance. This makes it possible for them to be performed anywhere, at home, at work, on the bus or wherever.

  • Smoking Even smokers are well aware of the halth risks they are taking every time they light up. Nicotine not only has the obvious disadvantages the world is aware of, it also inhibits the production of collagen, a vital ingredient for youthful skin. Giving up is a major step to improving health and reducing dark circles.
  • Caffeine This stimulant may contain vitamin K and therefore assist skin if consumed in small doses, but large quantities of it counteract this positive effect by disrupting sleep and causing dehydration and fluid retention. If nothing else, it should be avoided late in the day. Replacing it with a cup of cocoa before bedtime will have a far more positive impact.
  • Alcohol Drinking large amounts of alcohol disrupts sleeping patterns, dehydrates and encourages fluid retention. To reduce dark circles, it should be at least reduced, if not avoided altogether. Heavy sessions of drinking should invariably be followed by drinking lots of water, as this will counteract the dehydrating effect and prevent puffy eyes and dark circles the morning after.
  • Salt While a small quantity of salt is necessary to replace slats lost through sweating, intake should be reduced greatly to avoid developing problems within the kidney and heart fuctions, ultimately leading to fluid retention. Salty snacks should therefore be avoided completely before sleep.
  • Home Remedies Many of the home remedies are fairly simple and easy to apply. Many involve placing cold spoons, tea bags or cold compresses simply using iced water onto the affected areas. Tea bags are particularly effective, as the caffeine content of tea serves to reduce excess fluid, while the coolness soothes the area.
  • Skin Care A regular skin care routine involving both the above mentioned exercises, a good, organic eye cream and some of the many available home remedies for dark circle reduction will ensure that the above foods will be able to really make a difference.

Adding some of the above mentioned foods, making the necessary changes by getting sufficient sleep, fresh air and exercise, as well as cutting out harmful substances and looking after one’s skin will ultimately reduce dark circles. It should be noted that for individuals with genetic dispositions, total removal may not be possible.

Keeping this up once the circles are reduced will prevent their re-appearance and keep one’s eyes looking, healthy, bright and youthful for many years to come.