reported by a panel html.labelfor参数 for domain 0 node1.

How to Understand and Use the Nutrition Facts Label
U.S. Food and Drug Administration
NOTE: FDA is proposing to update the Nutrition Facts label for packaged foods. For more information, see .&On this page:People look at food labels for different reasons. But whatever the reason, many consumers would like to know how to use this information more effectively and easily. The following label-building skills are intended to make it easier for you to use nutrition labels to make quick, informed food choices that contribute to a healthy diet.The information in the main or top section (see #1-4 and #6 on the sample nutrition label below), can vary wi it contains product-specific information (serving size, calories, and nutrient information). The bottom part (see #5 on the sample label below) contains a footnote with Daily Values (DVs) for 2,000 and 2,500 calorie diets. This footnote provides recommended dietary information for important nutrients, including fats, sodium and fiber. The footnote is found only on larger packages and does not change from product to product.In the following Nutrition Facts label we have colored certain sections to help you focus on those areas that will be explained in detail. You will not see these colors on the food labels on products you purchase.Sample Label for Macaroni and Cheese(#1 on sample label) The first place to start when you look at the Nutrition Facts label is the serving size and the number of servings in the package. Serving sizes are standardized to make it easier to c they are provided in familiar units, such as cups or pieces, followed by the metric amount, e.g., the number of grams.The size of the serving on the food package influences the number of calories and all the nutrient amounts listed on the top part of the label. Pay attention to the serving size, especially how many servings there are in the food package. Then ask yourself, &How many servings am I consuming&? (e.g., 1/2 serving, 1 serving, or more) In the sample label, one serving of macaroni and cheese equals one cup. If you ate the whole package, you would eat two cups. That doubles the calories and other nutrient numbers, including the %Daily Values as shown in the sample label.Example&Single Serving%DV&&&&&Double Serving%DVServing Size1 cup (228g)&2 cups (456g)&Calories250&500&Calories from Fat110&220&Total Fat12g18%24g36%Trans Fat1.5g&3g&Saturated Fat3g15%6g30%Cholesterol30mg10%60mg20%Sodium470mg20%940mg40%Total Carbohydrate31g10%62g20%Dietary Fiber0g0%0g0%Sugars5g&10g&Protein5g&10g&Vitamin A&4%&8%Vitamin C&2%&4%Calcium&20%&40%Iron&4%&8%Calories provide a measure of how much energy you get from a serving of this food. Many Americans consume more calories than they need without meeting recommended intakes for a number of nutrients. The calorie section of the label can help you manage your weight (i.e., gain, lose, or maintain.)Remember: the number of servings you consume determines the number of calories you actually eat (your portion amount).(#2 on sample label)In the example, there are 250 calories in one serving of this macaroni and cheese. How many calories from fat are there in ONE serving? Answer: 110 calories, which means almost half the calories in a single serving come from fat. What if you ate the whole package content? Then, you would consume two servings, or 500 calories, and 220 would come from fat.General Guide to Calories40 Calories is low100 Calories is moderate400 Calories or more is highThe General Guide to Calories provides a general reference for calories when you look at a Nutrition Facts label. This guide is based on a 2,000 calorie diet.Eating too many calories per day is linked to overweight and obesity.Look at the top of the nutrient section in the sample label. It shows you some key nutrients that impact on your health and separates them into two main groups:Limit These Nutrients(#3 on sample label) The nutrients listed first are the ones Americans generally eat in adequate amounts, or even too much. They are identified in yellow as Limit these Nutrients. Eating too much fat, saturated fat, trans fat, cholesterol, or sodium may increase your risk of certain chronic diseases, like heart disease, some cancers, or high blood pressure.Important: Health experts recommend that you keep your intake of saturated fat, trans fat and cholesterol as low as possible as part of a nutritionally balanced diet.Get Enough of These(#4 on sample label)Most Americans don't get enough dietary fiber, vitamin A, vitamin C, calcium, and iron in their diets. They are identified in blue as Get Enough of these Nutrients. Eating enough of these nutrients can improve your health and help reduce the risk of some diseases and conditions. For example, getting enough calcium may reduce the risk of osteoporosis, a condition that results in brittle bones as one ages (see ). Eating a diet high in dietary fiber promotes healthy bowel function. Additionally, a diet rich in fruits, vegetables, and grain products that contain dietary fiber, particularly soluble fiber, and low in saturated fat and cholesterol may reduce the risk of heart disease.Remember: You can use the Nutrition Facts label not only to help limit those nutrients you want to cut back on but also to increase those nutrients you need to consume in greater amounts.(#5 on sample label)Note the * used after the heading &%Daily Value& on the Nutrition Facts label. It refers to the Footnote in the lower part of the nutrition label, which tells you &%DVs are based on a 2,000 calorie diet&. This statement must be on all food labels. But the remaining information in the full footnote may not be on the package if the size of the label is too small. When the full footnote does appear, it will always be the same. It doesn't change from product to product, because it shows recommended dietary advice for all Americans--it is not about a specific food product.Look at the amounts circled in red in the footnote--these are the Daily Values (DV) for each nutrient listed and are based on public health experts' advice. DVs are recommended levels of intakes. DVs in the footnote are based on a 2,000 or 2,500 calorie diet. Note how the DVs for some nutrients change, while others (for cholesterol and sodium) remain the same for both calorie amounts.How the Daily Values Relate to the %DVsLook at the example below for another way to see how the Daily Values (DVs) relate to the %DVs and dietary guidance. For each nutrient listed there is a DV, a %DV, and dietary advice or a goal. If you follow this dietary advice, you will stay within public health experts' recommended upper or lower limits for the nutrients listed, based on a 2,000 calorie daily diet.Examples of DVs versus %DVsBased on a 2,000 Calorie DietNutrientDV%DVGoalTotal Fat65g= 100%DVLess than& & Sat Fat20g= 100%DVLess thanCholesterol300mg= 100%DVLess thanSodium2400mg= 100%DVLess thanTotal Carbohydrate300g= 100%DVAt least& & Dietary Fiber25g= 100%DVAt leastUpper Limit - Eat &Less than&...The nutrients that have &upper daily limits& are listed first on the footnote of larger labels and on the example above. Upper limits means it is recommended that you stay below - eat &less than& - the Daily Value nutrient amounts listed per day. For example, the DV for Saturated fat (in the yellow section) is 20g. This amount is 100% DV for this nutrient. What is the goal or dietary advice? To eat &less than& 20 g or 100%DV for the day.&Lower Limit - Eat &At least&...Now look at the section in blue where dietary fiber is listed. The DV for dietary fiber is 25g, which is 100% DV. This means it is recommended that you eat &at least& this amount of dietary fiber per day.The DV for Total Carbohydrate (section in white) is 300g or 100%DV. This amount is recommended for a balanced daily diet that is based on 2,000 calories, but can vary, depending on your daily intake of fat and protein.Now let's look at the %DVs.The % Daily Values (%DVs) are based on the Daily Value recommendations for key nutrients but only for a 2,000 calorie daily diet--not 2,500 calories. You, like most people, may not know how many calories you consume in a day. But you can still use the %DV as a frame of reference whether or not you consume more or less than 2,000 calories.The %DV helps you determine if a serving of food is high or low in a nutrient. Note: a few nutrients, like trans fat, do not have a %DV--they will be discussed later.Do you need to know how to calculate percentages to use the %DV? No, the label (the %DV) does the math for you. It helps you interpret the numbers (grams and milligrams) by putting them all on the same scale for the day (0-100%DV). The %DV column doesn't add up vertically to 100%. Instead each nutrient is based on 100% of the daily requirements for that nutrient (for a 2,000 calorie diet). This way you can tell high from low and know which nutrients contribute a lot, or a little, to your daily&recommended allowance (upper or lower).Quick Guide to %DV5%DV or less is low and 20%DV or more is high (#6 on sample label)This guide tells you that 5%DV or less is low for all nutrients, those you want to limit (e.g., fat, saturated fat, cholesterol, and sodium), or for those that you want to consume in greater amounts (fiber, calcium, etc). As the Quick Guide shows, 20%DV or more is high for all nutrients.&&Example: Look at the amount of Total Fat in one serving listed on the sample nutrition label. Is 18%DV contributing a lot or a little to your fat limit of 100% DV? Check the Quick Guide to %DV. 18%DV, which is below 20%DV, is not yet high, but what if you ate the whole package (two servings)? You would double that amount, eating 36% of your daily allowance for Total Fat. Coming from just one food, that amount leaves you with 64% of your fat allowance (100%-36%=64%) for all of the other foods you eat that day, snacks and drinks included.1 serving2 servingsUsing the %DVComparisons: The %DV also makes it easy for you to make comparisons. You can compare one product or brand to a similar product. Just make sure the serving sizes are similar, especially the weight (e.g. gram, milligram, ounces) of each product. It's easy to see which foods are higher or lower in nutrients because the serving sizes are generally consistent for similar types of foods, (see the
at the end) except in a few cases like cereals.Nutrient Content Claims: Use the %DV to help you quickly distinguish one claim from another, such as &reduced fat& vs. &light& or &nonfat.& Just compare the %DVs for Total Fat in each food product to see which one is higher or lower in that nutrient--there is no need to memorize definitions. This works when comparing all nutrient content claims, e.g., less, light, low, free, more, high, etc.Dietary Trade-Offs: You can use the %DV to help you make dietary trade-offs with other foods throughout the day. You don't have to give up a favorite food to eat a healthy diet. When a food you like is high in fat, balance it with foods that are low in fat at other times of the day. Also, pay attention to how much you eat so that the total amount of fat for the day stays below 100%DV.Nutrients With a %DV but No Weight Listed - Spotlight on CalciumCalcium:&&Look at the %DV for calcium on food packages so you know how much one serving contributes to the total amount you need per day. Remember, a food with 20%DV or more contributes a lot of calcium to your daily total, while one with 5%DV or less contributes a little.Experts advise adult consumers to consume adequate amounts of calcium, that is, 1,000mg or 100%DV in a daily 2,000 calorie diet. This advice is often given in milligrams (mg), but the Nutrition Facts label only lists a %DV for calcium.For certain populations, they advise that adolescents, especially girls, consume 1,300mg (130%DV) and post-menopausal women consume 1,200mg (120%DV) of calcium daily. The DV for calcium on food labels is 1,000mg.Don't be fooled -- always check the label for calcium because you can't make assumptions about the amount of calcium in specific food categories. Example: the amount of calcium in milk, whether skim or whole, is generally the same per serving, whereas the amount of calcium in the same size yogurt container (8oz) can vary from 20-45 %DV.Equivalencies30% DV = 300mg calcium = one cup of milk100% DV = 1,000mg calcium130% DV = 1,300mg calciumNutrients Without a %DV: Trans Fats, Protein, and Sugars:Note that Trans fat, Sugars and, Protein do not list a %DV on the Nutrition Facts label.Plain YogurtFruit YogurtTrans Fat: Experts could not provide a reference value for trans fat nor any other information that FDA believes is sufficient to establish a Daily Value or %DV. Scientific reports link trans fat (and saturated fat) with raising blood LDL (&bad&) cholesterol levels, both of which increase your risk of coronary heart disease, a leading cause of death in the US.Important: Health experts recommend that you keep your intake of saturated fat, trans fat and cholesterol as low as possible as part of a nutritionally balanced diet.Protein: A %DV is required to be listed if a claim is made for protein, such as &high in protein&. Otherwise, unless the food is meant for use by infants and children under 4 years old, none is needed. Current scientific evidence indicates that protein intake is not a public health concern for adults and children over 4 years of age.Sugars: No daily reference value has been established for sugars because no recommendations have been made for the total amount to eat in a day. Keep in mind, the sugars listed on the Nutrition Facts label include naturally occurring sugars (like those in fruit and milk) as well as those added to a food or drink. Check the ingredient list for specifics on added sugars.Take a look at the Nutrition Facts label for the two yogurt examples. The plain yogurt on the left has 10g of sugars, while the fruit yogurt on the right has 44g of sugars in one serving.Now look below at the ingredient lists for the two yogurts. Ingredients are listed in descending order of weight (from most to least). Note that no added sugars or sweeteners are in the list of ingredients for the plain yogurt, yet 10g of sugars were listed on the Nutrition Facts label. This is because there are no added sugars in plain yogurt, only naturally occurring sugars (lactose in the milk).Plain Yogurt - contains no added sugarsFruit Yogurt - contains added sugarsIf you are concerned about your intake of sugars, make sure that added sugars are not listed as one of the first few ingredients. Other names for added sugars include: corn syrup, high-fructose corn syrup, fruit juice concentrate, maltose, dextrose, sucrose, honey, and maple syrup.To limit nutrients that have no %DV, like trans fat and sugars, compare the labels of similar products and choose the food with the lowest amount.Comparison ExampleBelow are two kinds of milk- one is &Reduced Fat,& the other is &Nonfat& milk. Each serving size is one cup. Which has more calories and more saturated fat? Which one has more calcium?&REDUCED FAT MILK - 2% MilkfatNONFAT MILKAnswer: As you can see, they both have the same amount of calcium, but the nonfat milk has no saturated fat and has 40 calories less per serving than the reduced fat milk.This document was issued in June 2000 and updated July 2003 and November 2004. For more recent information see .&&
Page Last Updated: 04/09/2015
Note: If you need help accessing information in different file formats, see .Node.js v0.12.2 Manual & Documentation
Table of Contents
Stability: 2 - UnstableDomains provide a way to handle multiple different IO operations as a
single group.
If any of the event emitters or callbacks registered to a
domain emit an error event, or throw an error, then the domain object
will be notified, rather than losing the context of the error in the
process.on('uncaughtException') handler, or causing the program to
exit immediately with an error code.
Warning: Don't Ignore Errors!
Domain error handlers are not a substitute for closing down your
process when an error occurs.
By the very nature of how throw works in JavaScript, there is almost
never any way to safely &pick up where you left off&, without leaking
references, or creating some other sort of undefined brittle state.
The safest way to respond to a thrown error is to shut down the
Of course, in a normal web server, you might have many
connections open, and it is not reasonable to abruptly shut those down
because an error was triggered by someone else.
The better approach is send an error response to the request that
triggered the error, while letting the others finish in their normal
time, and stop listening for new requests in that worker.
In this way, domain usage goes hand-in-hand with the cluster module,
since the master process can fork a new worker when a worker
encounters an error.
For node programs that scale to multiple
machines, the terminating proxy or service registry can take note of
the failure, and react accordingly.
For example, this is not a good idea:
// XXX WARNING!
var d = require('domain').create();
d.on('error', function(er) {
// The error won't crash the process, but what it does is worse!
// Though we've prevented abrupt process restarting, we are leaking
// resources like crazy if this ever happens.
// This is no better than process.on('uncaughtException')!
console.log('error, but oh well', er.message);
d.run(function() {
require('http').createServer(function(req, res) {
handleRequest(req, res);
}).listen(PORT);
By using the context of a domain, and the resilience of separating our
program into multiple worker processes, we can react more
appropriately, and handle errors with much greater safety.
// Much better!
var cluster = require('cluster');
var PORT = +process.env.PORT || 1337;
if (cluster.isMaster) {
// In real life, you'd probably use more than just 2 workers,
// and perhaps not put the master and worker in the same file.
// You can also of course get a bit fancier about logging, and
// implement whatever custom logic you need to prevent DoS
// attacks and other bad behavior.
// See the options in the cluster documentation.
// The important thing is that the master does very little,
// increasing our resilience to unexpected errors.
cluster.fork();
cluster.fork();
cluster.on('disconnect', function(worker) {
console.error('disconnect!');
cluster.fork();
// the worker
// This is where we put our bugs!
var domain = require('domain');
// See the cluster documentation for more details about using
// worker processes to serve requests.
How it works, caveats, etc.
var server = require('http').createServer(function(req, res) {
var d = domain.create();
d.on('error', function(er) {
console.error('error', er.stack);
// Note: we're in dangerous territory!
// By definition, something unexpected occurred,
// which we probably didn't want.
// Anything can happen now!
Be very careful!
// make sure we close down within 30 seconds
var killtimer = setTimeout(function() {
process.exit(1);
}, 30000);
// But don't keep the process open just for that!
killtimer.unref();
// stop taking new requests.
server.close();
// Let the master know we're dead.
This will trigger a
// 'disconnect' in the cluster master, and then it will fork
// a new worker.
cluster.worker.disconnect();
// try to send an error to the request that triggered the problem
res.statusCode = 500;
res.setHeader('content-type', 'text/plain');
res.end('Oops, there was a problem!\n');
} catch (er2) {
// oh well, not much we can do at this point.
console.error('Error sending 500!', er2.stack);
// Because req and res were created before this domain existed,
// we need to explicitly add them.
// See the explanation of implicit vs explicit binding below.
d.add(req);
d.add(res);
// Now run the handler function in the domain.
d.run(function() {
handleRequest(req, res);
server.listen(PORT);
// This part isn't important.
Just an example routing thing.
// You'd put your fancy application logic here.
function handleRequest(req, res) {
switch(req.url) {
case '/error':
// We do some async stuff, and then...
setTimeout(function() {
// Whoops!
flerb.bark();
res.end('ok');
Additions to Error objects
Any time an Error object is routed through a domain, a few extra fields
are added to it.
error.domain The domain that first handled the error.
error.domainEmitter The event emitter that emitted an 'error' event
with the error object.
error.domainBound The callback function which was bound to the
domain, and passed an error as its first argument.
error.domainThrown A boolean indicating whether the error was
thrown, emitted, or passed to a bound callback function.
Implicit Binding
If domains are in use, then all new EventEmitter objects (including
Stream objects, requests, responses, etc.) will be implicitly bound to
the active domain at the time of their creation.
Additionally, callbacks passed to lowlevel event loop requests (such as
to fs.open, or other callback-taking methods) will automatically be
bound to the active domain.
If they throw, then the domain will catch
the error.
In order to prevent excessive memory usage, Domain objects themselves
are not implicitly added as children of the active domain.
were, then it would be too easy to prevent request and response objects
from being properly garbage collected.
If you want to nest Domain objects as children of a parent Domain,
then you must explicitly add them.
Implicit binding routes thrown errors and 'error' events to the
Domain's error event, but does not register the EventEmitter on the
Domain, so domain.dispose() will not shut down the EventEmitter.
Implicit binding only takes care of thrown errors and 'error' events.
Explicit Binding
Sometimes, the domain in use is not the one that ought to be used for a
specific event emitter.
Or, the event emitter could have been created
in the context of one domain, but ought to instead be bound to some
other domain.
For example, there could be one domain in use for an HTTP server, but
perhaps we would like to have a separate domain to use for each request.
That is possible via explicit binding.
For example:
// create a top-level domain for the server
var serverDomain = domain.create();
serverDomain.run(function() {
// server is created in the scope of serverDomain
http.createServer(function(req, res) {
// req and res are also created in the scope of serverDomain
// however, we'd prefer to have a separate domain for each request.
// create it first thing, and add req and res to it.
var reqd = domain.create();
reqd.add(req);
reqd.add(res);
reqd.on('error', function(er) {
console.error('Error', er, req.url);
res.writeHead(500);
res.end('Error occurred, sorry.');
} catch (er) {
console.error('Error sending 500', er, req.url);
}).listen(1337);
domain.create()
return: Domain
Returns a new Domain object.
Class: Domain
The Domain class encapsulates the functionality of routing errors and
uncaught exceptions to the active Domain object.
Domain is a child class of .
To handle the errors that it
catches, listen to its error event.
domain.run(fn)
fn Function
Run the supplied function in the context of the domain, implicitly
binding all event emitters, timers, and lowlevel requests that are
created in that context.
This is the most basic way to use a domain.
var d = domain.create();
d.on('error', function(er) {
console.error('Caught error!', er);
d.run(function() {
process.nextTick(function() {
setTimeout(function() { // simulating some various async stuff
fs.open('non-existent file', 'r', function(er, fd) {
// proceed...
In this example, the d.on('error') handler will be triggered, rather
than crashing the program.
domain.members
An array of timers and event emitters that have been explicitly added
to the domain.
domain.add(emitter)
emitter EventEmitter | Timer emitter or timer to be added to the domain
Explicitly adds an emitter to the domain.
If any event handlers called by
the emitter throw an error, or if the emitter emits an error event, it
will be routed to the domain's error event, just like with implicit
This also works with timers that are returned from setInterval and
setTimeout.
If their callback function throws, it will be caught by
the domain 'error' handler.
If the Timer or EventEmitter was already bound to a domain, it is removed
from that one, and bound to this one instead.
domain.remove(emitter)
emitter EventEmitter | Timer emitter or timer to be removed from the domain
The opposite of domain.add(emitter).
Removes domain handling from the
specified emitter.
domain.bind(callback)
callback Function The callback function
return: Function The bound function
The returned function will be a wrapper around the supplied callback
When the returned function is called, any errors that are
thrown will be routed to the domain's error event.
var d = domain.create();
function readSomeFile(filename, cb) {
fs.readFile(filename, 'utf8', d.bind(function(er, data) {
// if this throws, it will also be passed to the domain
return cb(er, data ? JSON.parse(data) : null);
d.on('error', function(er) {
// an error occurred somewhere.
// if we throw it now, it will crash the program
// with the normal line number and stack message.
domain.intercept(callback)
callback Function The callback function
return: Function The intercepted function
This method is almost identical to domain.bind(callback).
However, in
addition to catching thrown errors, it will also intercept Error
objects sent as the first argument to the function.
In this way, the common if (er) return callback(er); pattern can be replaced
with a single error handler in a single place.
var d = domain.create();
function readSomeFile(filename, cb) {
fs.readFile(filename, 'utf8', d.intercept(function(data) {
// note, the first argument is never passed to the
// callback since it is assumed to be the 'Error' argument
// and thus intercepted by the domain.
// if this throws, it will also be passed to the domain
// so the error-handling logic can be moved to the 'error'
// event on the domain instead of being repeated throughout
// the program.
return cb(null, JSON.parse(data));
d.on('error', function(er) {
// an error occurred somewhere.
// if we throw it now, it will crash the program
// with the normal line number and stack message.
domain.enter()
The enter method is plumbing used by the run, bind, and intercept
methods to set the active domain. It sets domain.active and process.domain
to the domain, and implicitly pushes the domain onto the domain stack managed
by the domain module (see domain.exit() for details on the domain stack). The
call to enter delimits the beginning of a chain of asynchronous calls and I/O
operations bound to a domain.
Calling enter changes only the active domain, and does not alter the domain
itself. Enter and exit can be called an arbitrary number of times on a
single domain.
If the domain on which enter is called has been disposed, enter will return
without setting the domain.
domain.exit()
The exit method exits the current domain, popping it off the domain stack.
Any time execution is going to switch to the context of a different chain of
asynchronous calls, it's important to ensure that the current domain is exited.
The call to exit delimits either the end of or an interruption to the chain
of asynchronous calls and I/O operations bound to a domain.
If there are multiple, nested domains bound to the current execution context,
exit will exit any domains nested within this domain.
Calling exit changes only the active domain, and does not alter the domain
itself. Enter and exit can be called an arbitrary number of times on a
single domain.
If the domain on which exit is called has been disposed, exit will return
without exiting the domain.
domain.dispose()
Stability: 0 - Deprecated.
Please recover from failed IO actions
explicitly via error event handlers set on the domain.Once dispose has been called, the domain will no longer be used by callbacks
bound into the domain via run, bind, or intercept, and a dispose event
is emitted.

我要回帖

更多关于 html.labelfor 的文章

 

随机推荐