text:
Population: Current State and Future Prospects
John Bongaarts[1]
Population Council
World population size increased at a slow and uneven pace for centuries before the onset of the Industrial Revolution, and did not reach 1 billion until about 1800. The modern expansion of human numbers started then, but its pace was still modest for the next 150 years with the world total rising to 2.5 billion in 1950. During the second half of the 20th century, however, population growth rates accelerated to historically unprecedented levels, especially in Africa, Asia, and Latin America. As a result, world population size nearly tripled to 7.3 billion by 2015. This ongoing population expansion is expected to continue for several more decades reaching 11.2 billion at the end of this century. The future addition of four billion more people to the planet will have wide-ranging and potentially adverse implications for human welfare and the natural environment.
This study consists of three parts. First, population trends for the world and its main regions will be summarized, including projections of population size, growth, fertility, mortality, urbanization and age distribution. The second part summarizes policy options in aging societies. The third part discusses the role of responsible parenthood in improving human welfare.
I. Population trends
Long-range trends in population size typically show a logistic pattern. For much of human history, population growth was absent or very slow. In the more recent past, waves of countries have gone through socio-economic and demographic transitions. Countries' population growth rates first accelerated, then declined, until population size leveled off at its likely maximum. This process is referred to as the demographic transition which usually takes place over the course of a century or more and is accompanied by a development process that transforms agricultural societies into industrial ones. Before the transition's onset, population growth fluctuated near zero as high birth rates more or less offset the high death rates typical of traditional agrarian societies that preceded the industrial revolution. After the completion of the transition, population growth was again near zero as birth and death rates both reached low levels. During the intervening transition period, population growth was positive as the death rate dropped before the birth rate. Over the course of the transition, population size of countries multiplied many times.
The first demographic transitions began in the early 19th century with declines in death rates in the now economically developed parts of the world (e.g., Europe, North America). Large declines in birth rates followed in the late 19th and early part of the 20th century. The transitions in these countries are now more or less complete.
Figure 1 and Table 1 present estimates of the population size of the world and major regions from 1950 to 2015 and projections made by the UN to 2100. The population of the developed world (Europe, North America, Japan, and Australia/New Zealand), which are referred to as the more developed countries, or MDCs, today stands at 1.25 billion, up from 0.81 billion in 1950. The population of these countries is expected to remain virtually the same size over the remainder of this century as the continued population growth in North America offsets the declines expected in Europe and Japan. The MDCs are a shrinking part of the world population. In 1950 the MDCs represented 32% of the world population; today this proportion stands at 17% and by 2100 it is expected to be just 11%.
The demographic transitions in Africa, Asia, and Latin America (called the less developed countries or LDCs) started later and are still underway, but they are expected to end over the coming decades. Aside from the differences in timing between the more and less developed regions, the transitions in the LDCs have produced more rapid population growth rates in mid-transitions.
In 2015 the population of the LDCs stood at 6.1 billion, representing the large majority of the world population of 7.3 billion. The population of Asia (4.4 billion) is much larger than that of Africa (1.2 billion) or Latin America (0.6 billion). Since 1950, growth in LDCs has been very rapid with population size nearly quadrupling from 1.7 to 6.1 billion. Projections to 2100 see the LDCs adding a further 3.8 billion people (95% of all projected population growth). Populations in Asia, Latin America and North Africa are approaching the end of their transitions and will therefore experience only limited further growth. In contrast, the population of sub-Saharan Africa is expected to quadruple again by 2100 (from 0.96 to 3.93 billion). Fully 3 billion of the 4 billion future growth in the world population will therefore occur in sub-Saharan Africa, which is the region least prepared to meet the needs of their citizens (e.g. health clinics, infrastructure, school facilities) from an immense population increase over such a short period of time.
All population projections contain a degree of uncertainty. The UN has a consistent track record of making accurate projections. However, the further out the projections go into the future, the greater the likelihood that the assumptions underlying the projections will deviate from the eventual reality. The results presented in Table 1 and Figure 1 are for the medium – or most likely – projection variant, which assumes convergence of regional fertility levels to around two births per woman and continuing declines in mortality resulting in a global population of 11.2 billion by 2100. The uncertainty surrounding these median trajectories is summarized by the 95% probability interval around this median. For example, there is a 95% probability that the global population will be between 9.5 and 13.3 billion in 2100.
The rate at which populations around the world are growing varies widely among regions and countries. As shown in Figure 2 in 2015 the highest growth rates were found in Sub-Saharan Africa where rates exceed 3% per year in a number of countries, while the lowest rates are negative in a number of East European and East Asian countries. Growth rates are highest in the least developed countries and near or below zero in the most developed countries. This is as expected because many LDCs have not yet reached the end of their demographic transitions, while most MDCs are post-transitional. A constant population growth rate of 3% per year will result in a doubling of the population size about every 25 years.
By definition a country's growth rate at a given point in time equals the birth rate minus the death rate plus (a usually small) net immigration rate. Birth and death rates are in turn largely determined by levels of fertility and mortality in the population. The projections of population size of the world and its major regions are driven by assumptions made about future trends in fertility and mortality which are discussed next.
For most of human history before the Industrial Revolution, women did not deliberately regulate their fertility. As a result, average fertility was high, typically around six or seven births per woman, and women bore children throughout their reproductive lives. This high fertility was necessary to offset high mortality and to insure population survival.
Declines in fertility first began in the more developed countries in the 19th century as societies experienced rapid economic and social changes such as industrialization, urbanization, changing occupational structure, increased education and improved healthcare. These changes raised the cost of children (e.g. for education) and reduced their economic value (e.g. for labor and old age security), and couples began to self-regulate family size. The declines in mortality that preceded declines in fertility were a precondition for fertility decline because parents needed to be assured that children would survive. The fertility transition in the MDCs was complete by the 1970s when fertility fell to around two births per woman.
The fertility transitions in the LDCs started later as shown in Figure 3 which presents estimates from 1950 to 2015 and projections to 2050 as measured by the total fertility rate (TFR) i.e. the average number of births over a woman's life time assuming current conditions. In the 1950s the TFRs in Asia, Latin America, and across Africa were high and virtually stable at around 6 to 7 births per woman on average. This high level of natural fertility was similar to the levels observed in the pre-transitional MDCs. In the late 1960s, rapid declines in fertility started nearly simultaneously in Asia and Latin America. In contrast, sub-Saharan Africa has experienced only limited reproductive change. As a result of these divergent past trends, fertility levels in 2010-2015 differed widely among regions from a high TFR of near 5 births per woman in Africa, to 2.2 in Asia and Latin America. Average TFRs in Europe and North America reached relatively low levels in the early 1950s and (aside from a brief baby boom in the 1950s and early 1960s) has since declined to 1.9 in North America and to 1.6 in Europe. The decline in TFRs from 6 to just over 2 births per women in Asia and Latin America in the past half century has been very rapid by historical standards.
UN projections for fertility in coming decades assume that TFRs will eventually stabilize at around 2 births per woman in all regions (see Figure 3). The TFRs in Asia and Latin America are now close to this level, but Africa's fertility transition is on a much slower trajectory. High fertility therefore remains the main driver of future population growth in Africa. In contrast, the already low TFRs of Europe and North America is expected to remain slightly below 2 births per woman and this is the main driver of population decline in a number of MDCs.
Mortality and life expectancy
Before the 18th century, mortality crises – epidemics, famines, wars – were frequent, average life expectancy was only about 30 years, and half of newborns failed to survive the first few years of life. One of the most notable achievements of modern industrial societies is the decline in preventable mortality resulting in the large rise in human longevity to about 80 years today.
The mortality transition started in Northern Europe early in the 19th century, and life expectancy rose to around 50 years by 1900. Several factors contributed to this improvement in longevity: public health measures reduced exposure to water- and food-borne diseases, better nutrition improved resistance to disease, and inoculation and vaccination prevented certain infectious diseases. Mortality decline accelerated after 1900 driven by a new set of factors: the institutional acceptance of the germ theory of disease led to measures to reduce exposure and transmission, and the development of antibiotics brought most infectious diseases under control. By the 1950s life expectancy in the most advanced countries had risen to 70 years and all but few percent of infants survived the first years of life. Today, life expectancy is 77 years in Europe and 80 years in North America. Infectious diseases are now rare and deaths are mostly due to chronic diseases among the old – for example, heart disease, cancer, diabetes. Progress is being made in the treatment of these diseases and innovations in medicine, biotechnology, and drug development will likely continue. Nevertheless, it is likely that future improvements in life expectancy will be less rapid than over the past century.
The mortality transition occurred later in the LDCs. Mortality declines were modest during the first half of the 20th century and by the early 1950s life expectancy was only 38 years in Africa and 42 years in Asia (Fig. 4). Latin America fared better with a life expectancy of 51 years. Over the past half century mortality conditions in large parts of the developing world have improved rapidly due to rising incomes, improved nutrition levels, access to medical care, and especially the implementation of public health measures and the availability of antibiotics and other drugs. Today, life expectancy in Latin America (75) and Asia (72) is similar to that of Europe in the 1970s. Africa still lags even though life expectancy has risen to 60 over the past half century. Low incomes, lack of access to adequate health care and the still substantial burden of infectious diseases (including HIV/AIDS) are largely responsible.
Projections for life expectancy to 2100 assume continued improvements in all regions. The MDC trajectory is expected to reach near 90 years. Advances in life expectancy in the LDCs are expected to be more rapid than in the MDCs, thus slowly closing the gap between these regions.
The development of agriculture and the domestication of plants and animals about 12,000 years B.C. led to the growth of urban centers for trading surplus agricultural products, goods and services. Most people, however, continued to live in rural settings and engaged largely in subsistence agriculture for local consumption. The current era of rapid urbanization began with the onset of the Industrial Revolution. Employment opportunities in the expanding manufacturing and service sectors were often located in towns and surplus labor from the rural areas moved to cities in search of jobs and a better life. Urban areas were also attractive because they provided higher incomes, better access to schools, health care, social services and cultural opportunities.
Driven by these multiple forces, urbanization proceeded at a steady pace during the 19th and 20th centuries in the MDCs, but little changed in the rest of the world until the second half of the 20th century. In 1950 the percentage of the world population living in urban areas reached 29%, ranging from over 50% in the MDCs, to just 15% in Africa and Asia. Over the past half century urbanization has proceeded at a record pace with the world average reaching 54% in 2014, and the proportions urban more than doubled in Africa and Asia. These trends are expected to continue in coming decades with the proportion urban reaching 85% in the MDCs. Africa and Asia remain less urban but nevertheless are expected to reach around 60% by 2050. By the end of this century the global rural-to-urban transition should be nearly complete with a large majority of people living in urban areas.
In recent decades the combined effects of overall population growth and rising urbanization produced extremely rapid growth in the size of urban populations of the less developed countries. This expansion has been difficult to absorb in the poorest countries where urban infrastructure has not kept pace with population growth, resulting in continuous traffic jams, lack of public transportation, clean water and sanitation, and overcrowded schools and health facilities. The chronic paucity of housing has led to the explosive growth of slum areas where the poor and marginalized live in extremely difficult conditions with limited access to infrastructure and services.
The rapid expansion of urban areas has conversely contributed to a reduction in the growth of the rural population due to outmigration. In fact, the size of the rural population of the world is projected to remain stable for the next few decades; despite rural women typically having a higher TFR than urban women. This trend will reduce direct population pressures on some rural environments, but not those required to produce food for urban consumption. This trend also implies that a large majority of the 3.8 billion people expected to be added to the less developed world in future decades will end up in cities that are often poorly prepared to absorb this large influx of new inhabitants.
Population aging
Population aging is a relatively new demographic phenomenon because for most of human history populations were young and lives were short. Population aging is in part caused by increases in life expectancy which allows individuals to live to higher ages. But an even more important cause of population aging is a decline in fertility. With fewer births, younger generations are smaller relative to older generations, thus raising the average age of the population. This aging has important socio-economic consequences as discussed below.
The pattern of aging can be examined by dividing the population into three age groups: the young (aged 0-14), the working-ages (15-64), and the old (65+). Figure 5 plots regional estimates of the proportions of the population in each of these age groups from 1950 to 2015 and projections to 2100. Differences between regions in 2015 are related to the stage of the demographic transition and in particular to levels and trends in fertility in recent decades. For example, Africa, which is still in mid-transition, has a much larger proportion under age 15 (41%) than Europe (16%). At the other end of the age spectrum the proportion aged 65+ ranges from 18% in Europe to 3% in Africa. These differences are largely explained by the higher level of fertility in the latter than in the former.
The main trend evident in Figure 5 is that the proportion of the old rises over time and the proportion of the young declines. In all regions except Africa the proportion of 65+ is expected to reach about 30% in 2100. In some countries with low fertility and high life expectancy the proportion 65+ could reach over 35%.
The young and the old tend not to be economically active and are therefore dependent on the working population for income, food, shelter, education, healthcare and social security. As a result, increases in the proportion of the population that is dependent has significant social and economic consequences. A simple indicator – called the age-dependency ratio (ADR) – summarizes this. The ADR in a given year equals the ratio of the dependent population (those aged below 15 years and those aged 65 years and above) to the working-age population (aged 15–64). This ratio aims to measure how many 'dependents' there are for each person in the 'productive' age group. The ratio is rather crude because not every person below 15 or aged 65 and over is a dependent and not every person between ages 15 and 64 is productive, but it has been widely used to summarize trends in the age composition.
Over the course of a demographic transition, the ADR shows a characteristic pattern of change. Figure 6 presents this pattern for different regions from 1950 to 2015 and projections from 2015 to 2100. The figure does not capture the full transition for each region, because Europe and North America were already in their late demographic transition stage before 1950 and Africa is still early. However, the patterns for Asia and Latin America capture the critical central transition period. Early in the transition the ADR typically rises slightly, as improvements in health increase child survival and raise the number of young people. Next, the ADR falls sharply as declines in fertility reduce the proportion of the population under age 15. A few decades later the ADR rises again when the older population rises.
These fluctuations in the ADR over time have important economic consequences. The drop in the ADR in mid-transition (following the onset of the fertility decline) leads to a boost of GDP/capita growth rate. This effect is often referred to as the 'demographic dividend'. Economic growth is stimulated by an increase in the size of the labor force relative to dependents and by increased savings, provided the right conditions are in place (e.g. investments in education and job creation). Asia and Latin America benefited from this decline in the ADR between 1970 and 2015. A study of the East Asian tiger economies concluded that fully a third of the rapid economic growth in these countries was due to their ability to harness the demographic dividend.
Towards the end of the transition the age structure turns economically unfavorable as the proportion of the population aged 65 and over rises. In Europe and North America the dependency ratio started rising around 2010 and is expected to rise substantially further over the next few decades. This trend is also evident in Asia and Latin America after 2025.
These trends in the ADR are sufficiently important in terms of socio-economic development, that governments try to encourage the demographic dividend by lowering the ADR in countries with high fertility and to minimize the effects of population aging in the MDCs as discussed next.
II. Policy options in aging societies
The potential adverse effects of population aging came to the attention of policy makers when TFRs in most MDCs dropped below 2 births per woman in the 1970s and 1980s. This trend was unexpected. The conventional wisdom, that TFRs at the end of the transition would stabilize at just above 2 (which would lead to a stable population size), proved to be wrong. Even a small deviation below this level leads to substantially more population aging. By the 1990s the OECD, World Bank, and IMF prepared influential reports calling for action to counteract the adverse effects from population aging.
The rapid ongoing and projected increase in the elderly population is of concern because it threatens the sustainability of public pension and health care systems. This is especially the case because most of these systems are pay-as-you-go, i.e. current benefits are paid for by contributions from current workers. As noted above, the proportion aged 65+ is projected to reach near one in three in the most rapidly aging societies. This implies fewer than two persons between 15 and 65 for everyone aged 65 and above.
The first response of governments has been to make the pension and health care systems more sustainable. A wide range of measures are available, including reducing benefits, raising taxes or contributions, increasing the age at eligibility, and reducing incentives for early retirement. Most MDCs have now implemented at least some of these adjustments. As a result, sustainability prospects have improved, but the situation remains highly precarious, especially in countries with the lowest fertility e.g. Japan and Italy.
Since population aging is in large part due to low levels of fertility, MDC governments also have strengthened their family policies. These policies were encouraged by the fact that a substantial proportion of women have fewer children than they want. This gap between actual and desired family size is largely the consequence of difficulties women face in combining childbearing with participation in the paid labor force. Family policies therefore implement measures to address this issue including subsidized childcare, reduced taxes for families with children, and paid parental leave.
The effects of such policies on fertility have been relatively modest (up to a few tenths of a birth per woman) but even small increases in fertility lead to substantial reductions in population aging. The scope and generosity of family policies differ widely between countries. The countries with the highest fertility in Europe (France, Netherlands, and Scandinavia) have the most generous family policies.
Another demographic option to offset aging is to allow higher levels of immigration. This option will not be discussed further here.
III. Responsible Parenthood
Responsible parenthood is a central concept in the teachings of the Catholic Church on marriage and the family. In a 1994 letter to the United Nations Saint John Paul II explained that responsible parenthood "...is not a question of unlimited procreation or lack of awareness of what is involved in rearing children, but rather the empowerment of couples to use their inviolable liberty wisely and responsibly, taking into account social and demographic realities as well as their own situation and legitimate desires." The letter further asks that more attention be given to "securing for husband and wife the liberty to decide responsibly, free from all social or legal coercion, the number of children they will have and the spacing of their births". During a recent visit to Asia, Pope Francis said: "responsible parenthood requires that couples regulate the births of their children". The centrality of the couple as the decision-making unit regarding procreation is also noted the Final Report of the Synod of Bishops Relatio Finalis "... family planning fittingly takes place as the result of consensual dialogue between the spouses." These principles regarding the planning of family size and the spacing of births are widely shared in the international development community and, if universally accepted, would lead to many global health and development advances.
Social scientists have undertaken extensive studies of the preferences of couples about their families. A few relevant findings from this research are provided below.
Preferences regarding family size
In recent decades demographic and health surveys have been conducted in a majority of less developed countries. In these surveys large numbers of women are asked a range of questions about childbearing and the health and well-being of their children. One question relates to the desired or ideal family size. Figure 7 gives the average desired family size reported by women in different regions of the less developed world. The desired size ranges from an average of 2.7 in Asia and Latin America to 4.7 in sub-Saharan Africa. These findings are consistent with the stages of the demographic transitions reached by these regions: Asia and Latin America are much further along in their transitions than sub-Saharan Africa. In more developed countries at the end of the transitions, women typically want two children.
Note that these desired family sizes are well short of the six to seven births women have when they do not regulate their fertility. In other words, in most countries women need only part of their reproductive years between ages 15 and 45 to achieve their desired family size. During the remaining years of their reproductive lives women would need to practice family planning to avoid unintended pregnancies.
The implementation of family size preferences
Given these findings on desired family size it is not surprising that large proportions of women in the developing world report not wanting to become pregnant at the present time.
This proportion varies among countries and regions. Generally, it is highest in countries with a low desired family size and vice-versa. Figure 8 provides estimates of the regional average proportions not wanting to become pregnant which range from 83% in Latin America to 78% in Asia and 53% in sub-Saharan Africa.
Women who do not wish to become pregnant desire to regulate their fertility. However, the implementation of this desire is incomplete in all countries and substantial proportions of women wanting to avoid pregnancy report not practicing family planning. These women are considered to have an unmet need for family planning and are at risk of experiencing unplanned pregnancies and related health complications. As shown in Figure 8, unmet need is much higher in sub-Saharan Africa than in Asia and Latin America.
These indicators also differ among socioeconomic groups within countries. Proportions not wanting to become pregnant at this time are lower and unmet need is higher among poor, rural, and uneducated women than among their well-off, urban, and educated counterparts.
The UN estimates that 130 million married women in the developing world have an unmet need for family planning (United Nations 2016) The associated risk of pregnancy results in an estimated 74 million unplanned pregnancies, 36 million abortions and 88000 maternal deaths (Singh et al. 2014). These unplanned pregnancies, abortions and maternal deaths and injuries could be averted if women with an unmet need practice family planning.
Obstacles to family planning and unplanned pregnancies
Why do some women who wish to avoid pregnancy not practice family planning? Research on the causes of unmet need has identified a range of social, health, and economic factors that pose barriers to women and men who desire to regulate their family size. These factors include lack of knowledge, lack of availability of methods, costs, health concerns, objections from family members and concerns about moral and social acceptability. These obstacles lead some women to forgo family planning despite their intention not to become pregnant.
Additional statistics on pregnancy outcomes in the less developed world in 2014 are presented in Table 2. The total annual number of pregnancies in LDCs is estimated at 192 million, of which 74 million are unplanned (i.e. about two out of five). The highest proportions of unplanned pregnancy are among the youngest, poorest and most vulnerable women; directly impacting women's health and the wellbeing of their families.
Half of these unplanned pregnancies result in unplanned births (28 million) or miscarriages (9 million). It is estimated that about a quarter of all births in the less developed world are unplanned.
The remaining half of the unplanned pregnancies end in abortion (36 million) – the majority of which are unsafe. Unsafe abortion leads to around 22 thousand maternal deaths per year and high levels of maternal morbidity.
Assisting couples to be responsible parents
Many governments have developed services to assist women to implement their reproductive preferences. Research shows that these services are welcomed by women and men in countries at all stages of economic development. The best-documented demonstration of the demand for these services was provided by a large trial – the Family Planning and Health Services Project (FPHSP) – started in the late 1970s in Matlab, Bangladesh. At that time Bangladesh was one of the poorest and most highly agricultural countries in the world, and there was widespread skepticism that family planning would be accepted in such a traditional society. The FPHSP divided the Matlab district (population of 173,000 in 1977) into intervention and control areas of approximately equal size. The control area received the same very limited services as the rest of the country, while in the intervention area comprehensive, voluntary, high-quality reproductive health services were provided. The impact of these services on reproductive behavior is summarized in Figure 9. Within two years from the start of the project, the proportion of women practicing family planning in the intervention area rose from less than 5% to 33%. In contrast, very little change occurred in the control area or in the rest of Bangladesh during the first few years.
A follow-up study in the Matlab district in the early 1990s measured family welfare outcomes including women's health, earnings and household assets, use of preventive health inputs, and effects on the health and schooling of the woman's children. The intervention area scored significantly better than the control area on many of these indicators of the welfare of women and their children, demonstrating how access to high-quality, voluntary family planning services can lead to multi-sectoral and multigenerational health and wellbeing benefits.
The multi-sectoral impacts of family planning
When couples implement their own decisions about family size, their actions lead to a range benefits:
· Women's empowerment: Women have greater freedom to determine the number and spacing of children and have more freedom to participate in the formal labor force and civic life;
· Health: The reduction in unintended pregnancies and the wider spacing of pregnancies reduce maternal mortality and morbidity and improve infant and child survival and health;
· Economy: A decline in unplanned births reduces the ratio of dependents to workers, raises investment in human capital, and leads to greater participation of women in the formal labor force. These trends are the cause of the demographic dividend (discussed earlier) which boosts GDP per capita and helps developing countries to accelerate poverty reduction;
· Government: Less pressure on education and health care sectors and on the country's infrastructure (e.g. transportation, communication, energy, water and sanitation);
· Environment: Reduced pressure on natural resources on which peoples' lives depend (fresh water, soil, forest, agriculture, energy, etc.) and reduces air, water, and soil pollution; and
· Social/Political stability: With a slower-growing youth population there is less competition for jobs and fewer unemployed youth, thus making political environments more stable.
Assisting couples to achieve their reproductive preferences is a compassionate act that promotes responsible parenthood and improves the lives of women, their children, and their communities, especially among the poor and most vulnerable sections of societies. The resulting decline in unplanned births also enhances prospects for poverty reduction and moderates the increasingly harmful impact of human activities on the natural environment.
Canning, David and Jaypee Sevilla. 2003. The Demographic Dividend: A New Perspective on the Economic Consequences of Population Change, Population Matters Monograph MR-1274, RAND, Santa Monica.
Casterline, John B. and Steven W. Sinding. 2000. "Unmet need for family planning in developing countries and implications for population policy," Population and Development Review 26(4): 691-723.
Cleland, John, James F. Phillips, Sajeda Amin, and Gholam M. Kamal. 1994. The Determinants of Reproductive Change in Bangladesh: Success in a Challenging Environment. Washington, DC: World Bank.
ICF International, 2017. The DHS Program STATcompiler. http://www.statcompiler.com
Lee, Ronald and Andrew Mason. 2006. "Back to Basics: What Is the Demographic Dividend?" Finance & Development, 43(3):16-17.
Pope Francis. 2015. Post-Synodal Apostolic Exhortation Amoris Laetitia. Vatican Press, Vatican City.
Saint John Paul II. 1994. Letter to the Secretary General of the United Nations Organization on Population and Development (18 March 1994): Insegnamenti XVII/1
Sedgh, Gilda, Susheela Singh, and Rubina Hussain. 2014. "Intended and Unintended Pregnancies Worldwide in 2012 and Recent Trends" Studies in Family Planning 45[3]: 301-314.
Singh, Susheela, Jacqueline Darroch, Lori Ashford. 2014. Adding It Up: The Costs and Benefits of Investing in Sexual and Reproductive Health. New York: Guttmacher Institute and UNFPA.
Synod of Bishops. 2015. The final report of the Synod of Bishops to the Holy Father, Pope Francis. Vatican City
United Nations Department of Economic and Social Affairs, Population Division. 2015. World Population Prospects: The 2015 Revision. New York: United Nations.
United Nations Department of Economic and Social Affairs, Population Division. 2014. World Urbanization Prospects: The 2014 Revision. New York: United Nations.
United Nations, Department of Economic and Social Affairs, Population Division. 2016. Model-based Estimates and Projections of Family Planning Indicators 2016. New York: United Nations.
[1] Author correspondence:
One Dag Hammarskjold Plaza
JBongaarts@popcouncil.org


text:
Buscando a Tabernero
Alice Parker
The Other Madisons
Eduardo Montes-Bradley
Alice Parker and The Fourth Wall
In "ALICE: At Home with Alice Parker", a documentary film by Montes-Bradley, the audience joins the filmmaker Montes-Bradley as he breaks the Fourth Wall leading into Alice's kitchen, in her 17th-century cottage, once the town meeting hall in Hawley, a small village in the western mountains Massachusetts. And what the camera is about to reveal are previously unknown aspects of Alice's relationships and collaborations with other American Artists resulting in a magnificent body of work with profound lyricism and devotion for the land, and humankind.
One such collaboration evoked in the film is the one Alice reflects upon when thinking of Emily Dickinson. "Emily's and my situation are very similar in some ways and very different in others. We certainly were shaped by this climate." Alice assures us, "We were shaped by this rogued countryside. The granite and the hills." The intimacy of the dialogue between protagonist and filmmaker renders "ALICE" as a unique window into a vanishing universe with persistent truths and values.
Montes-Bradley
Melodious Accord
Virginia Film Festival
Chorus America
Voice Day
Julliard School
The First Amendment Museum presents The Other Madisons
PRESS RELEASE | BLACK FIDDLERS OF MONTICELLO
Documentales en marcha 2021
© 2020 | Heritage Film Project

redpajama_set_name: RedPajamaCommonCrawl


We are working hard on the website so you are able to get the cheapest car hire in San Bernardino. Travel guide for San Bernardino still under developement.
There are many places to visit in San Bernardino and depending on your budget you have several options at the time of renting a car at San Bernardino airport.
We work for you to be able to choose from more than 450 car rental providers, providing this wat not only a wide selection of cars but the cheapest car rental offers in San Bernardino .
Our car hire system make a real time car rental comparison from all the car rental companies in San Bernardino and at San Bernardino airport.
By selecting the cheapest prices, you will be able to choose a long term car hire in San Bernardino for your long term holidays.
If your budget can afford it you may be looking for a comfortable luxury car rental or exotic car rental in San Bernardino...we manage a wide selection of premium cars.
You can feel like driving your own car, or maybe renting the exotic car you would like to buy while in holidays. Why not choosing a cabrio car rental and feeling the air while driving in San Bernardino?
Long term car hire means rentals longer than 2 weeks, and with holidaysresources.com you can benefit for your long term car rentals with our cheap prices for San Bernardino car hire.
When travelling with the familiy or friends, we may need a 7 seater or 9 seater minivan or minibus car hire San Bernardino, sometimes space in the vehicle is more needed than luxury. Why renting 2 cars for all members of your group when is possible to rent a 9 seater together?. Because this we manage a large variety of familiar cars to hire in San Bernardino like a Mercedes Vito for extra comfort and space.
Explore and enjoy San Bernardino with your family car!.


text:
<!doctype html>

<meta charset="utf-8">
<link rel="stylesheet" href="chrome://resources/css/text_defaults.css">

LOADING_MESSAGE

ABOUT_VOICESEARCH

        KEY
        VALUE

redpajama_set_name: RedPajamaGithub


The ONLY permalink setting that works is the default. ANY other permalink setting causes ALL inner pages and posts to display a 404 error.
I have tried changing to default, saving changes then changing back to the custom permalink (OR any other permalink setting) that I want to use but ONLY the default will allow browsing to inner pages and posts.
The main page will display on any permalink setting but only the default permalink will allow browsing within the site.
What are these other permalink settings that you are using?
The common settings that come with the theme.
NONE but the default setting allows inner page browsing.
Has there been any progress in fixing this permalink issue??
I have not heard back since answering your last question concerning the other permalinks I am using.
I like the other features of the theme but I will have to use another if this issue is not resolved.
Well, none of us are experiencing something similar, so it is unique to your site. Looking at the site your profile is linked to, I don't see it. Can you provide a link to the site where you are experiencing this, and possible include a screenshot of your permalink settings?
Permalinks are a WordPress issue, not a theme issue.
Have you tried disabling plugins to rule out a plugin issue? Have you switched to the default 2012 theme to rule out theme issues?
Do you mean that your permalinks are showing up as "http://www.example.com.com/"?
I meant that I just changed the name of my site in the example I used for this post.
I have tried disabling the 3 plugins that I am using on the site but that does not change the 404 issue with the permalink.
The ONLY permalink that works is the default one.
If you are on an Apache server, you must have mod_rewrite enabled.


A south-west company specialising in clinical waste collection has been bought by the multi-national Tradebe.
The takeover of Ecowaste Southwest for an undisclosed sum follows a ruling by the Competition Commission in March that owners Stericycle had to sell it.
Stericycle bought the company in 2011 but the commission concluded "the acquisition would lead to a loss of local rivalry leading to higher prices and lower service levels in parts of the south-west of England than would have been the case in the absence of the merger".
The company, based at Avonmouth, Bristol has an annual turnover of £2m, employs 16 people and provides clinical waste collection services throughout the region.
Tradebe Healthcare is licensed to handle over 18,000 tonnes a year of all types of healthcare wastes and provides a national collection service to NHS trusts, hygiene customers and pharmaceutical organisations. The company claims to have the UK's only cold disinfection treatment process for orange bag clinical waste.
The Tradebe group is based in Spain, has an annual turnover of £275m and globally employs 1,750 people.


1. China is the most populated country in the world with over 1.4 billion people. Mandarin is spoken by almost one billion people. It is the most widely spoken language in the world.
5. Many American companies do business in China, including Motorola, Coca Cola etc.
7. China is playing a major role in world affairs and will continue to do so; Mandarin Chinese is the most widely-spoken language in the world.
Learn to speak Chinese and you can speak with million people around the world.
Business- business people who can speak Chinese have a huge advantage in tapping into the Chinese market. It is much easier to develop all important relationships if you can speak Chinese.
Travel- China and Taiwan offers exciting travel opportunities. Getting around is easier if you can speak Chinese.


text:
Take a tour through Ancient Rome in our interactive film with game elements for the BBC, which attracted 1.2m visitors in six months.
IMMERSIVE, INTERACTIVE LEARNING
We were asked to create an interactive film with immersive gaming elements to play alongside a six-part BBC TV show about Ancient Rome. Core to the proposition was to include educational content in a non-traditional way, being discreetly informative.
The BBC really wanted to push the medium and what was technically possible at the time – an ambition Preloaded was only too happy to share.
Core to the proposition was to include educational content in a non-traditional way, being discreetly informative.
HISTORICAL ACCURACY
The storyline of the game takes the form of a dark contemporary thriller set in the background of the series broadcast on television. The central narrative premise – a prop man working on the show becoming embroiled in intrigue and dark happenings – takes the story beyond the broadcast. We developed the plot in conjunction with the BBC, their scriptwriter and a Roman history consultant. Together we ensured that dramatic purpose and historical accuracy were at the centre of the experience.
We worked in 3D to plan and model the environments that the live-action was to be keyed into. The main challenge was seamlessly combining the video footage with the CGI elements, ensuring all angles matched and the film quality was retained. Hundreds of video clips offer the player a number of routes, as well as several possible resolutions to the story depending on the choices made during their game. This created a level of depth previously not achieved online.
Hundreds of video clips offer the player a number of routes, as well as several possible resolutions to the story depending on the choices made during their game.
ALIGNING BROADCAST AND DIGITAL
The project was the first in which the BBC combined online and interactive television budgets, enabling Preloaded to develop elements from the programme within the online experience, and vice versa. For example, the game's central character, Adam Foster, appears in the show's closing credits as the prop man to add that extra link and layer of credibility between the two.
CDX was rolled out in four phases, sequentially unlocked as instalments of the six-part television programme went to air. The game was then released to a global audience with the support of Adobe, who sponsored the international version, seeing it as great example of what could be achieved with their creative and interactive tools. The experience attracted 1.2 million unique visitors in the first six months.
1.2 million unique visitors in the first six months
"Exceptional attention to detail and high production values set this effort apart from other adventures... another remarkable production from PRELOADED."
Jay Bibby , Jayisgames.com
Cannes Lions - Games
Royal Television Society - Educational Multimedia
Flash Forward - Games
Award recognition
BAFTA - Best Website
D&AD - Silver Pencil
SXSW - Amusement
Webby - Best Broadband Site
BIMA - Games
BIMA - Entertainment


text:
Royal Commission should assess long-term future of NHS, says Lord Saatchi
The NHS needs a Royal Commission in order to address the problem of the enormous amount of strain being put on its staff over winter and ensure that its governance and care are fit for the challenges posed by the 21 century, a pamphlet written by Lord Saatchi has claimed.
The senior Tory peer writing in his Centre for Policy Studies pamphlet called 'An NHS Royal Commission – From fighting fires to a lasting settlement' claims that the NHS's problem lies in the inability to have a conversation about the issues facing the health service and how to fix them.
Lord Saatchi goes on to say that the only way to positively reform the NHS is by having a "proper, grown up talk", and getting to the heart of the problems presented by 'alternative facts': "These aren't lies – it is just that there are so many different ways of looking at the same thing that rational discussion has become next to impossible".
In the pamphlet, he said: "There is a wide range of perspectives on the current performance of the NHS, and varied confidence in its long-term future, from the pessimistic view that the system is in crisis, to the optimistic position that its only threats are meddling politicians. A Royal Commission offers significant benefits regardless of the position taken.
"A Royal Commission is an opportunity to help reverse a deterioration in some clinical outcomes, to identify and eliminate barriers to equal access, and to ensure that trusts are adequately funded to cope with current demand pressures. The solutions it arrives at could help to avert the kind of distress seen throughout the system over the 2016-17 winter."
Commenting on his report, Saatchi said: "The timing has never been better. We have the finest medical minds in the world, and an impeccable 'medical history'.
"If they really believed it was Her Majesty's wish that they would all sit down together to bring forward a good plan for the nation's health, it would happen."
The report stated that the Royal Commission has the ability to secure the bipartisan support needed to embed lasting changes, "to detoxify reforms that otherwise may be too politically dangerous to pursue", and to deploy its unique investigatory power to establish what reforms are needed to ensure that we have a world-class health system.
The call for a Royal Commission comes shortly before NHS Improvement released the figures for the third quarter of 2016-17. It also comes after NHS Providers called for the regulator and NHS England to lead an urgent review into how hospitals account for winter pressures following the health service's struggles this winter.
Thousands gather in London to protest deepening winter crisis
Hospitals told to cancel non-urgent operations to cope with winter pressures
Ambulance services creaking under strain as delays steadily rise
Lack of beds to put strain on NHS despite trusts' preparation efforts for winter
Government 'must take urgent action' following 11,000 extra winter deaths reveal
RCP highlights need to deliver responsive seven day service over winter
Root causes of ED staffing crisis must be addressed, says BMA
Two-thirds of health leaders 'extremely concerned' about winter
Winter pressure is now 'year-round crisis'
Labour calls for £500m NHS bailout to avoid another winter crisis
26/06/2020Adapting and Innovating
Matt Roberts, National Health Executive Editorial Lead. NHE May/June 2020 Edition We've been through so much as a health sector and a society in recent months with coronavirus and nothing can take away from the loss and difficulties that we've faced but it vital we also don't disregard the amazing efforts we've witnessed. Staff have gone above and beyond, whole hospitals and trusts have flexed virtually at will to meet demand and pressures and we've... read more >
Rate of paramedics leaving ambulance service nearly doubles
Action needed 'urgently' to get value for money from use of agency staff
A collaborative approach to tackling agency


In one of London's best addresses, a well-proportioned and recently refurbished two bedroom flat on the lower ground floor of this elegant period building. With a Share of Freehold, this Lennox Gardens flat is a prime address on the Knightsbridge/Chelsea border comprising grand period houses built in the late 1800's around an oval garden - to which only residents have access.
A stunning one bedroom property situated in an exclusive garden square in the heart of Knightsbridge. It has been completely refurbished to the highest standard and benefits from a superb reception room with high ceilings. The flat also boasts a large bedroom measuring just over 17' x 9'. There is ample storage in the form of the vaults located at the front of the property.
A one bedroom share of freehold flat, the majority of which used to be the ballroom and constitutes the rear half of the raised ground floor of this large period house. This property has been completely refurbished to the highest standard. The flat features a stunning reception room, a large bedroom, kitchen and bathroom.
Lennox Gardens comprises grand Victorian houses built round an oval communal garden. The flat is on the North West corner of the square and is situated a stones throw from Harrods and within easy walking distance of the shops on the King's Road. The flat has been beautifully restored to the highest standard and and could be moved into without any further expense.
For sale in lennox gardens, all property types.


text:
Q: Warning: networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress My ingress.yml file is bellow
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: "example-issuer"
spec:
  rules:
  - host: example.com
    http:
      paths:
      - backend:
          serviceName: example-service
          servicePort: http
        path: /
  tls:
  - secretName: example-tls-cert
    hosts:
      - example.com

After changing apiVersion: networking.k8s.io/v1beta1 to networking.k8s.io/v1 getting bellow error.
error validating data: [ValidationError(Ingress.spec.rules[0].http.paths[0].backend): unknown field "serviceName" in io.k8s.api.networking.v1.IngressBackend, ValidationError(Ingress.spec.rules[0].http.paths[0].backend)

A: Try bellow
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: "example-issuer"
spec:
  rules:
  - host: example.com
    http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: example-service
            port:
              number: 80
  tls:
   - secretName: example-tls-cert
     hosts:
       - example.com

redpajama_set_name: RedPajamaStackExchange


text:
namespace master = mesos::internal::master;
namespace paths = mesos::internal::slave::docker::paths;
namespace slave = mesos::internal::slave;
namespace spec = ::docker::spec;

using std::string;
using std::vector;

using process::Future;
using process::Owned;
using process::PID;
using process::Promise;

using master::Master;

using mesos::internal::slave::AUFS_BACKEND;
using mesos::internal::slave::COPY_BACKEND;
using mesos::internal::slave::OVERLAY_BACKEND;
using mesos::internal::slave::Provisioner;

using mesos::master::detector::MasterDetector;

using slave::ImageInfo;
using slave::Slave;

using slave::docker::Puller;
using slave::docker::RegistryPuller;
using slave::docker::Store;

using testing::WithParamInterface;

namespace mesos {
namespace internal {
namespace tests {

class ProvisionerDockerLocalStoreTest : public TemporaryDirectoryTest
{
public:
  void verifyLocalDockerImage(
      const slave::Flags& flags,
      const vector<string>& layers)
  {
    // Verify contents of the image in store directory.
    const string layerPath1 = paths::getImageLayerRootfsPath(
        flags.docker_store_dir,
        "123",
        COPY_BACKEND);

    const string layerPath2 = paths::getImageLayerRootfsPath(
        flags.docker_store_dir,
        "456",
        COPY_BACKEND);

    EXPECT_TRUE(os::exists(layerPath1));
    EXPECT_TRUE(os::exists(layerPath2));

    EXPECT_SOME_EQ(
        "foo 123",
        os::read(path::join(layerPath1, "temp")));

    EXPECT_SOME_EQ(
        "bar 456",
        os::read(path::join(layerPath2, "temp")));

    // Verify the Docker Image provided.
    vector<string> expectedLayers;
    expectedLayers.push_back(layerPath1);
    expectedLayers.push_back(layerPath2);
    EXPECT_EQ(expectedLayers, layers);
  }

protected:
  virtual void SetUp()
  {
    TemporaryDirectoryTest::SetUp();

    const string archivesDir = path::join(os::getcwd(), "images");
    const string image = path::join(archivesDir, "abc");
    ASSERT_SOME(os::mkdir(archivesDir));
    ASSERT_SOME(os::mkdir(image));

    JSON::Value repositories = JSON::parse(
        "{"
        "  \"abc\": {"
        "    \"latest\": \"456\""
        "  }"
        "}").get();
    ASSERT_SOME(
        os::write(path::join(image, "repositories"), stringify(repositories)));

    ASSERT_SOME(os::mkdir(path::join(image, "123")));
    JSON::Value manifest123 = JSON::parse(
        "{"
        "  \"parent\": \"\""
        "}").get();
    ASSERT_SOME(os::write(
        path::join(image, "123", "json"), stringify(manifest123)));
    ASSERT_SOME(os::mkdir(path::join(image, "123", "layer")));
    ASSERT_SOME(
        os::write(path::join(image, "123", "layer", "temp"), "foo 123"));

    // Must change directory to avoid carrying over /path/to/archive during tar.
    const string cwd = os::getcwd();
    ASSERT_SOME(os::chdir(path::join(image, "123", "layer")));
    ASSERT_SOME(os::tar(".", "../layer.tar"));
    ASSERT_SOME(os::chdir(cwd));
    ASSERT_SOME(os::rmdir(path::join(image, "123", "layer")));

    ASSERT_SOME(os::mkdir(path::join(image, "456")));
    JSON::Value manifest456 = JSON::parse(
        "{"
        "  \"parent\": \"123\""
        "}").get();
    ASSERT_SOME(
        os::write(path::join(image, "456", "json"), stringify(manifest456)));
    ASSERT_SOME(os::mkdir(path::join(image, "456", "layer")));
    ASSERT_SOME(
        os::write(path::join(image, "456", "layer", "temp"), "bar 456"));

    ASSERT_SOME(os::chdir(path::join(image, "456", "layer")));
    ASSERT_SOME(os::tar(".", "../layer.tar"));
    ASSERT_SOME(os::chdir(cwd));
    ASSERT_SOME(os::rmdir(path::join(image, "456", "layer")));

    ASSERT_SOME(os::chdir(image));
    ASSERT_SOME(os::tar(".", "../abc.tar"));
    ASSERT_SOME(os::chdir(cwd));
    ASSERT_SOME(os::rmdir(image));
  }
};

// This test verifies that a locally stored Docker image in the form of a
// tar archive created from a 'docker save' command can be unpacked and
// stored in the proper locations accessible to the Docker provisioner.
TEST_F(ProvisionerDockerLocalStoreTest, LocalStoreTestWithTar)
{
  slave::Flags flags;
  flags.docker_registry = path::join(os::getcwd(), "images");
  flags.docker_store_dir = path::join(os::getcwd(), "store");
  flags.image_provisioner_backend = COPY_BACKEND;

  Try<Owned<slave::Store>> store = slave::docker::Store::create(flags);
  ASSERT_SOME(store);

  Image mesosImage;
  mesosImage.set_type(Image::DOCKER);
  mesosImage.mutable_docker()->set_name("abc");

  Future<slave::ImageInfo> imageInfo =
    store.get()->get(mesosImage, COPY_BACKEND);

  AWAIT_READY(imageInfo);

  verifyLocalDockerImage(flags, imageInfo->layers);
}

// This tests the ability of the metadata manger to recover the images it has
// already stored on disk when it is initialized.
TEST_F(ProvisionerDockerLocalStoreTest, MetadataManagerInitialization)
{
  slave::Flags flags;
  flags.docker_registry = path::join(os::getcwd(), "images");
  flags.docker_store_dir = path::join(os::getcwd(), "store");
  flags.image_provisioner_backend = COPY_BACKEND;

  Try<Owned<slave::Store>> store = slave::docker::Store::create(flags);
  ASSERT_SOME(store);

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name("abc");

  Future<slave::ImageInfo> imageInfo = store.get()->get(image, COPY_BACKEND);
  AWAIT_READY(imageInfo);

  // Store is deleted and recreated. Metadata Manager is initialized upon
  // creation of the store.
  store->reset();
  store = slave::docker::Store::create(flags);
  ASSERT_SOME(store);
  Future<Nothing> recover = store.get()->recover();
  AWAIT_READY(recover);

  imageInfo = store.get()->get(image, COPY_BACKEND);
  AWAIT_READY(imageInfo);
  verifyLocalDockerImage(flags, imageInfo->layers);
}

// This test verifies that the layer that is missing from the store
// will be pulled.
TEST_F(ProvisionerDockerLocalStoreTest, MissingLayer)
{
  slave::Flags flags;
  flags.docker_registry = path::join(os::getcwd(), "images");
  flags.docker_store_dir = path::join(os::getcwd(), "store");
  flags.image_provisioner_backend = COPY_BACKEND;

  Try<Owned<slave::Store>> store = Store::create(flags);
  ASSERT_SOME(store);

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name("abc");

  Future<slave::ImageInfo> imageInfo = store.get()->get(
      image, flags.image_provisioner_backend.get());

  AWAIT_READY(imageInfo);
  verifyLocalDockerImage(flags, imageInfo->layers);

  // Remove one of the layers from the store.
  ASSERT_SOME(os::rmdir(paths::getImageLayerRootfsPath(
      flags.docker_store_dir, "456", flags.image_provisioner_backend.get())));

  // Pull the image again to get the missing layer.
  imageInfo = store.get()->get(image, flags.image_provisioner_backend.get());
  AWAIT_READY(imageInfo);
  verifyLocalDockerImage(flags, imageInfo->layers);
}

class MockPuller : public Puller
{
public:
  MockPuller()
  {
    EXPECT_CALL(*this, pull(_, _, _, _))
      .WillRepeatedly(Invoke(this, &MockPuller::unmocked_pull));
  }

  virtual ~MockPuller() {}

  MOCK_METHOD4(
      pull,
      Future<vector<string>>(
          const spec::ImageReference&,
          const string&,
          const string&,
          const Option<Secret>&));

  Future<vector<string>> unmocked_pull(
      const spec::ImageReference& reference,
      const string& directory,
      const string& backend,
      const Option<Secret>& config)
  {
    // TODO(gilbert): Allow return list to be overridden.
    return vector<string>();
  }
};

// This tests the store to pull the same image simultaneously.
// This test verifies that the store only calls the puller once
// when multiple requests for the same image is in flight.
TEST_F(ProvisionerDockerLocalStoreTest, PullingSameImageSimutanuously)
{
  slave::Flags flags;
  flags.docker_registry = path::join(os::getcwd(), "images");
  flags.docker_store_dir = path::join(os::getcwd(), "store");

  MockPuller* puller = new MockPuller();
  Future<Nothing> pull;
  Future<string> directory;
  Promise<vector<string>> promise;

  EXPECT_CALL(*puller, pull(_, _, _, _))
    .WillOnce(testing::DoAll(FutureSatisfy(&pull),
                             FutureArg<1>(&directory),
                             Return(promise.future())));

  Try<Owned<slave::Store>> store =
      slave::docker::Store::create(flags, Owned<Puller>(puller));
  ASSERT_SOME(store);

  Image mesosImage;
  mesosImage.set_type(Image::DOCKER);
  mesosImage.mutable_docker()->set_name("abc");

  Future<slave::ImageInfo> imageInfo1 =
    store.get()->get(mesosImage, COPY_BACKEND);

  AWAIT_READY(pull);
  AWAIT_READY(directory);

  // TODO(gilbert): Need a helper method to create test layers
  // which will allow us to set manifest so that we can add
  // checks here.
  const string layerPath = path::join(directory.get(), "456");

  Try<Nothing> mkdir = os::mkdir(layerPath);
  ASSERT_SOME(mkdir);

  JSON::Value manifest = JSON::parse(
        "{"
        "  \"parent\": \"\""
        "}").get();

  ASSERT_SOME(
      os::write(path::join(layerPath, "json"), stringify(manifest)));

  ASSERT_TRUE(imageInfo1.isPending());
  Future<slave::ImageInfo> imageInfo2 =
    store.get()->get(mesosImage, COPY_BACKEND);

  const vector<string> result = {"456"};

  ASSERT_TRUE(imageInfo2.isPending());
  promise.set(result);

  AWAIT_READY(imageInfo1);
  AWAIT_READY(imageInfo2);

  EXPECT_EQ(imageInfo1->layers, imageInfo2->layers);
}

#ifdef __linux__
class ProvisionerDockerTest
  : public MesosTest,
    public WithParamInterface<string> {};

// This test verifies that local docker image can be pulled and
// provisioned correctly, and shell command should be executed.
TEST_F(ProvisionerDockerTest, ROOT_LocalPullerSimpleCommand)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  const string directory = path::join(os::getcwd(), "archives");

  Future<Nothing> testImage = DockerArchive::create(directory, "alpine");
  AWAIT_READY(testImage);

  ASSERT_TRUE(os::exists(path::join(directory, "alpine.tar")));

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";
  flags.docker_registry = directory;
  flags.docker_store_dir = path::join(os::getcwd(), "store");

  Owned<MasterDetector> detector = master.get()->createDetector();

  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      "ls -al /");

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name("alpine");

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Seconds(60));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  driver.stop();
  driver.join();
}

// For official Docker images, users can omit the 'library/' prefix
// when specifying the repository name (e.g., 'busybox'). The registry
// puller normalize docker official images if necessary.
INSTANTIATE_TEST_CASE_P(
    ImageAlpine,
    ProvisionerDockerTest,
    ::testing::ValuesIn(vector<string>({
        "alpine", // Verifies the normalization of the Docker repository name.
        "library/alpine",
        "quay.io/coreos/alpine-sh",
        "registry.cn-hangzhou.aliyuncs.com/acs-sample/alpine"})));

// TODO(jieyu): This is a ROOT test because of MESOS-4757. Remove the
// ROOT restriction after MESOS-4757 is resolved.
TEST_P(ProvisionerDockerTest, ROOT_INTERNET_CURL_SimpleCommand)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";

  // Image pulling time may be long, depending on the location of
  // the registry server.
  flags.executor_registration_timeout = Minutes(10);

  Owned<MasterDetector> detector = master.get()->createDetector();
  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  // NOTE: We use a non-shell command here because 'sh' might not be
  // in the PATH. 'alpine' does not specify env PATH in the image. On
  // some linux distribution, '/bin' is not in the PATH by default.
  CommandInfo command;
  command.set_shell(false);
  command.set_value("/bin/ls");
  command.add_arguments("ls");
  command.add_arguments("-al");
  command.add_arguments("/");

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      command);

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name(GetParam());

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Minutes(10));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  driver.stop();
  driver.join();
}

// This test verifies that the scratch based docker image (that
// only contain a single binary and its dependencies) can be
// launched correctly.
TEST_F(ProvisionerDockerTest, ROOT_INTERNET_CURL_ScratchImage)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";

  Owned<MasterDetector> detector = master.get()->createDetector();
  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  CommandInfo command;
  command.set_shell(false);

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      command);

  Image image;
  image.set_type(Image::DOCKER);

  // 'hello-world' is a scratch image. It contains only one
  // binary 'hello' in its rootfs.
  image.mutable_docker()->set_name("hello-world");

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Seconds(60));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  driver.stop();
  driver.join();
}

class ProvisionerDockerBackendTest
  : public MesosTest,
    public WithParamInterface<string>
{
public:
  // Returns the supported backends.
  static vector<string> parameters()
  {
    vector<string> backends = {COPY_BACKEND};

    Try<bool> aufsSupported = fs::supported("aufs");
    if (aufsSupported.isSome() && aufsSupported.get()) {
      backends.push_back(AUFS_BACKEND);
    }

    Try<bool> overlayfsSupported = fs::supported("overlayfs");
    if (overlayfsSupported.isSome() && overlayfsSupported.get()) {
      backends.push_back(OVERLAY_BACKEND);
    }

    return backends;
  }
};

INSTANTIATE_TEST_CASE_P(
    BackendFlag,
    ProvisionerDockerBackendTest,
    ::testing::ValuesIn(ProvisionerDockerBackendTest::parameters()));

// This test verifies that a docker image containing whiteout files
// will be processed correctly by copy, aufs and overlay backends.
TEST_P(ProvisionerDockerBackendTest, ROOT_INTERNET_CURL_Whiteout)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";
  flags.image_provisioner_backend = GetParam();

  Owned<MasterDetector> detector = master.get()->createDetector();
  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  // We are using the docker image 'zhq527725/whiteout' to verify that the
  // files '/dir1/file1' and '/dir1/dir2/file2' do not exist in container's
  // rootfs because of the following two whiteout files in the image:
  //   '/dir1/.wh.file1'
  //   '/dir1/dir2/.wh..wh..opq'
  // And we also verify that the file '/dir1/dir2/file3' exists in container's
  // rootfs which will NOT be applied by '/dir1/dir2/.wh..wh..opq' since they
  // are in the same layer.
  // See more details about this docker image in the link below:
  //   https://hub.docker.com/r/zhq527725/whiteout/
  CommandInfo command = createCommandInfo(
      "test ! -f /dir1/file1 && "
      "test ! -f /dir1/dir2/file2 && "
      "test -f /dir1/dir2/file3");

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      command);

  Image image = createDockerImage("zhq527725/whiteout");

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Seconds(60));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  driver.stop();
  driver.join();
}

// This test verifies that the provisioner correctly overwrites a
// directory in underlying layers with a with a regular file or symbolic
// link of the same name in an upper layer, and vice versa.
TEST_P(ProvisionerDockerBackendTest, ROOT_INTERNET_CURL_Overwrite)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";
  flags.image_provisioner_backend = GetParam();

  Owned<MasterDetector> detector = master.get()->createDetector();
  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  // We are using the docker image 'chhsiao/overwrite' to verify that:
  //   1. The '/merged' directory is merged.
  //   2. All '/replaced*' files/directories are correctly overwritten.
  //   3. The '/foo', '/bar' and '/baz' files are correctly overwritten.
  // See more details in the following link:
  //   https://hub.docker.com/r/chhsiao/overwrite/
  CommandInfo command = createCommandInfo(
      "test -f /replaced1 &&"
      "test -L /replaced2 &&"
      "test -f /replaced2/m1 &&"
      "test -f /replaced2/m2 &&"
      "! test -e /replaced2/r2 &&"
      "test -d /replaced3 &&"
      "test -d /replaced4 &&"
      "! test -e /replaced4/m1 &&"
      "test -f /foo &&"
      "! test -L /bar &&"
      "test -L /baz");

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      command);

  Image image = createDockerImage("chhsiao/overwrite");

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  // Create a non-empty file 'abc' in the agent's work directory on the
  // host filesystem. This file is symbolically linked by
  //   '/xyz -> ../../../../../../../abc'
  // in the 2nd layer of the testing image during provisioning.
  // For more details about the provisioner directory please see:
  //   https://github.com/apache/mesos/blob/master/src/slave/containerizer/mesos/provisioner/paths.hpp#L34-L48 // NOLINT
  const string hostFile = path::join(flags.work_dir, "abc");
  ASSERT_SOME(os::write(hostFile, "abc"));
  ASSERT_SOME(os::shell("test -s " + hostFile));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Seconds(60));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  // The non-empty file should not be overwritten by the empty file
  // '/xyz' in the 3rd layer of the testing image during provisioning.
  EXPECT_SOME(os::shell("test -s " + hostFile));

  driver.stop();
  driver.join();
}

// This test verifies that Docker image can be pulled from the
// repository by digest.
TEST_F(ProvisionerDockerTest, ROOT_INTERNET_CURL_ImageDigest)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";

  Owned<MasterDetector> detector = master.get()->createDetector();
  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  // NOTE: We use a non-shell command here because 'sh' might not be
  // in the PATH. 'alpine' does not specify env PATH in the image. On
  // some linux distribution, '/bin' is not in the PATH by default.
  CommandInfo command;
  command.set_shell(false);
  command.set_value("/bin/ls");
  command.add_arguments("ls");
  command.add_arguments("-al");
  command.add_arguments("/");

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      command);

  // NOTE: We use the digest of the 'alpine:2.7' image because it has a
  // Schema 1 manifest (the only manifest schema that we currently support).
  const string digest =
    "sha256:9f08005dff552038f0ad2f46b8e65ff3d25641747d3912e3ea8da6785046561a";

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name("library/alpine@" + digest);

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Seconds(60));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  driver.stop();
  driver.join();
}

// This test verifies that if a container image is specified, the
// command runs as the specified user 'nobody' and the sandbox of
// the command task is writeable by the specified user. It also
// verifies that stdout/stderr are owned by the specified user.
TEST_F(ProvisionerDockerTest, ROOT_INTERNET_CURL_CommandTaskUser)
{
  Try<Owned<cluster::Master>> master = StartMaster();
  ASSERT_SOME(master);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";

  Owned<MasterDetector> detector = master.get()->createDetector();
  Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags);
  ASSERT_SOME(slave);

  MockScheduler sched;
  MesosSchedulerDriver driver(
      &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);

  EXPECT_CALL(sched, registered(&driver, _, _));

  Future<vector<Offer>> offers;
  EXPECT_CALL(sched, resourceOffers(&driver, _))
    .WillOnce(FutureArg<1>(&offers))
    .WillRepeatedly(Return()); // Ignore subsequent offers.

  driver.start();

  AWAIT_READY(offers);
  ASSERT_EQ(1u, offers->size());

  const Offer& offer = offers.get()[0];

  Result<uid_t> uid = os::getuid("nobody");
  ASSERT_SOME(uid);

  CommandInfo command;
  command.set_user("nobody");
  command.set_value(strings::format(
      "#!/bin/sh\n"
      "touch $MESOS_SANDBOX/file\n"
      "FILE_UID=`stat -c %%u $MESOS_SANDBOX/file`\n"
      "test $FILE_UID = %d\n"
      "STDOUT_UID=`stat -c %%u $MESOS_SANDBOX/stdout`\n"
      "test $STDOUT_UID = %d\n"
      "STDERR_UID=`stat -c %%u $MESOS_SANDBOX/stderr`\n"
      "test $STDERR_UID = %d\n",
      uid.get(), uid.get(), uid.get()).get());

  TaskInfo task = createTask(
      offer.slave_id(),
      Resources::parse("cpus:1;mem:128").get(),
      command);

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name("alpine");

  ContainerInfo* container = task.mutable_container();
  container->set_type(ContainerInfo::MESOS);
  container->mutable_mesos()->mutable_image()->CopyFrom(image);

  Future<TaskStatus> statusRunning;
  Future<TaskStatus> statusFinished;
  EXPECT_CALL(sched, statusUpdate(&driver, _))
    .WillOnce(FutureArg<1>(&statusRunning))
    .WillOnce(FutureArg<1>(&statusFinished));

  driver.launchTasks(offer.id(), {task});

  AWAIT_READY_FOR(statusRunning, Seconds(60));
  EXPECT_EQ(task.task_id(), statusRunning->task_id());
  EXPECT_EQ(TASK_RUNNING, statusRunning->state());

  AWAIT_READY(statusFinished);
  EXPECT_EQ(task.task_id(), statusFinished->task_id());
  EXPECT_EQ(TASK_FINISHED, statusFinished->state());

  driver.stop();
  driver.join();
}

// This test simulate the case that after the agent reboots the
// container runtime directory is gone while the provisioner
// directory still survives. The recursive `provisioner::destroy()`
// can make sure that a child container is always cleaned up
// before its parent container.
TEST_F(ProvisionerDockerTest, ROOT_RecoverNestedOnReboot)
{
  const string directory = path::join(os::getcwd(), "archives");

  Future<Nothing> testImage = DockerArchive::create(directory, "alpine");
  AWAIT_READY(testImage);

  slave::Flags flags = CreateSlaveFlags();
  flags.isolation = "docker/runtime,filesystem/linux";
  flags.image_providers = "docker";
  flags.docker_registry = directory;
  flags.docker_store_dir = path::join(os::getcwd(), "store");

  Try<Owned<Provisioner>> provisioner = Provisioner::create(flags);
  ASSERT_SOME(provisioner);

  ContainerID containerId;
  containerId.set_value(UUID::random().toString());

  ContainerID nestedContainerId;
  nestedContainerId.mutable_parent()->CopyFrom(containerId);
  nestedContainerId.set_value(UUID::random().toString());

  Image image;
  image.set_type(Image::DOCKER);
  image.mutable_docker()->set_name("alpine");

  AWAIT_READY(provisioner.get()->provision(nestedContainerId, image));

  // Passing an empty hashset to `provisioner::recover()` to
  // simulate the agent reboot scenario.
  AWAIT_READY(provisioner.get()->recover({}));

  const string containerDir = slave::provisioner::paths::getContainerDir(
      slave::paths::getProvisionerDir(flags.work_dir),
      containerId);

  EXPECT_FALSE(os::exists(containerDir));
}

#endif

} // namespace tests {
} // namespace internal {
} // namespace mesos {


Hon. Lewis C. Hardee Jr.
118 Wade Hampton Office Bldg.
2201 Rayburn House Office Bldg.
1404 Longworth House Office Bldg.
2419 Rayburn House Office Bldg.
242 Canon House Office Bldg.
223 Cannon House Office Bldg.
520 Hart Senate Office Bldg.


text:
Q: previous page won't expire I have a page that has two 'pages' within. Basically it's two DIVs - one is hidden at all times, and it is toggled dependent on a Radio button.
One of these DIVs contains a form which you can submit. I want this whole page, especially that form, refreshed when the user clicks 'back'.
I have tried numerous things, and none of them have worked. Maybe they are in the wrong place?
I currently tried this:
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <% Response.Cache.SetCacheability(HttpCacheability.NoCache); %>
    <%: Response.Expires = -1; %>

It still doesn't work. Help?

A: Since the back button doesn't "reload" the page, this is the problem you are seeing.
You could add a "back button" or "link" which when clicked would obviously reload the page.
Also, look into the javascript onload event.  You might be able to clear the form using that.


Farnham Park, Broadwater Park, Frensham Great Pond and Common, the Phillips Memorial Park, the Lammas Lands, Blackheath Common and Mare Hill Common, which are all managed by the council, are among the record-breaking 1,883 UK parks and green spaces that received a prestigious Green Flag Award– the mark of a quality park or green space.
The international award, now into its third decade, is a sign to the public that the open spaces boast the highest possible environmental standards, are beautifully maintained and have excellent visitor facilities.
Farnham Park, which has received the award for the sixth time, is a medieval deer park within walking distance of the town centre. It includes an adventure playground, fitted in 2015, a toddlers play area, café, toilets, and a trim trail, all within a landscape of rolling grassland and beautiful veteran trees.
Broadwater Park, in Farncombe, has retained the award for a fourth year. The park can be found next to Godalming Leisure Centre and includes a large lake, play area, picnic area and football and cricket pitches.
It is the third year in a row that Frensham Great Pond and Common has kept the title. Frensham is a Site of Special Scientific Interest (SSSI) and is home to a range of rare and protected wildlife including the Dartford Warbler and the Natterjack Toad. The common is made up of a large area of heathland and has a beach next to the Great Pond. There is also parking on site, accessible toilets and a café.
Also achieving the award for the third time is the Phillips Memorial Park in Godalming. The park has recently benefitted from a five year restoration and enhancement project, supported by the Heritage Lottery Fund and Big Lottery Fund. The site is home to the Phillips Memorial Cloister, an Arts and Crafts Grade II listed building, a children's play area, skate park, bandstand, War Memorial and a beautiful riverside walk.
Near to Phillips Memorial Park, the Lammas Lands, a series of flood meadows with beautiful views alongside the River Way between Godalming and Farncombe, have secured a Green Flag for the second year in a row.
Similarly, Blackheath Common, with its stunning views of mauve flowering heathland, was also awarded a Green Flag for the second year in a row. The common is a SSSI and the dry lowland heathland, including acid grassland and woodland, is an internationally important habitat.
Mare Hill Common, a beautiful, scenic and peaceful space covering 40 hectares of heathland, woodland and scrub, was Waverley's final award-winning green space and was presented with a Green Flag for the first time.


Text: Assignment writing is a complex job. Especially the students of London find great problem in trying with the assignment. This is when we Source Writing can help you at the most with the exact Writing assignment help. We have experts at our desk to assist you in matters of perfect essay writing, and assignment preparation. Completing the thesis and the paper is a hard task. Source Essay is there to help you with the difficulties in framing the paper with the best of aptitude. Often the students are unaware regarding the placement of their talent. This is when we can help students in the successful completion of the task. We take the legitimate price for the papers that we create. There is no unnecessary delay in the submission of the papers. On receiving the task, the experts start working on them at the earliest. They take to the measures to make the assignments ready for the London students.
At Source Essay we have the best experts in the genre of Writing assignment help. They will help you with the essential tips in writing the essay with complete vision. We can help the students in London to complete the thesis in style. In order to complete the order of the task we will help with the essential tips for the appropriate completion of the assignment. The experts at Source Essay will help with the set of thesis writing services with the kind of innovative and the individualistic approach. The people here have the best of knowledge in framing the coursework with the best of efforts.


American Law Institute-American Bar Association Committee on Continuing Professional Education.
Furthers the development and practice of business law.
The preeminent organization for trial attorneys.
Non-profit continuing legal education organization dedicated to providing the legal community with information critical to the development of a professional, competitive edge.
Official site of the University of Baltimore School of Law.
Official site of the University of Maryland School of Law.


text:
What were the five theaters of WW2?
Mary Ramer
Battles of World War II by Year and Theater The European Theater (Western Europe), the Eastern Front, the Mediterranean/North Africa Theater, and the Pacific Theater were the primary battlegrounds of World War II. The war began in 1939 with the invasion of Poland by Germany and Italy, followed by the expansion of Hitler's Nazi Party into other European countries. In 1941, the United States entered the war after the attack on Pearl Harbor, Hawaii, by Japan.
During World War II, many cities experienced massive destruction at the hands of air raids, artillery fire, and nuclear weapons. Large parts of many cities were also destroyed by invading armies. However, some cities emerged more damaged than others by comparison. Here are the five largest cities in World War II: London, Manchester, Birmingham, Sheffield, and Leeds.
Many towns and villages across Britain had been bombed out during the Battle of Britain, so the government built shelters for people to go to in case another invasion occurred. These "Tube stations" provided refuge for up to 20,000 people each.
New York City was also heavily bombarded during the war but it wasn't until late 1942 that the first of several major attacks happened. The German submarine U-boat was responsible for most of the city's damage; they would travel along the east coast of America looking for ships to torpedo.
What were the two theaters of WWII?
Where was the Pacific Theatre in World War 2?
Where was the frontline in WW2?
What is the Pacific Theatre in WW2?
During World War II, there were two main theaters of operations: the European Theatre and the Pacific Theatre. The European Theatre of WWII spanned the whole continent, from the Atlantic to the Ural Mountains. Campaigns throughout the Middle East and North Africa were also included. The Pacific Theater covered all of Asia and part of Oceania.
In both theaters, the most common form of military engagement was the air battle. Wars were often decided by who had the more effective air force. In both theaters, the key weapon was the aircraft carrier, which could shoot down enemy planes while protecting its own troops from attack. Land battles were also important in both theaters; however, they usually involved larger armies than those found in either theater.
The largest army in history fought in the Asian-Pacific Theater. At its peak, the Japanese army consisted of approximately 80 million soldiers, making it the largest fighting force in history. However, due to poor leadership and attrition due to combat and disease, their actual size at the end of the war was about 70 million people. The American army during this time period consisted of approximately 200,000 men. However, due to manpower shortages, women were allowed to join the Army in large numbers. There were even some units formed entirely of African-Americans called "colored divisions."
In the European Theater, Nazi Germany and its allies fielded several huge armies that clashed on several occasions.
The territories of the Empire of Japan dominated the Pacific Theater of World War II. At its height, the empire included eastern China, Southeast Asia, Oceania's islands, and even the Aleutian Islands in North America. After Japan's defeat in 1945, these areas were returned to the control of their own governments.
The Japanese empire was ruled by the military government of Hirohito. The emperor did not want war but he could do nothing to stop his generals. By the time the war ended, over 20 million people worldwide had been killed.
The European Theatre was another large region of conflict during World War II. It was divided into three parts: Europe west of Russia, Europe east of Russia, and Africa. Germany was the only country to fight on two fronts for most of the war years; because of this, it suffered many losses at the hands of both the Allied forces and the Soviet Army.
After Hitler came to power in 1933, Germany became more and more obsessed with building planes, tanks, and other weapons of war. In 1937, Hitler started building up military strength by expanding the size of the German army. This made Germany popular among countries who wanted to buy its weapons. In 1939, Germany signed a treaty with Poland setting up an armed border between them. This caused France and England to go to war with Germany instead.
The Western Front was a World War II military theater that included Denmark, Norway, Luxembourg, Belgium, the Netherlands, the United Kingdom, France, Italy, and Germany. During WWII, military conflicts in southern Europe and elsewhere were typically regarded as distinct theatres. However today they are combined into a single front called the European Front.
The Eastern Front was another name for the Soviet-German Border during WWII.
The Arctic Front was the name given to the battlefronts in WWII between Russia and Finland/Germany.
The Africa Coast Line refers to the Allied and Axis forces on the African coast during WWII. The line ran from Gibraltar across Morocco, Algeria, Tunisia, Libya, and Egypt to Sudan and Ethiopia.
The Italian Front was the name given to the battlefront in WWII between Italy and Germany. The front extended from the Alps through northern Italy and down to Sicily where it ended at the Strait of Messina on the Mediterranean Sea.
The Japanese Front was the name given to the battlefront in WWII between Japan and China (mainland and Taiwan). The front extended from the Pacific Ocean to the Chinese border near Mukden (Shenyang) in Manchuria.
The Norwegian Front was the name given to the battlefront in WWII between Norway and Germany.
The Pacific War was a major World War II theater that spanned the Pacific Ocean, East Asia, and Southeast Asia, with key battles taking place as far south as northern Australia and as far north as the Aleutian Islands. It began on 9 August 1941 with the Japanese attack on Pearl Harbor, Hawaii.
In a campaign lasting nearly eight years, two nations fought for control of the Pacific: the United States and Japan. The war started out as a conflict between these two countries, but eventually involved many other nations, including China, the Philippines, Vietnam, Taiwan, and others.
At its beginning, the war appeared to be one between two military superpowers, but it soon became clear that both Japan and the United States were committed to fighting this war until no one could fight any more.
Japan's initial goal was to seize parts of Asia with which it had historical connections; specifically, islands controlled by other countries that provided access to the Pacific Ocean. The Japanese planned to build an empire that would include most of Asia.
To achieve this goal, they needed resources that could be used for manufacturing equipment and weapons. These included metals (especially steel), oil, and food products. In addition, they needed transport ships to carry their soldiers and supplies across the ocean.
Mary Ramer is a professor in the field of Mathematics. She has a PhD in mathematics, and she loves teaching her students about the beauty of math. Mary enjoys reading all kinds of books on math, because it helps her come up with new interesting ways how to teach her students.
Which two European countries dominated the colonization of Africa?
Author: Romeo Crouchet
What is the meaning of "allied power"?
Author: Susan Hernandez
What did the Marshall Plan propose?
Author: Paula Mckinnon
How did the Treaty of Versailles lead to the Second World War?
Author: Dennis Armstrong
What strategic plan did the US use to stop the advancement of the Japanese in the Pacific theater?
Author: Edgar Glover
What were the three groups that were against World War One?
By Sandra Henley
Which country declared war on Japan first before the US?
By Anna Hall
What two former European countries lost power after WWII?
By Barbara Molleur
What is a great-power war?
By Max Rose
Copyright © 2020 - 2022 BartlesVilleSchools Inc.