Proposed Asynchronous Control Flow Operators
From Erights
(Difference between revisions)
Jump to: navigation, search
m (Later: typo)
Line 10: Line 10:
"}"
"}"
</pre>
</pre>
-
When code is executed in other vat, the runtime checks that code closes only over deep frozen or bass by copy objects. If vat is not specified, the code is scheduled to be executed at later turn in this vat. The vatHandle is an expression that evaluates to capability of executing actions on the vat.
+
When code is executed in other vat, the runtime checks that code closes only over deep frozen or pass by copy objects. If vat is not specified, the code is scheduled to be executed at later turn in this vat. The vatHandle is an expression that evaluates to capability of executing actions on the vat.
==Using==
==Using==
Revision as of 19:49, 20 November 2007
TODO possibly there should be per-operator pages.
This page describes some not implemented asynchronous control flow operators that could simplify creation of asynchronous application. The intial set of operators is based on experience of implementing the AsyncObjects framework and Sebyla project design.
Contents
Later
This is an extremely simple construct. But is useful when it is requited to execute code in this or other vat at some later time. In AsyncObjects this constructs is implemented using AsyncAction class, and it was used quite a lot in applications.
 "later" ( "(" <vatHandle> ")" )? "->" "{"
 <code>
 "}"
When code is executed in other vat, the runtime checks that code closes only over deep frozen or pass by copy objects. If vat is not specified, the code is scheduled to be executed at later turn in this vat. The vatHandle is an expression that evaluates to capability of executing actions on the vat.
Using
This is a very simple construct that helps with resource management. The syntax is like the following:
 "using" "(" ( ("def" <varName> ":=" )? <eventualOpenExpression> )+ ")" "->" "{"
 <statements>
 "}"
The operator is executed as the following:
 1. All resources are opened in the specified order. If expression returns promise, the next expression is not executed before first one complete. If <varName> is specified for resource, the resolved resource is assigned to it and it can be used in subsequent expressions and <statements>.
 2. If opening of some resource fails, the proposed result of operator is that failure.
 3. Statements are executed, the proposed result of operator is value of last expression. If the result is promise, the operator waits until it is resolved.
 4. All opened connections are closed, in reverse order. It includes connections that has not been named. If some close operations fail, the most top level one is returned.
Example:
using(def r1 := factory1<-openConnection, def r2 := factory2<-openConnection, lock<-lockEnter()) -> {
 doSomething(r1,r1); // assuming that lock is being held
}
The constructs expands to the following:
when(def r1 := factory1<-openConnection()) {
 when(def r2:= factory2<-openConnection()) {
 when( def tmpVar := lock<-lockEnter()) {
 doSomething(r1,r1);
 } finally {
 tmpVar<-close();
 }
 } finally {
 r2<-close();
 }
} finally {
 r1<-close();
}
Seq
The are several form of seq operator. The basis form is the following.
 "seq" ("def" <varName> ":=")? "{"
 <statements-1>
 "}" ( "then" ("def" <varName> ":=")? "{"
 <statements-i>
 "}" ) * ( "catch" "(" <exceptionVar> ")" "{"
 <catchStatements>
 "}" )? ("finally" "{"
 <finallyStatements>
 "}")?
The code is executed like the following:
 1. The code in <statements-i> is executed sequentially. The next code block is executed only if promise returned from previous code block is resolved. If the block yields near value, the next block is executed on the same turn.
 2. The result of operator is the value of the last block.
 3. If some of blocks fails, the next blocks are not executed, and control is passed to the catch section and the result of operator will be the result of executing catch statement. If there is no catchSection, the operator fails with expression.
 4. If there is a finally statement, it is executed after last block or after catch statement. If it fails, the entire seq expression fails with the same exception.
Example:
 seq def a := {
 doA()
 } then {
 doSomething(a)
 } catch(e) {
 print(e)
 throw e
 } finally {
 cleanup()
 }
Example is expanded as the following:
 when(someTempResolvedPromise) {
 def aVow := {
 doA();
 }
 when (def a := aVow) {
 doSomething(a);
 }
 } catch(e) {
 print(e)
 throw e
 } finally {
 cleanup()
 }
There is also a short form:
 "seq" "(" ("def" <varName> ":=" )? <eventualExpression> ( "," ("def" <varName> ":=" )? <eventualExpression> )* ")"
The comma separated expressions are executed in sequence. The named values are available at later expressions. The are three loops forms:
 "seq" "do" "{"
 <statements>
 "}" "while" "(" <eventualExpressions> ")"
 "seq" "while" "(" <eventualExpressions> ")" "{"
 <statements>
 "}"
 "seq" "for" <pattern> "in" <collection> "{"
 <statements>
 "}"
The semantics is the same as for normal loops. The next iteration starts only after previous completed. TODO it might be useful to keep intermediate results of previous iteration and to make them available in the body of the loop and conditions. On other hand, it is quite easy to use basic seq operator to achieve the same result. TODO "seq for" needs support for eventual iterators.
All
This operator allows execution of eventual expressions in parallel. The basic form is the following:
"all" "{"
 <expression>
"}" ( "and" "{"
 <expression>
"}" )+
The short form is the following:
"all" "(" <expression> ( "," <expression> )+ ")"
Semantics is the following:
 1. All expressions starts to be executed.
 2. If all expressions completed successfully, a list of results is returned.
 3. If at least one expression fails, an exception that contains generated results and failures is generated.
Example:
all {
 first()
} and {
 second()
}
It is translated like the following:
{
 var wereFaults = false;
 var results = makeFlexList();
 results.setSize(2)
 var faults = makeFlexList();
 faults.setSize(2)
 def vow1 := seq def r: = {
 first()
 } then {
 results[0] := r
 } catch(e) {
 wereFaults = true
 faults[0] := e
 null
 }
 def vow2 := seq def r: = {
 second()
 } then {
 results[1] := r
 } catch(e) {
 wereFaults = true
 faults[1] := e
 null
 }
 when (def v1:=vow1, def v2:=vow2) {
 if(wereFaults) {
 throw makeAllFault(results,faults)
 } else {
 results.toConsList()
 }
 }
}
There is also a loop form that returns conslist of results.
"all" "for" <pattern> "in" <collection> " "{"
 <expression>
"}"
Personal tools
more tools


text:
OVERVIEW: Through its Sustainable Development Program, the Rockefeller Brothers Fund (RBF) supports organizations that work to advance global stewardship and climate change solutions.
IP TAKE: RBF takes a broad approach to climate change, funding a variety of approaches to this challenge. And it's not afraid to get involved in a political fight or take a few risks with its grantmaking.
PROFILE: The Rockefeller Brothers Fund, as the name suggests, was established in 1940 by several members of the Rockefeller family, which includes Nelson, Laurance, Winthrop, and David Rockefeller and John D. Rockefeller III. The fund is not affiliated in any way with either the Rockefeller Foundation or the Rockefeller Family Fund.
RBF makes climate change related grants through its Sustainable Development program, which seeks to advance "global stewardship that is ecologically based, economically sound, socially just, culturally appropriate, and consistent with intergenerational equity." To advance solutions to climate change, RBF pursues strategies that advance the green economy agenda, advocate for increased public and policymaking related to climate change, and those that campaign to reduce fossil fuel or carbon intensive energy reliance. What's notable about RBF's climate grantmaking is the range of interests pursued by the fund. Its interests include ocean acidification, more efficient buildings, the national security dimension of climate change, and the all-important big question of how capitalism must adapt to the imperative of ecology sustainability.
RBF's Sustainable Development grants range from $200,000 to $500,000. However, the fund does not make grants to a large number of climate change organizations, and the ones that do receive RBF support tend to be pretty big. To get a sense of the breadth of this funder, explore its searchable grants database.
RBF accepts grant inquiries throughout the year.
- Search for staff contact info and bios in PeopleFinder (paid subscribers only.)

source: openbmb/Ultra-FineWeb


text: A customised African release of CAST (Computer Assisted Statistics Textbooks) has provided much-needed access to a series of modern statistics textbooks for many students in Africa. The recent addition of a collection of interactive CAST exercises has proved valuable in strengthening the learning of statistical concepts by students. A new CAST testing system has been developed to present the exercises as formal test questions. Students can practice beforehand with similar randomised exercises and can get immediate feedback as soon as the test is finished. This paper describes a pilot study in Kenya to evaluate the added benefit of using the CAST tests and is its first evaluation. Use of these tests is linked to an on-line course called "Statistics Made Simple". The effectiveness of the tests is discussed.

source: HuggingFaceFW/fineweb-edu


Planning a Short-term Healthcare Mission Project
Often nurses are asked to organize a healthcare outreach as part of a short-term mission trip. If done well, these outreaches can provide meaningful opportunities to model how Jesus cares for the whole person. However, lack of proper planning and relationships with the host community has the potential for creating setbacks at best -- or doing harm at worst.
We will focus on planning the healthcare aspect of a mission project. If you are being asked to organize an entire short term project, there a many websites, books and resources that can assist you in the planning, travel, orientation and debriefing programs. Likewise there are many short-term mission organizations that are doing healthcare. NCF has chosen to partner with Global Health Outreach, the short-term mission arm of Christian Medical & Dental Associations.
Here are some important specific questions to ask when planning a healthcare missions program.
What is the motivation for including healthcare as a part of this missions program?
Motivations for doing healthcare missions programming are many and vary from trip to trip. Sometimes there is an overwhelming health need presented that can easily be addressed by a healthcare professional on a short-term program. Other times a healthcare outreach supplements an indigenous church's effort to reach the people in their community. It is also true that a motivating factor for healthcare professionals is a need and desire to help those who are less fortunate. This is part of who we are and our spiritual gift of caring.
For clues on motivation, look at whose idea it was to include healthcare as part of the missions program. Did the idea originate because there were healthcare professionals on the team who wanted to do healthcare? Did the partner in the host country request a healthcare program? How will healthcare contribute to the long-term impact of the mission in the community?
Spending time examining motivation prior to going on a mission trip is always instructive for a person's own spiritual journey. Do you have an invitation from a host partner with a specific goal that can be better achieved with participation from a nurse? Do you have confirmation through prayer and Bible study that God is leading in the cross-cultural experience? A confluence of both is a good indication that the motivation for participating in a healthcare missions experience will lead to spiritual growth for the participant as well as serving the host community.
What healthcare needs are present in the community that is to be served?
Before going on a healthcare mission trip, it is good to know what type of healthcare programming is needed. It is also important to recognize that there are limitations to what a team of healthcare professionals can do on a short-term trip. Caring for people who have long-term healthcare needs requires a plan for follow-up services so that their ongoing healthcare needs are addressed. Many countries in tropical regions present diseases that are not frequently seen in the United States. Nurses should do a little advanced preparation to become familiar with "common" diseases seen in the country where the mission will take place. Management of these conditions varies based on the resources available in country. Learning the management and treatment protocols of the host country will insure that people receive a standard of care that is in concert with the resources available in the country and is honoring to God and the project.
As an alternative to providing curative healthcare services, nurses should consider:
 - Surveying the community for the commonly presented health problems that can be used for healthcare planning. Doing a community assessment with baseline information on disease prevalence is helpful to the community in planning for their healthcare programming.
 - Providing appropriate health education that uses sound non-formal education methodology. Many health problems can be addresses through health education. Non-formal education methodology focuses on having the learner own the message and commit to behavior change.
 - Equipping indigenous healthcare professionals with the knowledge and skills they need to provide excellent healthcare after the team leaves are considered preferable options for a short-term healthcare missions program. Many nurses do not have access to the continuing education programming and welcome the opportunity to learn about current practice. The learning should be mutual. Often national nurses have expertise in areas that nurses in North America do not have.
Who is addressing those needs in the community now? Are there indigenous healthcare professionals with whom you can work? Who will follow up after the project ends?
Your team will only be there for a short time. Short-term teams have limited understanding of the host culture and language ability. People in the target area who have health needs have them met by someone when you are not there. Identifying these local providers and working together with them can be encouraging to local provider, mutually instructive, and provide an endorsement of their care when you leave. They know their community and their community has a level of trust in them. It's wise to build collegial relationships with them to provide quality healthcare for the community.
What are the legal requirements for practicing professionally?
We require healthcare professionals from visiting countries to have proper credentials in order to practice in the United States. herefore we should expect to submit our professional credentials to the host country and meet their standards for practice. It is important to ask the healthcare professionals in the host country about requirements. Pastors, educators, and other missionaries who are not healthcare professionals may not know what the legal requirements are for professional practice. The International Council of Nurses lists the governing nursing boards for each of the member countries. If there is no nurse or healthcare professional in the host country to assist you, you may want to contact their nursing board directly.
What are the legal requirements for importing healthcare supplies and pharmaceuticals?
Basic equipment (stethoscopes, sphygmomanometers, thermometers, etc.) may be in short supply and should be brought with you. More complicated diagnostic and medical equipment that requires electricity needs to be carefully scrutinized for voltage, cycling, and availability of spare parts. The U.S. government may have restrictions on exporting some equipment to certain countries and the host country may impose import duty.
Many countries have an essential drugs list and requirements about packaging, labeling and expiration dates for pharmaceuticals. Often the commonly used drugs are available in the country. Consider purchasing them there to support the local economy and insure a continuous supply when you leave. Be aware that many common drugs may have different names in other countries. When groups bring in large quantities of pharmaceuticals and distribute them for free, that could interfere with the ability of the local pharmacy to stay in business and continue to provide needed medications for the community. WHO has recommended standards for donation of pharmaceuticals and medical equipment.
How do the care recipients understand western medicine?
Every culture has a worldview that explains concepts related to cause of disease, the place of suffering, the spiritual dimension of life, and what happens after death. The Christian worldview provides what we believe to be the God's truth on these issues. People of different cultures may understand these concepts differently. They may try to fit western medicine into their cultural understanding. For example, people who are accustomed to going to a traditional healer who wears special clothing and performs various magical incantations to find out which ancestor is causing their illness may see western healthcare professionals in a similar manner, with their professional dress, diagnostic testing, and prescriptions. A lab coat, stethoscope, and colored pills are viewed similarly to a traditional healer. Also, many cultures do not think either/or but both/and. Hence, they will seek both the traditional healer and western healthcare. Healing is then attributed to both the traditional healer and the western healthcare provider.
What will be the focus of the healthcare mission? Health promotion and prevention of disease? Curative care? Or a combination of prevention and cure?
Jesus cared for people holistically. He cared about their physical well-being as well as their relationship with God. Sometimes he cured a disease and then addressed their sins. Other times he forgave their sins and then healed their bodies. Keeping people well by preventing disease and treating problems early is one way of caring for people holistically. Immunization programs, health education to prevent common illnesses, and screening for health problems are important health programming and can be combined with the gospel message. But when people are sick and suffering, it is also important to address the health problem that is presented in order for the gospel to be heard and received. The purpose of the healthcare mission project may influence the focus of the project. Deciding on the focus of a health program will determine the type of healthcare personnel, equipment, and resources required for the mission.
Will the project include teaching? Who will be taught? What will be taught?
One of the best gifts a healthcare professional can give is the knowledge that they have. Nurses are accustomed to teaching patients and families about health. Nursing in countries with limited resources requires a focus on healthcare education. Language and cultural differences can be limiting factors for effective health education. Working with local nurses who know the culture and language will make healthcare education efforts more effective and can be informative for learning local health practices.
When teaching nursing practice to national nurses, it is important to approach the educational process from a learner stance. Nursing in countries with limited resources is practiced differently by necessity. Asking about what the current practice is -- and why -- can prevent a rush to judgment about the standards of nursing practice. Helping national nurses to think through clinical problems and potential ways of addressing them allows them to critically look at their nursing practice with the benefit of a colleague from North America. It affords opportunities to develop a trust that can become the basis for a relationship with a national nurse and lead to furthering Christian nursing in both the host and sending countries.


method, be sure to take things one step at a time with your rat. If you start off baths early in your pet rat's life, bathing will get easier over time. Just remember—baths don't have to be stressful for you or your rat.
Gadget's tail is far less dirty than Patches' tail, as she is many months younger.
Fun Facts About Rats
 1. Rats know how to swim.
 - True
 - False
 2. Rat's have a poor sense of balance.
 - True
 - False
 3. Rats are one of the most intelligent pets.
 - True
 - False
 4. A rat's tail helps regulate body temperature.
 - True
 - False
 5. Rat's are unable to vomit.
 - True
 - False
Answer Key
 1. True
 2. False
 3. True
 4. True
 5. True
Questions & Answers
Question: Why is my rat breathing heavily?
Answer: What kind of bedding are you using for your rat? Things like cedar wood shavings can bring on respiratory infection. Use paper bedding instead. Some people also line the cage with fleece, but this has to be frequently washed. Rats can also get sick if it's too cold, or of the cage is in a drafty area. Either way, I would find an exotic vet in your area and bring the rat in. If it has a respiratory infection, it will need antibiotics to treat it. Respiratory illness does not get better on its own.
Question: What food can I give my picky rats?
Answer: Will they not eat rat blocks at all? There are seed diets out there, but they aren't very healthy and can be fattening. I know some people actually make their own rat diets by combining different food items, but I've never done that. Have you tried different brands of foods? It could be they don't like the taste of a particular brand of block.
Question: There is no pet shampoo in our pet shops. Is it OK to bathe my mouse with dish soap or sulphate-free baby shampoo? This mouse has a permanent head tilt from a babyhood ear infection, so he can't clean himself properly.
Answer: Dawn dish soap would be okay, but you'd only need the tiniest amount. I'm unsure about baby shampoo.
Question: Is it OK to give your rat a bath if the water is contaminated/has a chlorine smell?
Answer: Is it your tap water that smells like chlorine? If it is a strong smell and enough to concern you, could you use room temperature bottled water instead? Many pet stores also sell waterless shampoo for small pets that you just spray on and rub in, or grooming wipes for a quick clean.
Question: How do I feed my rat?
Answer: You can keep a full bowl of rat food in its cage. They tend to eat when hungry, or hoard food in a special spot.
Question: How many times should I wash my rats? Should I give them a bath once a week or like every day?
Answer: Rats are very good at keeping themselves clean, and do not need to bathed constantly. If they get especially smelly, every once in a while is fine. When my rats got older and cleaning themselves was more difficult, I washed them more often.
Question: is there any way to re-introduce my rat to water?
Answer: You could try only filling up the bathtub slightly, so there is hardly any water, and increase the amount over time. My rats never enjoyed water, so I don't have the best hands-on advice!
Question: What do I wash my rat with?
Answer: Most pet stores sell small animal shampoo - if your rats have an aversion to water, you can try waterless spray shampoo.
Question: What happens if I have had my rats for over two years and they hate the bath tub? I know I could use the dry shampoo stuff but I don't know where to find it.
Answer: My rats have always hated getting wet. Do you have any pet stores in your area? Or can you order the dry shampoo online?
Question: Can I use small animal grooming wipes on my rats?
Answer: Yes, small animal grooming wipes are fine for rats. I wouldn't wipe them all the time though, to avoid drying out their skin.
Jessica Peri (author) from United States on August 25, 2020:
_USER_ You don't have to wash your rats much at all. If they get accidentally dirty, or have trouble cleaning themselves due to age, baths may become more necessary. Rats are otherwise very good at cleaning themselves. If you'd like to get them used to water, you can draw them a warm water bath without shampoo.
Miapegasi on August 09, 2020:
I have four male rats around 5 weeks old. I'm thinking about giving them their first bath. Should I use shampoo the first time I bathe them or no? How many times should I wash my rats a week?
Jessica Peri (author) from United States on January 10, 2020:
If you had a rat live to 4 years, you've been doing something right! Most rats don't have such a long lifespan. The oldest I ever had was between 2.5 and 3 years old. But you can always message me with more specific questions!
Tinariva on January 04, 2020:
any and alll info. on rats is very much appreciated, my last boy just passed he was going on 4 yrs old so after 2days of filling up crossword grids with cuss words, my b.f bought me a baby Russian blue i just want to be more knowledgeable this tme thnx!
Jessica Peri (author) from United States on September 12, 2019:
_USER_ I've read that they are actually really great swimmers! I never tried to teach mine, though - they always freaked out at the introduction of water.
Brooke on September 05, 2019:
If you fill your tub with luke warm water, just about an inch, and plug the bottom of the tub, the rats will learn to swim! Just bring them in slow, and never put shampoo into the water, because they might swallow it!
Jessica Peri (author) from United States on November 23, 2018:
_USER_ That's great! Mine would destroy our sheets, run around all night, and probably sneak onto the floor.
Dave on November 16, 2018:
I still have a rat who just spent the night with me and snuggled into my sheets with me
Jessica Peri (author) from United States on December 21, 2017:
_USER_ Rats are so sweet, I'm not surprised to hear you've never been bitten! Thanks for reading.
Emma on December 16, 2017:
Rats are not as much trouble as people hype about. I have an Autistic grandson I'm raising and 5 other grandbabies in and out at different times,ages between 13 and 2 months. I've never been bit. Nor has my grandchildren.I supervise. And all is well.
Jessica Peri (author) from United States on June 07, 2013:
Thank you! I love my rats to pieces. Introducing them to friends and seeing their reactions is always fun.
moonlake from America on June 06, 2013:
Great information. I had a pet rat when I was a kid. Voted up.
Related Articles


text:
The Mushroom Coral is common and widespread and can occur in dense clusters on reef flats and slopes. The most important known threat for this species is extensive reduction of coral reef habitat due to a combination of threats. Threats of habitat loss, coral bleaching, and the collection of the corals for aquarium and curio trade have made it listed as Near Threatened. Because of ocean acidification and reef degradation it will be important to keep tabs on its survival. Coral disease is a serious threat to coral reefs worldwide and a major cause of reef deterioration. The main predator for the mushroom coral is the crown of thorns starfish. The mushroom coral is found on back reef, flat reef, reaf slopes, and lagoons. This is a solitary, freeliving coral found at depths of 1-20 meters.
Location: Animal Not Currently At Zoo
Indo-west Pacific in the Red Sea and Gulf of Aden, Indian Ocean, and around Australia, South-east Asia, southern Japan and the East China Sea.
This species is found on back reef, flat reef, reef slopes and lagoons. It can occur in very dense clusters on reef flats and multi-species fungiid assemblages on slopes.
fishing, commercial/residential development, invasive species and diseases
The growth of the mushroom coral depends on the reef, nutrients, and predators. Being asexual, there is not an actual gestation time.
It is thought that the mushroom coral lives more than ten years. The maturity of most reef building corals typically is three to eight years and the average generation length is ten years.
It is always attached as a juvenile and free living as an adult, and as a result it is mobile. It is a good competitor and can live on a variety of substrata.
It is a good asexual reproducer and often occurs in clusters as a result. The species is one of the first colonizers to settle in blasted areas and thrives in disturbed environments.
Nutrients found in the water column around the coral.

source: m-a-p/FineFineWeb


text:
Peter R. Griffin, an international lawyer who is the managing director of Slaney Advisors, a consulting firm based in London, points out an interesting fact showing just how much Germany can call the tune if trouble arises. Within the maze of documents explaining the Target 2 system, there is the following:
1. The bilateral relationship between the E.C.B. and participants in TARGET2-E.C.B. shall be governed by the law of the Federal Republic of Germany.
2. Any dispute arising from a matter relating to the relationship referred to in paragraph 1 falls under the exclusive competence of the courts of Frankfurt am Main, without prejudice to the competence of the Court of Justice of the European Communities.
Not being an international lawyer, I have no idea what it means to give one court "exclusive competence" — another way of saying exclusive jurisdiction — but then to add that that statement is "without prejudice" to the competence of another court.
Still, it sounds as if it is Germans who will judge any disputes if a central bank does default on loans, or if the Bundesbank tries to put a halt to the gigantic loans it is being forced to make.
"One might have expected the 'cornerstone' of monetary integration to be subject to European law and the European Court of Justice," says Mr. Griffin. "It raises the spectre of the various European central banks fighting each other and the E.C.B. in a German courtroom, under German law."


text:
The Food Week in Jakarta, that took place last week was a good example of the contributions done by Danida. Most of what DBP does, however, is to assist with Danish and Indonesian companies collaborating in exciting partnerships that contributes to development in Indonesia.
The partnership between the architecture firms AG5 (Denmark) and PDW (Indonesia) is one of these interesting collaborations. Together they have designed the office tower "Gran Rubina", which is currently being built in the up-and-coming EpiCentrum area in Kuningan, Jakarta.
What makes this impressive building stand out from other new building projects in Jakarta, is the full commitment to sustainability and energy efficient solutions. The low energy consumption (30 % less than average), minimized heating from the sun, sustainable construction materials and waste management, and the special roof gardens means that the partnership is a pioneer of "green building" in Indonesia.
The project does not go unnoticed internationally either, and last month the design won the prestigious International Property Award.
The Danish Minister for Trade and Development, Mogens Jensen said, "The award confirms that in Denmark we are very strong within sunstainable bulding design, and it is evident that we must export that knowledge to the benefit of both the developing countries and Denmark".
See below for a video produced by the Danish Embassy in Jakarta, which explains more about the project and why it is important to think green when we think buildings:
Source: Danish Embassy in Jakarta.


text:
Pediatric Disclosure Materials: Booklet 1—How to Keep Healthy
How to Keep Healthy is the first in a series of four booklets designed to help adults facilitate health-related discussions with children and adolescents. It was written to be used with children from 2 to 6 years of age, an age when children may ask many questions about why they go to the clinic or why they have to take medicines.
The booklets are available for download in color and in black-and-white. Accompanying cue cards offer guidance for health care providers to use in introducing these booklets to caregivers.
The other booklets in this series include:


text:
The Future of Salmon and Trout Stocking in Lake Michigan
Five species of salmon and trout support a world-class recreational fishery in Lake Michigan. Stocking has played an important role in maintaining the balance between predators and forage fish, such as the non-native alewife, since the late 1960s. If too many salmon and trout are in the lake, forage fish decline and salmon starve or fall prey to disease. If too few salmon and trout are in the lake, the non-native alewife could foul beaches and affect native species populations.
Ongoing research is being used to investigate the possibility that changes to stocking policy could improve fisheries and limit the risk of predator-prey imbalance. Fisheries managers in Michigan, Wisconsin, Illinois and Indiana will set a stocking policy for Lake Michigan salmon and trout by fall of 2012.
LAKE MICHIGAN SALMON STOCKING SURVEY RESULTS
Survey results are now available and are being considered along with biological data and other factors as managers move toward a decision on future stocking policy.
See: Survey Results
Lake Michigan Salmon Stocking Workshop
Lake Michigan College, Benton Harbor, Michigan
Saturday, April 14, 2012
This half-day workshop was free and open to the public. Participants learned more about specific options for stocking policy and had the opportunity to speak with fisheries managers about the future of Lake Michigan fisheries. Check out the recorded webinar for more details.
- Lake Michigan Salmon Stocking Strategies Briefing (PDF)
Includes overview of collaborative decision-making process, status of fishery and forage base, and stocking options under consideration.


text:
WWF: Water quality in Mendalam River, Heart of Borneo, now has significantly improved
PONTIANAK (18/10) - The four years analysis on water quality of Mendalam River, Kapuas Hulu, West Kalimantan since 2009 until 2012, done by WWF-Indonesia West Kalimantan Program in collaboration with ICRAF, LIPI and PDAM Tirta Dharma (state tap-water company), showed a significant decrease in water turbidity and sediment concentration in Mendalam River.
"This study showed a decrease in the average concentration of turbidity, from 13.2 NTU in July 2009 to 8.4 NTU (36.4%) in the measurement from June to July 2012. Trend of sediment concentration indicated a decrease approximately 41.6%, from 26.4 mg / liter (2009) to 15.4 mg / liter in 2012," said Iwan Ridwansyah, MSc, researcher from the Indonesian Institute of Sciences (LIPI).
"To address the quality problem of the river in West Kalimantan Province, WWF-Indonesia, CARE and IIED, supported by WWF Netherlands DGIS, started since 2006, have been working together through implementation of EPWS Program in Mendalam River, Kapuas Hulu," said M. Hermayani Putera, West Kalimantan Program Manager of WWF-Indonesia.
Emanuel Haraan Ryanto, Director of PDAM Tirta Dharma Kapuas Hulu said that the study conducted in Mendalam River since 2007-2009 has informed that around 4-15 tons / year of sediment resulted from the river. At least 37 landslide areas with more than 100 meters depth occurred on the banks of the river, as well as more than 76 other landslide locations that are less than 100 meters. Forest cover in the Mendalam currently remains only about 40%.
"The river supplies water for the PDAM Tirta Dharma in Putussibau. Turbidity of the water in this river is now reaching up to 16 NTU (Nephelometric Turbidity Unit), far above the minimal score for drinking water standards according to the regulation of the Indonesia Ministry of Health, which is 5 NTU. If this trend maintains, it will have an impact on improving the quality of tap water treatment, eventually processed tap water distributed by PDAM will be safe for consumption and meet the minimum standards set by the Ministry of Health. We thank you for the efforts made by the WWF to improve the environment, particularly in Mendalam sub-watershed. This will be very useful for people who use tap water," added Emanuel.
During the implementation of EPWS program, restoration has been done in the area of landslides along the banks of the Mendalam River. Mapping of critical areas, planting 140,000 cultivated tree types such as cocoa, rubber (local and superior quality), and also other types of useful local plants such as belian, tengkawang and gaharu. Restoration covered 5 villages totalling approximately 212 hectares. In addition, the program also helps to improve the capacity of the community through several activities such as comparative study on rubber management to one state-owned plantation company in Indonesia (PTPN XIII) in Sintang, training for plantation (nursery to planting), training on measuring water discharge, water sampling, and measurement of the landslides volume. The program has also installed three units of automatic rain gauge and 2 units of automatic water level recorder. All activities of monitoring and assessment involved local communities in 5 villages on the banks of Mendalam River.
Zainal AM, the Head Village of Nanga Sambus, said that people in Mendalam sub-watershed area have hope that the PES program can be successfully realised, which will motivate them to continue to maintaining the river quality, particularly Mendalam River, and can improve revenue of communities who lives near the river. "Let's protect together. If the people who live in the upper stream protect the area, this will yield good impact to people downstream. They will appreciate the restoration effort done by upper stream people," he added.
"We welcome the cooperation of the parties in integrating the whole comprehensive aspects involving economic, environmental and social development in the development of the sub-watershed. Hopefully this can be an example for other regions, "said Drs. Suparman, Head of Kapuas Hulu Local Planning Agency.
"With the decrease in water turbidity and sediment concentration, it has indicated that there is a positive impact of the activities carried out by EPWS Program in Mendalam River. To enhance the broader impacts, we recommend this work to be extended in two other rivers, the Sibau River and Kapuas River," said Hermayani.
---- end ----
For more information, please contact:
Iwan Ridwansyah, MSc.
PDAM Tirta Dharma Kapuas Hulu
Slamet Sugianto, Amd
Notes for Editors:
Forest ecosystems provide a wide range of environmental services benefiting public. Services include the services of water, carbon, biodiversity and landscape beauty. Report of the Millennium Ecosystem Assessment (2005) stated 60% of the world's ecosystem services have been degraded more rapidly than the ability to fix it.
Particularly in Indonesia, with 62 watersheds covering an area of 18.5 million hectares, now are in critical condition. Conditions that cause a decrease in reserves of water resources, fluctuations in water discharge, as well as increasing the rate of sedimentation and erosion. The impact of these conditions will increase the cost of drinking water treatment and worsen the quality of water services and such a disadvantage for river transportation users.
About EPWS Program
In 2006, a partnership was established between the three international agencies to explore the business aspects of PWS (Payment for Watershed Services). The project is called "Equitable Payments for Watershed Services". Activities implemented through two phases.
Phase I: Building the Business Case (2006 - 2009)
Phase I goal is to prepare and build a real business case for buyers and sellers of PWS that are suitable for targeted project sites. This approach is essential to convince potential buyers and sellers that PWS mechanism that will be implemented is based on ecological and economical condition. At the end of Phase I, it is considered a successful business between buyers and sellers if agreement of cooperation in each location is signed. Activities in Phase I include baseline studies on: hydrology, institutions, livelihood and the business case (cost-benefit).
Phase II: Implementing Equitable Payments for Watershed Services (2010 - present)
Implementation phase will deal with relevant partners at the local, national and international, private sector, and government agencies. Expected result in Phase II is successful implementations of PWS mechanism in all targeted project locations, sustainable nature resource management, and improvement of community livelihoods. Activities in Phase II include restoration, Tembawang local tree enhancement and hydrology.
WWF is an independent global conservation organization, established in 1961 in Switzerland, with almost 5 million supporters and networks in more than 100 countries. WWF has been present in Indonesia since 1962 for one-horned rhinoceros project in Ujung Kulon, became a foundation in 1998 and present in more than 25 working areas in 17 provinces.
WWF-Indonesia's mission is to save biodiversity and reduce the ecology impacts from human activities through: promoting strong conservation ethics, knowledge and conservation efforts in Indonesian people; facilitating multi-stakeholders efforts in biodiversity protection and ecological process at the eco-regional scale; policy advocacy, law enforcement to support conservation; and encouraging conservation for human welfare through sustainable utilization of natural resources.
For further information, visit _URL_ or _URL_
Heart of Borneo (HoB)
The Heart of Borneo covers more than 22 million hectares (220,000 km2) of equatorial rainforest across the countries of Brunei Darussalam, Indonesia and Malaysia. One of Asia's last great rainforests, it includes some of the most biologically diverse habitats on earth, and is one of only two places on earth where elephants, orangutans, rhinoceros and clouded leopards share the same territory. In the past 15 years, more than 500 new flora or fauna species have been discovered, at a rate of more than three per month.
Borneo's cultural diversity is as distinct and varied as the island's animal and plant life. In Kalimantan (Indonesia) alone, 142 different languages are believed still to be in use today. Many people depend directly on the forest for edible and medicinal plants; fish; meat; construction materials and water. As the headwaters of the island's major rivers lie in Borneo's central highlands, protection is critical to ensuring reliable clean water supplies to a large number of human settlements, and the thriving industries that have developed in coastal urban centres.
Heart of Borneo Declaration
In February 2007, the governments of Brunei Darussalam, Indonesia and Malaysia signed the Heart of Borneo Declaration to protect an area of more than 220,000 square kilometres in the centre of the island and bordering all three countries. Together they emphasised the fact that these tropical rainforests have strategic, global, national and local functions, not only for citizens of these three countries but for the global human race. The declaration is supported under important regional and international agreements such as Association of East Asian Nations (ASEAN), Brunei, Indonesia, Malaysia, Philippines East Asia Growth


Call for 'direct physio access'
By Prof Karen Middleton
Chartered Society of Physiotherapy
image copyrightScience Photo Library
Accessing a physiotherapist on the NHS usually involves seeing a GP and getting a referral.
But, in this week's Scrubbing Up, Prof Karen Middleton, chief executive of the Chartered Society of Physiotherapy, says it would make much more sense - for both patients and the health service - if patients could have direct access to an NHS physio.
If you ring your local surgery, you can probably get an appointment with the GP or a nurse.
But if you have a common problem such as back or neck pain, should you also be able to see a physiotherapist?
We think so - as do increasing numbers of GPs, who are bringing in physiotherapists to work alongside them in their practices.
These aren't physios the GP refers to - the physio is a patient's first point of contact who they see instead of the GP.
Up to 30% of a GP's caseload can be musculoskeletal (MSK) problems, and physios are the experts in these conditions - so it makes complete sense for them to see those patients.
For patients, the benefits are numerous - it speeds up access to the expertise they need, it reduces the number of appointments they must attend and for some, it even spares them having to undergo surgery later on if a problem is dealt with sooner.
Minor to chronic
At present, the most common route into NHS physiotherapy in England is via a GP referral.
(In Scotland, you can go direct to an NHS physio in all areas, and this is also available to patients in two-thirds of Wales - England lags far behind. It's also the way into private treatment.)
This means waiting for a GP appointment, then waiting for a physio assessment, then, if needed, waiting for a follow-up.
The longer someone waits for treatment, they greater the likelihood is that their relatively minor condition becomes chronic.
So why not see the physio in the first instance?
A physio can assess and diagnose a patient at that first appointment so that their rehabilitation begins immediately.
In many cases, they will just need advice on what to do and the problem will go away.
This then frees up places on the waiting list for people who genuinely need further treatment.
That makes it a better system for patients. But it's a preferable one for GPs as well.
Red flags
image copyrightScience Photo Library
Reducing this part of their workload frees them up to concentrate on more serious cases that require a medical diagnosis and with the pressures faced by GPs so well-known, it's understandable why this is an approach that's gaining traction with them.
You'd also need to be living on Mars - or perhaps just outside the UK - to not know of the urgent and enormous problems the NHS faces financially.
The health service has been tasked with finding savings of £22bn by 2020, a vast sum that is placing a huge strain on the ability to continue delivering quality services.
Our modelling shows that if even a fifth of the patients seeing their GP for an MSK problem saw a physio instead, it would save at least £525m a year for the NHS.
That's a conservative estimate, by the way, as it looks only at the savings from that initial appointment.
Additional savings would come from reduced follow-up appointments, fewer tests such as X-rays and scans and lower numbers of referrals on to secondary care in hospitals.
For us, the frustrating thing is that opposition to this approach is often based on two myths.
The first, that patients are not safe being seen by a physio without a doctor assessing them first.
This is complete nonsense - unless you believe that every private patient, every patient in Scotland and those in two-thirds of Wales - where you go direct to a physio -are at risk.
Physios are trained to identify what we call red flags - evidence of serious illness - and would always send those patients on to the most appropriate medical professional.
Research has shown virtually no red flags are missed by physios - so patients can be assured that there is no truth whatsoever in this myth.
Secondly, it's claimed that every Tom, Dick and Harry will flood waiting rooms when they discover how easy it is to get physio.
Again - complete bunkum.
For a start, Tom, Dick and Harry have better things to do than see a physio about a minor twinge they got lifting the shopping out of the car.
This is also backed up by the evidence, which shows no increase in demand over time in services where patients can go direct to the physio.
And actually, overall numbers could drop if patients are seen sooner, and therefore more effectively, so they need fewer appointments.
So it's clear that a solution exists that yields benefits for patients, GPs and the NHS as a whole.
It's right before our eyes - and the important thing now is that it is implemented.
Related Topics
Related Internet Links
The BBC is not responsible for the content of external sites.


text:
Boulder trails are common to the interior of Menelaus crater as materials erode from higher topography and roll toward the crater floor. Downhill is to the left, image width is 500 m, LROC NAC M139802338L [NASA/GSFC/Arizona State University].
Most boulder trails are relatively high reflectance, but running through the center of this image is a lower reflectance trail. This trail is smaller than the others, and its features may be influenced by factors such as mass of the boulder, boulder speed as it traveled downhill, and elevation from which the boulder originated. For example, is the boulder trail less distinct than the others because the boulder was smaller? What about the spacing of boulder tracks? The spacing of bounce-marks along boulder trails may say something about boulder mass and boulder speed. But why is this boulder trail low reflectance when all of the surrounding trails are higher reflectance? Perhaps this boulder trail is lower reflectance because the boulder gently bounced as it traveled downhill, and barely disturbed a thin layer of regolith? The contrast certainly appears similar to the astronauts' footprints and paths around the Apollo landing sites. Or, maybe the boulder fell apart during its downhill travel and the trail is simply made up of pieces of the boulder - we just don't know yet.
LROC WAC context of Menelaus crater at the boundary between Mare Serenitatis and the highlands (dotted line). The arrow marks the location of today's featured image at contact between the crater floor and NE crater wall [NASA/GSFC/Arizona State University].
What do you think? Why don't you follow the trail to its source in the full LROC NAC frame and see if you can find any other low reflectance trails.


text:
Germany – HyStorage project has marked the completion of its first operating phase, showcasing the viability of utilizing Bavarian porous rock formations for hydrogen storage.
Partner companies, including Uniper and OGE, presented interim results, revealing a 90% recovery of injected hydrogen without impacting reservoir performance.
The overarching goal of the HyStorage project is to assess the feasibility and integrity of porous rock formations, specifically in southern Germany's Alpine Molasse Basin, for storing hydrogen. Hydrogen storage is increasingly recognized as an essential element in the transition to a decarbonized energy market.
The project involves three cycles with varying hydrogen concentrations (5%, 10%, and 25%) injected into former natural gas reservoirs. The success of the first phase, with a 5% hydrogen blend, establishes a foundation for further testing and development. Material testing during the process has demonstrated the resilience of materials against hydrogen corrosion, a critical aspect for the long-term viability of hydrogen storage.
The successful recovery of almost 90% of injected hydrogen during the initial phase bodes well for the potential impact of HyStorage on the hydrogen landscape. If subsequent phases validate these results, it could pave the way for larger-scale hydrogen storage projects. The stored hydrogen has the potential to play a crucial role in ensuring a stable and secure energy supply, especially during periods of high demand or when renewable energy sources are intermittent. Additionally, this project aligns with the broader European push for hydrogen as a clean energy carrier.
The support from Bavarian Minister of Economic Affairs, Regional Development, and Energy, Hubert Aiwanger, underscores the project's significance for Bavaria and the broader energy industry. The collaboration of experienced European project partners, including Uniper, OGE, RAG Austria, SEFE Securing Energy for Europe, and NAFTA, along with interdisciplinary support from industry and science, ensures a robust evaluation of the project's results.


The digital age is very much a part of 21st century youth culture, and we need to ensure that young people are prepared for the multi-media and social media world through an 'interactively active, actively interactive' Curriculum for Life.
The social, cultural and economic benefits and the potential to provide a truly holistic physical, mental and emotionally well-rounded British citizen through 21st century interactive mobile lifestyles presents as many challenges as it does opportunities going forward.
The YC Digiwise project provides an integrated intergenerational youth centred approach that will see digital equality, diversity and inclusion through sport, art, culture and digital technology - an _TAG_…
Please see - Changing Lives: the social impact of participation in culture and sport
YC DCMS Social Impact Inquiry submission (2018)


text:
Guest characters are anonymous / generic logins that allow users to connect to a game without having to create a character. This can be useful on games where character registration is required, and it limits the build-up of player objects that are used only once or twice. Additionally, both built-in commands and softcode can be modified to permit/restrict the access of guest characters, allowing for fine-tuned control of the actions and the experience of these visitors.
By default, guest characters are not enabled. There are several steps to configuring guests which require in game actions and editing the configuration file. The primary on/off switch for guests is the config parameter guest_char_num.
1. Create a protoguest object. This is often a player, but does not need to be. If it is a player, do not name it 'Guest'. Make a note of its dbref.
2. Edit your netmux.conf (or whatever your.conf is - see GAMENAME) and add/modify the entry for the guest_char_num. For example, if your protoguest is object #32, you want the following line:
3. Save the file and _USER_. You should now have working guests.
There are a number of other steps you should consider when configuring guests. For instance, by default, connecting guest characters will join the specified channel for guests, with the specified alias. By default, the channel name is 'Guests' and the alias is 'g'. For this to work, you will need to _USER_ the Guests channel and configure it as needed. If you would like to have guests join a different channel, check the wizhelp topics for guests_channel and guests_channel_prefix (2.6 and higher for the latter?).
You can also specify settings for the name of guest characters (Guest1, Guest2, etc by default), the number of guests that can be on at one time (10 by default). check wizhelp for *guest* to see a list of config parameters that control guest configuration.
Additionally, there is customization that can be done by modifying the Protoguest object, as all guest characters will use this object as a template.


App Description
Become a bird in the sky with a crazy survival game! City life is an opportunity for a bird - choose a bird, start a flying flock of pigeon, crow, gull or sparrow, fight for survival in nature. City Birds Simulator offers flying in the sky as pigeon, crow, gull or sparrow. Choose simulator mode - survival or quests - and become the most resilient bird in the city sky! Bird survival starts now!
Features of City Birds Simulator:
- City nature
- Survival and quests
- Choose a bird: pigeon, crow, gull, sparrow
- Bird breeding
- Realistic bird behavior
Sky gang!
Learn to control your pigeon, gull, sparrow or crow and lead a flying flock. You will meet many challenges - don't face them alone! City nature is dangerous, but you can rely on your flock for survival. Seek your bird kin, start a flock. Survival in the sky is a team effort, especially for a bird. Flying in nature with a wild flock is breathtaking!
City hunter!
Hunt is a way of survival. Some bird species, like crow, pigeon or gull, hunt in the sky, every other bird is a prey. Maintain energy to fly in city sky, fight city nature for survival. The more you hunt, the bigger your flock can be. Survival in the city nature is challenging. Hunt with your sky flock for survival - live the way of a bird of prey!
Flying and survival!
Live the life of pigeon, crow, gull or sparrow - complete bird quests, breed a new sky flock. Every bird has unique quests and ways of survival in the city sky nature. City is a playground for birds, flying in the sky. But survival is no game - a bird can die in the city nature. Flying in the sky and survival strategy - you'll find both!
Flying in the sky is a dream! Try in City Birds Simulator, be a bird and fly in the sky of a big city!
iPhone Screenshots
(click to enlarge)
City Birds Simulator screenshot 1 City Birds Simulator screenshot 2 City Birds Simulator screenshot 3 City Birds Simulator screenshot 4
iPad Screenshots
(click to enlarge)
City Birds Simulator screenshot 5 City Birds Simulator screenshot 6 City Birds Simulator screenshot 7 City Birds Simulator screenshot 8
App Changes
 - June 24, 2017 Initial release


text:
Military engineer Henry Martyn Robert authored the best known and most widely used book on parliamentary law - Robert's Rules of Order.
Robert served as an engineer in the army from 1867 to 1871. He worked on the defense of Washington, Philadelphia, and the New England Coast during the Civil War and was president of the Board of Engineers from 1895 to 1901. After having difficulty leading a meeting at church one day he declared that he would learn about parliamentary procedure before going back. That resulted in the Pocket Manual of Rules of Order for Deliberative Assemblies loosely based on the procedures used in the US House of Representatives.
Read Robert's Rules of Order.


That fine-looking android you see in the photo to the right may look a little rough and ready but don't be fooled by appearances - it's actually the world's first fully symptomatic medical-condition simulator.
The unnamed robot was created by researchers at Gifu University medical school for training medical students to diagnose tricky conditions. In this case, the machine displays symptoms of a condition known as myasthenia gravis, which is an autoimmune disease where antibodies attack the body's proteins, causing muscle weakness that is notoriously hard to diagnose.
In future, the idea is to enable the 'droid to replicate many more conditions - for now, however, students have to make do with looking at its facial expression, posture and reflexes before asking, "Is it myasthenia gravis by any chance?"


Kent County Median Household Income
Kent County
Change Location...
Household income in Kent County—not to be confused with an individual's income—is defined by the Census Bureau as the sum of income generated by all the people over 15 years old who occupy a housing unit, such as a house or an apartment. A family is a type of household. A person living alone in a housing unit is also a household. In addition, households may be composed of unrelated people living together, like partners or roommates.
Every year, the Census Bureau contacts over 3.5 million households across the country to participate in the American Community Survey (ACS). For locations with populations under 60,000, the ACS is only available in 5-year estimates, rather than single-year periods. The 5-year estimates provide greater geographical granularity but a less granular time period.
How does median household income of Kent County compare to Delaware and the United States?
How does household income vary within Kent County, Delaware?
Note: Hover over each census tract in Kent County to see its median income.
How does household income vary by household size in Kent County, Delaware?
How does household income vary by the householder's age in Kent County, Delaware?
A householder is a person in whose name a housing unit is owned, being bought, or rented.
How does household income relate to home ownership in Kent County, Delaware?
Tenure refers to whether a housing unit is owner-occupied or renter-occupied.
About the Data
- Median Household Income by Household Size: Table B19019
- Median Household Income by Age of Householder: Table B19049
- Household Income by Tenure: Table B25119


Mobile Core API reference
Application reference (Android only)
When building Android applications, the android.app.Application reference must be passed to the Mobile SDK, which allows the Mobile SDK to access the android.app.Context and monitor the lifecycle of the Android application.
Android applications must call MobileCore.setApplication() before calling any other Mobile SDK API.
Set Application
You can use this API to pass the Android Application instance to the SDK.
Android
Android
Java
setApplication
Syntax
public static void setApplication(final Application app)
Example
public class CoreApp extends Application {
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
MobileCore.start(null);
}
}
Get Application
You can use this API to get the previously set Android Application instance, and this instance is mainly provided for the third-party extensions.
Android
Android
Java
getApplication
MobileCore.getApplication might return null if the Application object was destroyed or if MobileCore.setApplication was not previously called.
Syntax
public static Application getApplication()
Example
Application app = MobileCore.getApplication();
if (app != null) {
...
}
Track app actions
Actions are events that occur in your app. You can use this API to track and measure an action. Each action has one or more corresponding metrics that are incremented each time the event occurs. For example, you might call this API for each new subscription each time an article is viewed, or each time a level is completed.
Call this API when an event that you want to track occurs. In addition to the action name, you can send additional context data with each track action call.
If you installed and configured the Analytics extension, this method sends an Analytics action tracking hit with the optional context data that you provide.
Android
iOS
Android
Java
trackAction
Syntax
public static void trackAction(final String action, final Map<String, String> contextData)
 - action contains the name of the action to track.
 - contextData contains the context data to attach on this hit.
Example
Map<String, String> additionalContextData = new HashMap<String, String>();
additionalContextData.put("customKey", "value");
MobileCore.trackAction("loginClicked", additionalContextData);
iOS
Objective-C
trackAction
Syntax
@objc(trackAction:data:)
static func track(action: String?, data: [String: Any]?)
 - action contains the name of the action to track.
 - contextData contains the context data to attach on this hit.
Example
[AEPMobileCore trackAction:@"action name" data:@{@"key":@"value"}];
Swift
trackAction
Syntax
static func track(action: String?, data: [String: Any]?)
 - action contains the name of the action to track.
 - contextData contains the context data to attach on this hit.
Example
MobileCore.track(action: "action name", data: ["key": "value"])
Track app states and views
States represent screens or views in your app. Each time a new state is displayed in your application, for example, when a user navigates from the home page to the news feed, this API can be called. This method sends an Analytics state tracking hit with optional context data.
If you installed and configured the Analytics extension, this API increments page views and an Analytics state tracking hit with the optional context data that you provide.
Android
iOS
Android
Java
In Android, trackState is typically called each time a new Activity is loaded.
trackState
Syntax
public static void trackState(final String state, final Map<String, String> contextData)
 - state contains the name of the state to track.
 - contextData contains the context data to attach on this hit.
Example
Map<String, String> additionalContextData = new HashMap<String, String>();
additionalContextData.put("customKey", "value");
MobileCore.trackState("homePage", additionalContextData);
iOS
Objective-C
trackState
Syntax
@objc(trackState:data:)
static func track(state: String?, data: [String: Any]?)
 - state contains the name of the state to track.
 - contextData contains the context data to attach on this hit.
Example
[AEPMobileCore trackState:@"state name" data:@{@"key":@"value"}];
Swift
trackState
Syntax
static func track(state: String?, data: [String: Any]?)
 - state contains the name of the state to track.
 - contextData contains the context data to attach on this hit.
Example
MobileCore.track(state: "state name", data: ["key": "value"])
setAdvertisingIdentifier
The advertising ID is preserved between app upgrades, is saved and restored during the standard application backup process, available via Signals, and is removed at uninstall.
If the current SDK privacy status is optedout, the advertising identifier is not set or stored.
Android
iOS
Android
setAdvertisingIdentifier
This API sets the provided advertising identifier.
Java
Syntax
public static void setAdvertisingIdentifier(final String advertisingIdentifier);
 - advertisingIdentifier is a string that provides developers with a simple, standard system to track the Ads through their apps.
Example
This is just an implementation example. For more information about advertising identifiers and how to handle them correctly in your mobile application, see Google Play Services documentation about Advertising ID.
This example requires Google Play Services to be configured in your mobile application. For instructions on how to import the Google Mobile Ads SDK and how to configure your ApplicationManifest.xml file, see Google Mobile Ads SDK setup.
...
@Override
public void onResume() {
super.onResume();
...
new Thread(new Runnable() {
@Override
public void run() {
String advertisingIdentifier = null;
try {
AdvertisingIdClient.Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(getApplicationContext());
if (adInfo != null) {
if (!adInfo.isLimitAdTrackingEnabled()) {
advertisingIdentifier = adInfo.getId();
} else {
MobileCore.log(LoggingMode.DEBUG, "ExampleActivity", "Limit Ad Tracking is enabled by the user, cannot process the advertising identifier");
}
}
} catch (IOException e) {
// Unrecoverable error connecting to Google Play services (e.g.,
// the old version of the service doesn't support getting AdvertisingId).
MobileCore.log(LoggingMode.DEBUG, "ExampleActivity", "IOException while retrieving the advertising identifier " + e.getLocalizedMessage());
} catch (GooglePlayServicesNotAvailableException e) {
// Google Play services is not available entirely.
MobileCore.log(LoggingMode.DEBUG, "ExampleActivity", "GooglePlayServicesNotAvailableException while retrieving the advertising identifier " + e.getLocalizedMessage());
} catch (GooglePlayServicesRepairableException e) {
// Google Play services is not installed, up-to-date, or enabled.
MobileCore.log(LoggingMode.DEBUG, "ExampleActivity", "GooglePlayServicesRepairableException while retrieving the advertising identifier " + e.getLocalizedMessage());
}
MobileCore.setAdvertisingIdentifier(advertisingIdentifier);
}
}).start();
}
iOS
setAdvertisingIdentifier
To access IDFA and handle it correctly in your mobile application, see Apple developer documentation about IDFA
Starting iOS 14+, applications must use the App Tracking Transparency framework to request user authorization before using the Identifier for Advertising (IDFA).
iOS
Syntax
@objc(setAdvertisingIdentifier:)
public static func setAdvertisingIdentifier(_ identifier: String?)
 - adId is a string that provides developers with a simple, standard system to continue to track the Ads through their apps.
Example
Objective-C
#import <AdSupport/ASIdentifierManager.h>
#import <AppTrackingTransparency/ATTrackingManager.h>
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- ...
-
if (@available(iOS 14, *)) {
[self setAdvertisingIdentitiferUsingTrackingManager];
} else {
// fallback to earlier


text:
Production and Distribution of Pressurized Biogas in Gas Cylinders
"Production and Distribution of Pressurized Biogas in Gas Cylinders". This initiative has been developed by a private company, an international NGO and government organizations to produce and store pressurised biogas for cooking made from urban, domestic and industrial wastes. Environmental benefits are achieved by offering an alternative firing material to firewood and charcoal.
The initiative Compressed Biogas proposes to build large biogas plants that will continuously produce biogas from urban, domestic and industrial wastes. The biogas produced will be stored under pressure in gas cylinders for easy distribution to urban and peri-urban customers as alternative to charcoal and firewood. The objective of CBG is to provide affordable biogas for poor households, targetting peri-urban and urban Rwandan households that are still using firewood and carbonized charcoal for heating and cooking. Distribution will be through a network of sales representatives, existing hardware shopkeepers in focal commercial centres throughout the country.
- Establishment of partnership with equity investors.
- Construction and operating of 7 small biogas pilot plants.
- Environmental impact assessment required for the increased number of CBG plants.
- Scaling up the technology of the Compressed Biogas (high yield of biogas substrates, efficient production and storage technology, cheap gas cylinders, etc.).


Quasi-Spectral Characterization of Strongly Distance-Regular Graphs
M. A. Fiol
A graph $\Gamma$ with diameter $d$ is strongly distance-regular if $\Gamma$ is distance-regular and its distance-$d$ graph $\Gamma _d$ is strongly regular. The known examples are all the connected strongly regular graphs (i.e. $d=2$), all the antipodal distance-regular graphs, and some distance-regular graphs with diameter $d=3$. The main result in this paper is a characterization of these graphs (among regular graphs with $d$ distinct eigenvalues), in terms of the eigenvalues, the sum of the multiplicities corresponding to the eigenvalues with (non-zero) even subindex, and the harmonic mean of the degrees of the distance-$d$ graph.
Full Text: PDF


Isla Mujeres' Pirate Mundaca
The Pirate Mundaca is a well-known figure to those who frequent Cancun's 'Jolly Roger Pirate Ship' tours as he is a fictional character who strides through the Galleon during each show. But did you know that there was a real Pirate Mundaca?
Historian Fidel Villanueva Madrid has written an article for the magazine "Pioneers" which suggests that he was more than just this. Fermín Antonio Mundaca was in fact a real life, first class pirate who practically ruled Isla Mujeres in his day. Check out what we now know about Mundaca;
Early Years of Pirate Mundaca
Fermín Antonio Mundaca was born on October 11, 1825 in Villa de Bermeo in Spain. Madrid thinks that the first few decades of Mundaca's life were spent learning about navigation and architecture.
Pirate Mundaca the Slave Trader
Nobody knows much about the first years of Mundacas life, but we do know that when he burst into history he did so on Isla Mujeres, most likely on the run from authorities following some crime or other. Some think this may be to do with his illicit slaving activities. Whatever the case, Mundaca chose to make Isla Mujeres his home. There are some whisperings about the relationship he had with the Yucatan government. Some think he may have acted as a slaver selling Mayans to Cuba.
Isla Mujeres
A mere 2 years after his surfacing in Isla Mujeres the pirate Mundaca had firmly established himself. It is said that he fell in love with a beautiful woman who lived on Isla Mujeres, and that it was his desire to impress Prisca Gómez Pantoja, otherwise called "La Trigueña" (the Brunette), that caused him to build Vista Alegre. His home, now referred to as Hacienda Mundaca, covered around 40% of the Island and included orchards, large gardens, wells, arches and even a tomb for Mundaca! Sadly he was never buried there; Mundaca died 200 miles away in Merida.
A Reclusive Pirate?
All reports suggest that he was a solitary kind of person who had little contact with anyone other than his servants, plantation workers and business contacts.
Unrequited Love
La Trigueña was the supposed focus of the pirate Mundaca's attentions, and if the reports of her are true it's easy to see why. She was said to have skin the color of honey and eyes that were olive colored and it was thought that all the men of the island were in love with her. She never returned Mundacas affections, however, and legend has it he died of a broken heart while in Merida.
If you'd like to know more about Fermín Antonio Mundaca you can check out the article from which we got our information:
Pirates of Viking Descent
The Vikings were the forerunners of the pirates found around Britain and Scandinavia during the Golden Age of Pirates. There were a few big differences, however, between the Vikings and the pirates that would follow in later centuries.
Pirates of Viking
What makes Vikings Pirates?
Firstly, Vikings did not limit themselves to attacking other ships, in fact they specialized in raiding villages and islands. They were adept fighters and sailors, and their favored tactic was to land, raid, and leave with stunning brutality and speed. This is what they did to the Island of Landisfarm in the 8th century. They were able to get their long-boats much closer to the shore than many others because of their shallow draft and narrow deck; they are designed to get in and about the narrow fjords and inlets of the Vikings home countries.
Vikings, pirates and Religion
The reason for their warlike nature can be traced back to the Vikings religion. The Vikings didn't believe in just one God, but in a Pantheon of Gods who were largely dedicated to warfare and the honour of the battlefield. They believed that those men and women who fought well and died on the battlefield would be rewarded in the afterlife via admittance to Valhalla. This militaristic focus can be seen clearly in the way they treated their weapons.
Weapons fit for pirates and vikings
A Vikings weapons were often named, given personalities, and treated with the utmost respect. They were prized possessions, and a lot could be deduced about a Viking warrior by studying his or her weapon. For example an axe which was heavily engraved had probably been owned for a long time, and depending upon what the runes said you could learn a little about where it and its owner had been. A warrior of high status might have these runes filled in with silver to create an ornate and valuable weapon.
Unlike the pirates of later years Vikings didn't live on their ships; they launched from fishing villages in their home countries and returned their once their voyage was over.
What is the Pirate Code?
If you watch any pirate film, or read literature, then you'll find that there are plenty of mentions of the Pirate Code. Even Jack Sparrow, the character portrayed by Johnny Depp in the Pirates of the Caribbean, makes a mention of it as a decree that joins all pirates. A kind of common law.
Papiro enrollado 2
What was the Pirate Code?
The pirate code was, at the most basic level, a code of conduct that had been drawn together and been agreed by the pirates themselves. This was designed to keep them in line, and to provide some form of Government. The pirate code, however, was enforced on a ship to ship basis. Unlike on legitimate sailing vessels where the sailors follow Navy or Merchant Navy rules and regulations, the crew would decide together what rules were required.
Somewhat different to national laws imposed by Monarchies and Governments, the Pirate code was not a formal, blanket law. It not only changed from ship to ship, but also from voyage to voyage to make sure that it represented the views of the crew at large. It was common for pirates to swear an oath to follow this code; they might swear on a bible, a cannon, crossed swords or even a human skull. What's more all who were on board had to give this oath, even if they weren't crew members. Stowaways and prisoners were required to sign or face torture or even death! Nice, right?
Though the particulars changed there were some common articles that could be found on many ships consistently. They were;
- No fighting on the ship, unless it was in battle or self-defence.
- No women (though this was not always observed).
- No gambling with cards or dice.
- Pirates must be armed and ready always.
- All goods, food, and beverages would be divided equally among the crew. Only the Captain and Quartermaster received a larger share (they got a double share each).
- Pirates who lost a limb would get an extra half share.
- All pirates get one vote as to the next destination and mission taken.
- All crew members follow and respect the orders of the Captain and Quartermaster.
If you're ever tempted to think that being a pirate would put you out of the reach of the law then remember that all pirates were subject to rules and regulations. The Pirate Code applied to everyone.
Viking Pirates and their Ships
The Viking longboat is one of the most iconic ships in pre and early medieval history; the striking silhouette is hard to forget. But why were they so widely used as battle ships by the Vikings? Well they were slim, hardy boats with shallow drafts which meant that they were able to get very close to the shore, and they were able to manoeuvre through close spaces.
Viking Pirates and their Ships
The iconic dragon heads that were attached to the tall, slim, stems at the front of the boats were removable. Though these are the forerunners of the figureheads seen on many pirate ships in later centuries, the Viking animal heads had spiritual, and practical uses for the ship. The Vikings believed that these animal heads protected the ship from the dangers that the sea held, but they would remove them upon return to their homes so as not to scare off the guardians of the towns and villages themselves.
Each Dreki had 60 oars, but no galley slaves; the warriors themselves were expected to be fit and strong enough to row the single-masted vessel and still fight when needed. This was all a part of the mentality of strength, honour and skill that came with the Viking religion. Their belief was that glory and skill on the battle-field, as well as a good death, would gain them entrance to the feasting halls of Valhalla.
As far as pirates go, the Vikings were undoubtedly the elite, though they had their differences. For a start they lived mainly on land, and they targeted settlements as well as other ships. But their consummate skill as fighters, and indeed as sailors mean that any considerations about the history of piracy would be incomplete without at least a few words spared for the Nordic warriors that terrorized large swathes of Europe for hundreds of years in the early medieval era.
Reference: Gail Selinger, W. Smith Jr. The Complete Idiot's Guide to Pirates, Penguin Press 2006
5 Prosperous Pirate Strongholds
The seas and oceans once used to be the playground of many notorious pirates who chanced upon sea travelers for the purpose of deceit and plain robbery. In turn, the Caribbean, the Gulf Of Mexico and the coasts of Africa also served as hideaways for these sea criminals.
When pirates were not on the seas, they were in safe harbors located within pirate strongholds or hidden coves, resting on their laurels and getting ready for their sne


text:
The Burren in County Clare is a region that encompasses 360km2 of gently inclined plateau with a further 200km2 of lowland to the east of the plateau.
The limestone also has a landscape in miniature etched into exposed slabs of rock. The bare surfaces are fretted with hollows and channels where acidic rainwater has selectively dissolved the rock. An extreme example of these micro landforms occurs on the coast.
Often described as a natural landscape, the Burren has been profoundly influenced by human activities. Early removal of the natural woodland induced soil erosion, enlarging the exposure of the underlying limestone. Ecological diversity is one of the great attractions of the Burren, a remarkable profusion that is now under intense pressure.
More than 700 different flowering plants and ferns have been recorded in the Burren. Thus, although the Burren represents only 1% of the land-mass of Ireland, 75% of the Irish native species are contained in the area.
The Burren is a region of outstanding significance in an international context in terms of its geology, geomorphology, natural history and archaeology. Most of the area has been designated as a Special Area of Conservation under the EU Habitats Directive.
The people of the Burren welcome visitors to Ireland''s most extraordinary landscape. The Burren may look rugged, but it is also a fragile place and is always under threat from increased human activity. The limestone pavement, flora and built heritage are the resources on which tourism in The Burren thrives. Respecting and conserving this resource is extremely important.
There is a Burren Code, and by following it, visitors can help protect the limestone pavement, plants and built heritage of this irreplaceable 'fertile rock'.


text:
Heavy load for top architecture
The conversion of the Wien Museum is giving Karlsplatz an architectural makeover. But how do you get oversized steel trusses from Carinthia to downtown Vienna? And how do you lift them onto the Oswald Haerdtl-designed building that opened in 1959?
Ten special transports
A total of ten special transports were necessary to bring the different steel trusses from Carinthia to Vienna. These ten trips were performed with seven different equipment combinations, where the largest transport unit was a 4-axle tractor with a 14-axle heavy duty combination. This hauled the largest piece with a width of 6.4 metres, a length of 40 metres and a unit weight of 108 tonnes. The resulting transport dimensions were even more impressive: 47.5 metres long, 6.4 metres wide, 4 metres high and a total weight of just under 200 tonnes.
Optimum special transport equipment
In addition to carrying out the transport, the yellow specialists were also responsible for the entire route planning, the comprehensive approval process and all reconstruction measures along the transport route. The preliminary work for this spectacular undertaking began already in March 2021. Initially, there was the question of suitable equipment: Especially with regard to the routing and the passage through Vienna's city centre, the transport technology had to be tested for optimal driving characteristics and its ability to negotiate curves. Finally, special equipment was used that is unique in Austria.
Only possible transport route
Due to the transport (over)dimensions, the route check turned out to be extremely complex. A major factor here was weight restrictions due to underground shafts and substructures in Vienna. To make the passage through Vienna possible at all, construction measures in the six-figure Euro range were required. Road works on the A2 meant a direct route via the motorway was not possible. In the end, it was necessary to go via Slovenia. This, in turn, necessitated the reconstruction of the "Karawanken Tunnel" border crossing. And another road works also made a second alternative route imperative.
Optimum crane technology
Eight support vehicles guided the heavy-duty transportation to Karlsplatz in Vienna. There, they were welcomed by a 600-tonne crawler crane with a system length of 84 metres. Some of the trusses were lifted directly, others were assembled while still on the ground. The heaviest steel element had an individual weight of 165 tonnes. In order to position the large crane – the size of a single-family house – between two inner-city buildings and close to an underground shaft, a number of measures were needed: Road closure, numerous stopping restrictions, removal of street lights and the relocation of a cycle path.
Supplementary crane technology
The erection of the large crane was precisely timed and followed a strict order. Due to the confined space conditions, everything had to take place just-in-time. A crane parking area suitable for the crawler crane was also very important. After all, the yellow giant weighed 750 tonnes. For this purpose, the road was filled in and then completely covered with excavator mats made of hardwood. The complex lifting logistics were rounded off with a 500-tonne telescopic crane that replaced the crawler crane after around a week and a half. With a system length of 79.2 metres, it mastered the final strokes in two different places. The extremely good cooperation of all stakeholders in the run-up to the event made this unique undertaking ultimately a success.


Curious about how others would solve this question: What is the number of people aged between 0-20 in Dubai.
Market sizing
New answer on Jan 27, 2020
3 Answers
Anonymous A asked on Jan 27, 2020
Overview of answers
 - Upvotes
 - Date ascending
 - Date descending
Content Creator
replied on Jan 27, 2020
There are multiple sources:
 - Population - you simply divide the population by the average life expectancy and then multiply by 20
 - Tourists - you assume that every 5th person you see in Dubai is a tourist and out of them x% are 0-20
Was this answer helpful?
Anonymous A on Jan 30, 2020
Thank you, Vlad! In the case of the UAE where the population is significantly young, assuming an equal age distribution won't work. How would you change your approach?
Udayan on Feb 13, 2020
That is relevant information - just adjust with what you think is most reasonable. For example distribute population 0-20 as being 30% of the population vs 25% if you take a life expectancy of 80
updated an answer on Jan 27, 2020
The structure mentioned in the previous answer is a good approach for most of the cities/countries. However, for hot tourist destinations like Dubai, one needs to consider the number of tourists that visit that particular city/country in a year.
On average, Dubai gets 12 million tourists (nearly four times the population of Dubai). If you use the similar approach and add that number to the one mentioned in the other answer, you arrive at the approximate number. Feel free to change assumptions regarding age distribution and life expectancy of tourists (Wouldn't change by more than 10-15% anyway).
Was this answer helpful?
Anonymous B replied on Jan 27, 2020
For this, I would lay the structure and assumption down as follows
# of people aged between 0-20 = (Total Population of Dubai / Avg. life span of the local population or the world) * # of years (0-20)
Key assumption, people distribution of ages are even across the board. Stating, that there are the same number of people at every 1 year.
# of people aged between 0-20 = ( (assumed) 3.5M / (assumed) 75 ) * 20
= 0.93M
Note, for this market sizing you should be aware of what the population of Dubai is, or approximate of it. Also 75-80 years is the average lifespan globally, this can vary by region.
Was this answer helpful?


Polishing without touching – how to reduce roughness in refractive micro-optical elements
Time 2017-11-10 09:30~09:50 Place Convention Hall Ⅰ
Code No. Session Chair
Name Dr. Helmut Schift
Affiliation Paul Scherrer Institut (PSI)
Title Polishing without touching – how to reduce roughness in refractive micro-optical elements
Co-author-1PrefixDr.
CountryGermany
First nameRobert
Last nameKirchner
AffiliationTU Dresden
Department
_EMAIL_
Cell phone
Co-author-2PrefixDr.
CountryIndia
First nameNachiappan
Last nameChidambaram
AffiliationPaul Scherrer Institut (PSI)
Department
_EMAIL_
Cell phone
Co-author-3PrefixMr.
CountrySwitzerland
First nameMirco
Last nameAltana
Affiliation
DepartmentAMS
_EMAIL_
Cell phone
Contents
Refractive micro-optical elements are finding applications in high volume consumer electronic devices. A truly 3D capable approach with higher resolutions in lateral and vertical direction is two-photon polymerization (2PP). The trajectories and layering during the DLW often result in roughness in the range of the writing increment, which has adverse effects for optical applications. If a surface has to be subsequently smoothed out by post-processing, it must be achieved using a method that only modifies the surface and does not change the structural details or the overall shape. For this a method known as TASTE was developed. It involves selectively changing the material properties (glass transition temperature) of the part of the sample that needs modification, i.e., locally confined in lateral or vertical direction. We therefore copied the original structure (master) into a PMMA structure by thermal imprint. By using 172 nm UV exposure, the PMMA was modified at a defined depth of the surface by chain scission. This was followed by molecular weight dependent reflow at elevated temperatures. Using our polishing process, a roughness of 100 nm could be removed while preserving the concave shape with up to 50 μm high structures and deep central sags surrounded by high aspect ratio tips between adjacent lenses in array configuration. This was also confirmed optically for a microlens array with several 100 microlenses.


Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ /
Reduce Realm File Size - Swift SDK
On this page
 - Overview
 - Realm File Size
 - Avoid Pinning Transactions
 - Threading
 - Dispatch Queues
 - Automatic Compaction
 - Manual Compaction
 - Compact a Realm Asynchronously
 - Make a Compacted Copy
 - Tips for Using Manual Compaction
 - Summary
The size of a realm file is always larger than the total size of the objects stored within it. This architecture enables some of realm's great performance, concurrency, and safety benefits.
Realm writes new data within unused space tracked inside a file. In some situations, unused space may comprise a significant portion of a realm file. Realm's default behavior is to automatically compact a realm file to prevent it from growing too large. You can use manual compaction strategies when automatic compaction is not sufficient for your use case or you're using a version of the SDK that doesn't have automatic compaction.
Generally, a realm file takes less space on disk than a comparable SQLite database. Unexpected file growth may be related to Atlas App Services referring to outdated data. These factors can affect file size:
 - Pinning transactions
 - Threading
 - Dispatch Queues
When you consider reducing the file size through compacting, there are a couple of things to keep in mind:
 - Compacting can be a resource-intensive operation
 - Compacting can block the UI thread
Because of these factors, you probably don't want to compact a realm every time you open it, but instead want to consider when to compact a realm. This varies based on your application's platform and usage patterns. When deciding when to compact, consider iOS file size limitations.
Realm ties read transaction lifetimes to the memory lifetime of realm instances. Avoid "pinning" old Realm transactions. Use auto-refreshing realms, and wrap the use of Realm APIs from background threads in explicit autorelease pools.
Realm updates the version of your data that it accesses at the start of a run loop iteration. While this gives you a consistent view of your data, it has file size implications.
Imagine this scenario:
 - Thread A: Read some data from a realm, and then block the thread on a long-running operation.
 - Thread B: Write data on another thread.
 - Thread A: The version on the read thread isn't updated. Realm has to hold intermediate versions of the data, growing in file size with every write.
To avoid this issue, call invalidate() on the realm. This tells the realm that you no longer need the objects you've read so far. This frees realm from tracking intermediate versions of those objects. The next time you access it, realm will have the latest version of the objects.
You can also use these two methods to compact your Realm:
Tip
See also:
When accessing Realm using Grand Central Dispatch, you may see similar file growth. A dispatch queue's autorelease pool may not drain immediately upon executing your code. Realm cannot reuse intermediate versions of the data until the dispatch pool deallocates the realm object. Use an explicit autorelease pool when accessing realm from a dispatch queue.
New in version 10.35.0.
The SDK automatically compacts Realm files in the background by continuously reallocating data within the file and removing unused file space. Automatic compaction is sufficient for minimizing the Realm file size for most applications.
Automatic compaction begins when the size of unused space in the file is more than twice the size of user data in the file. Automatic compaction only takes place when the file is not being accessed.
Manual compaction can be used for applications that require stricter management of file size or that use an older version of the SDK that does not support automatic compaction.
Realm manual compaction works by:
 1. Reading the entire contents of the realm file
 2. Writing the contents to a new file at a different location
 3. Replacing the original file
If the file contains a lot of data, this can be an expensive operation.
Use shouldCompactOnLaunch() (Swift) or shouldCompactOnLaunch (Objective-C) on a realm's configuration object to compact a realm. Specify conditions to execute this method, such as:
 - The size of the file on disk
 - How much free space the file contains
For more information about the conditions to execute in the method, see: Tips for Using Manual Compaction.
Important
Compacting may not occur
Compacting cannot occur while a realm is being accessed, regardless of any configuration settings.
When you use the Swift async/await syntax to open a realm asynchronously, you can compact a realm in the background.
func testAsyncCompact() async {
let config = Realm.Configuration(shouldCompactOnLaunch: { totalBytes, usedBytes in
// totalBytes refers to the size of the file on disk in bytes (data + free space)
// usedBytes refers to the number of bytes used by data in the file
// Compact if the file is over 100MB in size and less than 50% 'used'
let oneHundredMB = 100 * 1024 * 1024
return (totalBytes > oneHundredMB) && (Double(usedBytes) / Double(totalBytes)) < 0.5
})
do {
// Realm is compacted asynchronously on the first open if the
// configuration block conditions were met.
let realm = try await Realm(configuration: config)
} catch {
// handle error compacting or opening Realm
}
}
Starting with Realm Swift SDK Versions 10.15.0 and 10.16.0, many of the Realm APIs support the Swift async/await syntax. Projects must meet these requirements:
Swift SDK Version
Swift Version Requirement
Supported OS
10.25.0
Swift 5.6
iOS 13.x
10.15.0 or 10.16.0
Swift 5.5
iOS 15.x
If your app accesses Realm in an async/await context, mark the code with @MainActor to avoid threading-related crashes.
You can save a compacted (and optionally encrypted) copy of a realm to another file location with the Realm.writeCopy(toFile:encryptionKey:) method. The destination file cannot already exist.
Important
Avoid calling this method within a write transaction. If called within a write transaction, this method copies the absolute latest data. This includes any uncommitted changes you made in the transaction before this method call.
Compacting a realm can be an expensive operation that can block the UI thread. Your application should not compact every time you open a realm. Instead, try to optimize compacting so your application does it just often enough to prevent the file size from growing too large. If your application runs in a resource-constrained environment, you may want to compact when you reach a certain file size or when the file size negatively impacts performance.
These recommendations can help you optimize manual compaction for your application:
 - Set the max file size to a multiple of your average realm state size. If your average realm state size is 10MB, you might set the max file size to 20MB or 40MB, depending on expected usage and device constraints.
 - As a starting point, compact realms when more than 50% of the realm file size is no longer in use. Divide the currently used bytes by the total file size to determine the percentage of space that is currently used. Then, check for that to be less than 50%. This means that greater than 50% of your realm file size is unused space, and it is a good time to compact. After experimentation, you may find a different percentage works best for your application.
These calculations might look like this in your shouldCompactOnLaunch callback:
// Set a maxFileSize equal to 20MB in bytes
let maxFileSize = 20 * 1024 * 1024
// Check for the realm file size to be greater than the max file size,
// and the amount of bytes currently used to be less than 50% of the
// total realm file size
return (realmFileSizeInBytes > maxFileSize) && (Double(usedBytes) / Double(realmFileSizeInBytes)) < 0.5
Experiment with conditions to find the right balance of how often to compact realm files in your application.
A large realm file can impact the performance and reliability of your app. Any single realm file cannot be larger than the amount of memory your application would be allowed to map in iOS. This limit depends on the device and on how fragmented the memory space is at that point in time.
If you need to store more data, map it over multiple realm files.
 - Realm's architecture enables threading-related benefits, but can result in file size growth.
 - Automatic compaction manages file size growth when the file is not being accessed.
 - Manual compaction strategies like shouldCompactOnLaunch() can be used when automatic compaction does not meet application needs.
 - Compacting cannot occur if another process is accessing the realm.
 - You can compact a realm in the background when you use async/await syntax.
← Bundle a Realm File - Swift SDK