A visitor from a far-off planet observing the way we behave could easily assume that dieting is a very good idea. We do it all the time.
Dieting is so popular that in the past 10 years it's estimated that around 70 per cent of the adult female population and 30 per cent of all adult males have been on one.
It doesn't seem to matter whether it's the Atkins diet or liquid diets, people will try almost anything in their frantic desire to shed a few pounds.
Unfortunately, the results are usually the same. Although diets do produce results in the short term, very few dieters maintain their weight loss, no matter which diet they try.
Worse than this, most dieters end up bigger than they were before they started dieting. So, why don't diets work?
Please refer link below:
Why diets don't work
image ads
Wednesday, January 4, 2012
How to lose weight the healthy way
The healthiest way to lose weight is neither crash diets nor bursts of exercise. The body likes slow changes in terms of food and exercise.
http://www.blogger.com/img/blank.gif
For example, someone who hasn't exercised for years shouldn't rush into running miles a day or pounding the treadmill. Not only will the struggle to do so leave you feeling disheartened and demotivated, you're also far more likely to injure yourself and set your fitness levels back further.
The same goes for people who suddenly start starving themselves. Diets that severely restrict calories or the types of food 'allowed' can lead you to be deficient in the nutrients and vitamins that your body needs.
So, if you need to lose weight, what should you do?
Please refer link below:
How to lose weight the healthy way
http://www.blogger.com/img/blank.gif
For example, someone who hasn't exercised for years shouldn't rush into running miles a day or pounding the treadmill. Not only will the struggle to do so leave you feeling disheartened and demotivated, you're also far more likely to injure yourself and set your fitness levels back further.
The same goes for people who suddenly start starving themselves. Diets that severely restrict calories or the types of food 'allowed' can lead you to be deficient in the nutrients and vitamins that your body needs.
So, if you need to lose weight, what should you do?
Please refer link below:
How to lose weight the healthy way
Friday, December 30, 2011
Tuesday, December 13, 2011
Monday, October 18, 2010
stupid XML in Flash Lite Digital Home
For Flash Lite Digital Home's developers, working with XML really is a nightmares;
If you are not aware of it, it will make your application stop functioning, part of your data will lost;
If you are not aware of it, it will make your device crash and the memory leak issue will appeal without your notice.
Normally developer will think that delete the XML object created or set that XML object to null then the Garbage Collector will auto collect it;
Unfortunately, it work another way round.
As we know, the Garbage Collector in Flash Lite was using reference count method.
This mean if a variable the reference count not equal to zero, the Garbage Collector will not collect it.
For this XML case, somehow a global variable in Adobe XML class, "idMap" hold a reference of the XML object itself. This make the reference count never become zero, so the Garbage Collector will not auto collect it.
This will make the memory leak issue happen in your device at the end!
This will make your application running slow, when you try to exit your application, it will take more long time as usual. Sometime will reach 5minutes!!!
So must remember delete the variable "idMap" before delete the XML object.
Here is some sample code:
1. For global XML variable
import mx.utils.Delegate;
class test{
private var xml:XML = null;
private function loadXML():Void
{
this.xml = new XML();
this.xml.ignoreWhite = true;
this.xml.onLoad = Delegate.create(this, this.XMLonLoad)
this.xml.load(url);
}
private function XMLonLoad(success:Boolean):Void
{
trace(this.xml);
//work with xml data
delete this.xml.idMap;
delete this.xml;
this.xml = null;
}
}
2. Local XML variable
import mx.utils.Delegate;
class test
{
private function loadXML():Void
{
var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = Delegate.create(this, function(success:Boolean):Void
{
trace(this.xml);
//work with xml data
delete xml.idMap;
xml = null;
});
xml.load(url);
}
}
If you are not aware of it, it will make your application stop functioning, part of your data will lost;
If you are not aware of it, it will make your device crash and the memory leak issue will appeal without your notice.
Normally developer will think that delete the XML object created or set that XML object to null then the Garbage Collector will auto collect it;
Unfortunately, it work another way round.
As we know, the Garbage Collector in Flash Lite was using reference count method.
This mean if a variable the reference count not equal to zero, the Garbage Collector will not collect it.
For this XML case, somehow a global variable in Adobe XML class, "idMap" hold a reference of the XML object itself. This make the reference count never become zero, so the Garbage Collector will not auto collect it.
This will make the memory leak issue happen in your device at the end!
This will make your application running slow, when you try to exit your application, it will take more long time as usual. Sometime will reach 5minutes!!!
So must remember delete the variable "idMap" before delete the XML object.
Here is some sample code:
1. For global XML variable
import mx.utils.Delegate;
class test{
private var xml:XML = null;
private function loadXML():Void
{
this.xml = new XML();
this.xml.ignoreWhite = true;
this.xml.onLoad = Delegate.create(this, this.XMLonLoad)
this.xml.load(url);
}
private function XMLonLoad(success:Boolean):Void
{
trace(this.xml);
//work with xml data
delete this.xml.idMap;
delete this.xml;
this.xml = null;
}
}
2. Local XML variable
import mx.utils.Delegate;
class test
{
private function loadXML():Void
{
var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = Delegate.create(this, function(success:Boolean):Void
{
trace(this.xml);
//work with xml data
delete xml.idMap;
xml = null;
});
xml.load(url);
}
}
Sunday, October 17, 2010
不知不觉
Flash Lite Digital Home,
真的对它又爱又恨。。。
它,令我有时不知要笑还是要哭;
它,有太多令人预想不到的限制;
但,不知不觉,
大约一年半以前,
突然要应付它;
到现在,
已经对了它,年半有余。。。
从一无所知,到今天,
也还不能说完完全全掌握它;
但,至少它让我学会了不少东西。
真的对它又爱又恨。。。
它,令我有时不知要笑还是要哭;
它,有太多令人预想不到的限制;
但,不知不觉,
大约一年半以前,
突然要应付它;
到现在,
已经对了它,年半有余。。。
从一无所知,到今天,
也还不能说完完全全掌握它;
但,至少它让我学会了不少东西。
Subscribe to:
Posts (Atom)