Hairy Ladies investigates the symbolism associated with hair. Long hair is often associated with good health, wealth, vanity, power and femininity as in fairy tales like Rapunzel and myths such as the story of Samson and Delilah. These tales use hair as a symbol for feminine power. Other cultures such as the Native American Navajo believe that hair holds memory. In a more scientific manner, scientists can analyze the DNA found in hair for very specific information about the person it belongs to. This fact confirms that hair literally holds a personal history. I am also interested in the history and contemporary practices of grooming surrounding hair. Women shave large parts of their naturally haired bodies. We cut, color, style and braid our hair in order to appear kempt and presentable. Many people shave their heads and let facial hair grow to assert ownership of the self and refusal to conform to prescribed gender stereotypes. As a society we are obsessed with using our appearance to conform or challenge our own identities. Hair is an element of the human body that links us closely to animals. Over grown hair evokes a sense of the animal nature within the human. The hair on these sculptures seems to have grown so long that the figures look like an evolved or different species of human.
Click here to be directed to an interview I did with Infringe magazine about this series.


text:
Harnessing Solid-State Ionic Transport
Metallic nanostructures are the essential components of a large number of high-performance electronic devices, plasmonic devices, as well as physical and chemical sensors. Fabrication of nano-scale metallic features with controlled geometry has so far relied on lithographic processes that are typically complex and lack flexibility. A new approach to directly patterning metal at nano-scale with excellent dimensional resolution and flexibility is introduced for fabrication of functional nano-structures. This technique is based on the solid-state electrochemical dissolution of a metallic substrate at its contact with a pre-patterned surface of a solid electrolyte tool, and the subsequent formation of the complimentary pattern on the metal substrate as the solid electrolyte etches through the metal layer. Our results demonstrate repeatable and high-fidelity patterning of metal structures with a wide dimension range (millimeters to 20 nm). As this process is carried out in the ambient environment and does not require wet chemicals, its potential for use as a simple and yet high-throughput metal patterning technique offers a highly competitive alternative approach to fabricating functional structures and devices.
University of Illinois at Urbana-Champaign.
Researchers should cite this work as follows:
Keng Hsu (2008), "Harnessing Solid-State Ionic Transport," _URL_

source: HuggingFaceFW/fineweb-edu


The Man Behind the Graham Cracker
Did you know? The graham cracker is named after an American Presbyterian minister. Today we remember Reverend Sylvester Graham, who was born on July 5, 1794.
Graham was a social reformer who recommended a strict diet for people to stay pure and healthy. He advocated drinking only pure water and eating only a high-fiber vegetarian diet. This included bread made at home from unsifted wheat flour (as opposed to refined white flour).
Graham's followers began marketing graham flour, graham bread and graham crackers. (Graham was not involved in any of these products and never earned any royalties from their sales.) reports that "although Graham had his adherents during his lifetime, he was mostly regarded as a bit of a nut." For instance, Graham believed that mustard and ketchup cause insanity. (Come to think of it, that could explain a lot of things.)
(The reason why Graham advocated his stringent diet is best left to a separate discussion. But you can read more about that here.)
Whole wheat contains an array of phytochemicals. These naturally occurring plant chemicals contain antioxidants that can stimulate the immune system, repair damaged DNA and help your body fight cancer. Compounds include phytosterols (which can lower cholesterol) and tocols (which can prevent certain diseases).
American researchers studied six whole wheat products to characterize their antioxidant capacity. Products included biscuits, graham crackers, pasta, toasted chips, wheat crackers and woven wheat crackers. Analytical equipment included an Agilent gas chromatograph coupled to an Agilent mass spectrometer.
Interestingly, the researchers found that whole wheat content does not correlate with phytochemical content.
"Ingredients other than whole wheat in the products appear to contribute substantially to the phytosterol and tocol content," the researchers write, "as their composition were dissimilar to those reported for plain whole wheat." These "other" ingredients, the researchers theorize, may include soybean oil.
For more information go to:


Cafe Inquiry
Tuesday, April 23rd 2013 at 7:00 pm
Tuesday, April 23rd 2013 at 9:00 pm
Hill Center DC, 921 Pennsylvania Ave SE (Eastern Market Metro), Washington, DC 20003
Note Location: We will be in Elizabeth Haines and Harrier Jacobs Rooms. Entrance is on 9th St SE. Elevator access available. Overflow room available in case of higher turnout to ensure all attendees receive adequate opportunities to participate.
Cafe Inquiry is our monthly casual get-together to meet people and discuss topics of science and humanism.
This month's discussion: What is more important in human experience, reason or emotion?
While reason and emotion have been traditionally framed as opposites in both science and philosophy, recent research in both fields is finding that emotions are a key factor in creating rational thought. If emotions play a bigger role in our lives than previously thought, what does that mean for us as atheists/secular humanists who tend to prize reason over emotion?
In addition, much public policy is based on the idea that people are rational actors. If we are driven more by emotions than rationality, where does that leave social and economic policies that treat people as rational actors?
Are reason and emotions at odds with each other? How should we, as secular humanists/atheists, conceptualize the relationship between reason and emotion?
We also recommend watching a video of neuroscientist Antonio Demasio talking about the newly discovered importance of emotion in shaping human reasoning capabilities.
We are also planning to go out for food and/or drinks afterwards. Free and open to the public.
Interested in leading a discussion or have someone to recommend? Please contact us at dc[at]centerforinquiry.net.


text:
POTSDAM – Clarkson University's Egon Matijevic, the Victor K. LaMer Professor of Colloid and Surface Science, and Evgeny Katz, the Milton Kerker Chair in Colloid Science, are listed in the H-index of living scientists.
The H-index attempts to measure both the scientific productivity and the apparent scientific impact of a scientist. The index is based on the set of the scientist's most cited papers and the number of citations that they have received in other people's publications.
At ranking #218, Matijevic, with an H of 69, has published 69 papers (among total 575 papers), which have each received at least 69 citations.
At ranking #380, Katz, with an H of 60, has published 60 papers (among more than 300 papers), which have each received at least 60 citations.
It should be noted that this listed of the most-cited chemists totals only 587 worldwide with the two Clarkson's professors among them.
The index was suggested by physicist Jorge E. Hirsch as a tool for determining quality of scientific publications of a person and is sometimes called the Hirsch index or Hirsch number.
The purpose of this index is similar to the popular impact factor, which is used to rank the quality of scientific journals, but it is applied to a person. The definition of the H-index and the explanations of its importance can be found at _URL_
The latest list, compiled by Henry Schaefer of the University of Georgia, together with colleague Amy Peterson, was updated in November 2010 and can be found at _URL_


text:
October 24, 2013
NASA Laser Communication System
NASA Laser Communication System Sets Record with Data Transmissions to and from Moon
NASA's Lunar Laser Communication Demonstration (LLCD) has made history using a pulsed laser beam to transmit data over the 239,000 miles between the moon and Earth at a record-breaking download rate of 622 megabits per second (Mbps).
LLCD is NASA's first system for two-way communication using a laser instead of radio waves. It also has demonstrated an error-free data upload rate of 20 Mbps transmitted from the primary ground station in New Mexico to the spacecraft currently orbiting the moon.
More @ NASA

source: openbmb/Ultra-FineWeb


text: Welcome to Huế, the historic capital of Thừa Thiên Huế province in central Vietnam. Known for its rich history and cultural significance, Huế has served as the old Imperial City and administrative capital for the Nguyễn dynasty and later as the administrative capital of the protectorate of Annam during the French Indochina period. Today, this city boasts a UNESCO-designated site, the Complex of Huế Monuments, which is a popular tourist attraction. Within the complex, visitors can explore the Imperial City of Huế, with its palaces and shrines, the Forbidden Purple City, once the emperor's home, and a replica of the Royal Theater. However, many of its historical landmarks are still undergoing restoration, so visitors can see the city's rich heritage in progress. In 2019, almost 4.2 million visitors had visited the city, and it is easy to see why. Huế is not only a city steeped in tradition and history but also a city of stunning natural beauty. Nestled on the banks of the Perfume River, it is surrounded by the Truong Son mountain range, providing breathtaking landscapes and a glimpse into rural Vietnamese life. The city has a tropical monsoon climate that varies from season to season. The dry season, from February to August, is characterized by high temperatures of 35 to 40 °C (95 to 104 °F), while the rainy season, from August to January, can cause flooding, especially from October onward. In this city, visitors can experience the traditional customs of the royal family and the evolution of clothing in Vietnam. The modern-day áo dài, which is considered a Vietnamese national costume, evolved from an outfit worn at the court of the Nguyen lords in Hue in the 18th century. Hue's cuisine is also a must-try. The city forms the heart of Central Vietnamese cuisine, and the prominence of vegetarianism in the city sets it apart from others. Several all-vegetarian restaurants are scattered in various corners of the city to serve a wide range of delicious local dishes. Join us on a journey to Huế and discover why this city should be on every traveler's bucket list.


text:
Searches for Arsenic Contaminated Water
Arsenic contamination of groundwater is a problem that affects about 140 million people around the world. Now researchers have developed a model that can predict the location of high-risk contamination, and are using it to identify potential arsenic hotspots in China.
Many people living in arid parts of China are dependent on deep wells that tap groundwater aquifers. But local geology means than some of these aquifers have dangerously high levels of naturally-occurring arsenic. In 2001, the Chinese Ministry of Health started screening the country's wells, and it had checked almost half a million by 2005. But that expensive operation covered just 12% of China's counties - it would take decades to do the rest.
A team led by Luis Rodriguez-Lado at the Swiss Federal Institute of Aquatic Science and Technology has developed a way to speed up that process. Their model looks at eight geological factors, including soil salinity, wetness and topography, which together reveal where groundwater is likely to be laden with arsenic.
The researchers tested the model using data from sites that have already been surveyed in China. It classified areas as either high or low risk, depending on whether arsenic levels in water exceeded the 10 microgram per litre limit recommended by the World Health Organization. The model correctly identified 83% of the high-risk areas.
Overlaying those arsenic risk figures on to a population map reveals where the greatest numbers of people face worrying arsenic exposure. That should allow Chinese authorities to prioritize their water testing.


text:
England and Scotland are presently debating the terms
of a referendum in 2014 that could see Scotland leave the United
Kingdom. Two years after that vote, however, Scottish and English energy
networks will become significantly better connected.
HVDC Link is a unique project establishing many firsts for
interconnectors around the world. Costing around £1 billion to install,
it will be the first grid interconnector below the sea ever to use high
voltage direct current. It will become the longest 2,200MW capacity HVDC
cable in the world and will be the first to operate at 600kV.
project is set to break boundaries in several regards as it seeks to
meet a significant need for greater grid capacity across the UK. With
large scale development of renewable energy capacity in Scotland, the
challenge is to grow transmission capacity between Scotland and England,
where large population centres consume much of the energy produced.
This challenge is pressing as the two existing overhead lines that cross
the border are running at capacity already.
This project will help
to meet that need, but must also face the problem of significant
transmission loss that can occur over a 420km cable. The 600kV voltage
level is designed to help bring the loss down to just three percent. The
more conventional 400kV A.C level used in connectors would risk losing
three times that level.
There are also projected cost benefits to
raising the voltage level from the previous highest example of 500kV to
600kV. This can enable the cable to handle a greater electrical capacity
without the need for a wider diameter of copper, saving on the cost of
an expensive raw material.
National Grid Electricity Transmission
and Scottish Power Transmission have commissioned the order and aim to
see cable installation along the route and construction of converter
stations in Hunterston in Ayrshire and Connah's Quay in ten north of
Wales. However, with Flintshire County Council rejecting the planning
application for Connah's Quay on 8 February, it remains to be seen how
proposals for the southern converter station will adjust.
itself will run under the Irish Sea through the area designated by the
Crown Estate as zone nine. Zone nine is part of round three of the
off-shore wind programme and rights to the area were granted to Centrica
Energy Renewable Investments Limited.
Western HVDC in numbers
- €1.1 billion – the contract awarded for establishing the link
- 2,200MW – the capacity of the new HVDC cable
- 600,000 – the voltage level of the new interconnector
- 420km – the length of cable between converter stations
- 3% - transmission losses, including cable and converter losses
- 32GW – off-shore capacity in phase three


text:
Finding a suitable apartment and successfully securing it can be an exciting yet time-consuming process. One important aspect of this process is the approval of your rental application by the landlord or property management company. The time it takes to get approved for an apartment can vary depending on several factors. Let's take a closer look at these factors to understand how long the approval process may take.
1. Completing the Application: The first step towards getting approved for an apartment is filling out the rental application accurately and thoroughly. This includes providing personal information, rental history, employment details, and references. The time it takes to complete the application can vary depending on how organized and prepared you are. It is advisable to have all the necessary information and documents ready in advance to expedite the process.
2. Background and Credit Check: After submitting your application, the landlord or property management company will typically conduct a background and credit check. This step is crucial for them to assess your financial stability and ensure you have a clean criminal record. Background and credit checks can take anywhere from a few hours to a few days, depending on the efficiency of the screening process.
3. Verifying References and Employment: Landlords often contact references and employers provided in the application to verify the information provided. This may involve reaching out to previous landlords, supervisors, or colleagues to gather insights about your character, punctuality, and ability to pay rent on time. The time it takes to complete this step largely depends on the responsiveness of your references and employers.
4. Waiting for Approval: Once all the necessary checks and verifications have been completed, the landlord or property management company will review your application in its entirety. They will consider factors such as your credit history, income, rental history, and references to make an informed decision. The duration of this review process can vary depending on the volume of applications received and the diligence of the landlord.
5. Negotiating Lease Terms: After approval, you may need to negotiate lease terms with the landlord. This can involve discussing rent, security deposit, lease duration, and any additional clauses. The negotiation process can take a few days or longer, depending on the landlord's availability and willingness to accommodate your requests.
In conclusion, the time it takes to get approved for an apartment can range from a few days to a few weeks. To expedite the process, it is essential to be proactive, organized, and responsive. Being prepared with all necessary documents, having good references, and a stable financial history can increase your chances of a quick approval. Keep in mind that each landlord or property management company may have their own unique timeline and procedures, so it is always a good idea to inquire about their specific process upfront.


text: In another thread, I explained that it is easy to show that the function defined by f(x) = x, if x is rational; 0, if x is irrational, approaches 0 at 0 using epsilon-delta. However, I am stuck in trying to show that f does not approach any number at a if a =/= 0 using the epsilon-delta definition for limits (NOT the sequential definition, which I will learn soon). Assuming the fact that the rationals and irrationals are dense in the reals, it's easy to show that f does not approach any number near a for the function f(x) = 1, if x is rational; 0 if x is irrational. But when x is allowed to vary, I'm not sure which epsilon I should be choosing. I always end up with two sets of inequalities that do not seem to lead to a contradiction. Any hints are appreciated.


text:
1530s, from L. explodere "drive out or off by clapping," originally theatrical, "to drive an actor off the stage by making noise," hence "drive out, reject" (a sense surviving in an exploded theory), from ex- "out" + plaudere "to clap, applaud," of uncertain origin. English used it to mean "drive out
with violence and sudden noise" (1650s), later, "go off with a loud noise" (Amer.Eng. 1790); sense of "to burst with destructive force" is first recorded 1882; of population, 1959. Related: Exploded; exploding.
verb (used without object)
1. to expand with force and noise because of rapid chemical change or decomposition, as gunpowder or nitroglycerine (opposed to implode).
2. to burst, fly into pieces, or break up violently with a loud report, as a boiler from excessive pressure of steam.
3. to burst forth violently or emotionally, especially with noise, laughter, violent speech, etc.: He exploded with rage when contradicted.
4. Phonetics. (of plosives) to terminate the occlusive phase with a plosion. Compare implode (def. 2).
5. Golf. to play an explosion shot on a golf ball.
verb (used with object)
6. to cause (gunpowder, a boiler, etc.) to explode.
7. to cause to be rejected; destroy the repute of; discredit or disprove: to explode a theory.
8. Phonetics. to end with plosion.
9. Golf. to play an explosion shot on (a golf ball).
10. Obsolete. to drive (a player, play, etc.) from the stage by loud expressions of disapprobation.


text:
The objective of the activity is to develop congestion-aware, Quality-of-Service-aware, multipath unicast and multicast routing and network management protocols for constellations with large number of satellites equipped with inter-satellite links (RF and optical). The protocols are implemented and tested in a testbed.
- Development of space-ready hardware that supports routing on several Gigabit network interfaces
- Design of effective load-balancing solutions for routing in Satellite Constellation Networks (SCNs)
- Interoperability with existing terrestrial networks
Current fully operational satellite services only support so-called bent-pipe channels, that is simply receive data from ground and forward it to another (fixed) ground station. In contrast, the technology developed in this project allows routing the data in orbit between several satellites and delivering it directly to the destination.
Several projects worldwide are aiming at deploying a satellite network that also supports in-orbit routing, with up to 300 Mbps in the final deployment stage and even with up to two Inter-Satellite-Links (ISLs) per satellite. The hardware developed in this project aims to support user data rates up to 1 Gbps and can route traffic between four ISLs, allowing faster routes than at systems with only up to two ISLs. In addition, the load-balancing and management capabilities of the routing protocols aim to ensure network operability even in the most adverse conditions.
The intended work mainly entails the development and implementation of a load-balancing routing protocol for a Low Earth Orbit (LEO) Satellite Constellation Network (SCN). The resulting scheme should find the best path in a non-uniformly congested and dynamic network with different QoS classes, while making the best use of the available capacity. To this end, a system-level software simulator, as well as a hardware demonstrator, which allow for configurable in-depth analysis, are developed. The selected routing solution is a dynamic decentralized routing scheme, based on Software Defined Networking (SDN).
The project entails the development of two different systems: A hardware demonstrator, that consists of the final routing hardware and a verification environment, and a system-level software simulator, capable of simulating traffic in entire Satellite Constellation Networks (SCNs). The hardware demonstrator consists of the routing hardware, which is the Device Under Test (DUT), and peripheral systems that generate the test traffic and facilitate device evaluation. The DUT implements the proposed routing and management protocols in both, control and data plane. It routes traffic between its four ISLs and two Earth-Satellite-Links (ESLs): a feeder link that connects to a gateway and one user link that aggregates traffic from all users in a satellite's coverage area.
The simulator is a model-based, modular software simulation of entire SCNs. It can simulate varying user distributions, traffic types and classes as well as different and dynamic network topologies. Thus, it is capable of representing the entire complexity of delivering Internet connectivity via Satellite Constellation Networks (SCNs).
The project is divided into seven main work packages:
- Output 0: Defined Reference Scenario
- Output 1: Finalised Technical Specification
- Output 2: Selected Technical Baseline
- Output 3: Preliminary Design Baseline
- Output 4: Implementation and Verification Plan
- Output 5: Verified Deliverable Items and Compliance Statement
- Output 6: Technology Assessment and Development Plan
The nine main project milestones are:
- MS0: Kick-off Meeting at the beginning of the project (07/2021)
- MS1: Review Output 0 (09/2021)
- MS2: Review Output 1 (10/2021)
- MS3: Review Output 2 (11/2021)
- MS4: Review Output 3 (09/2022)
- MS5: Review Output 4 (09/2022)
- MS6: Review Output 5 (05/2023)
- MS7: Review Output 6 (06/2023)
- MS8: Final review at the end of the project (06/2023)
Output 1: Finalised Technical Specification ongoing.
- Output 0: Defined Reference Scenario


expressed as follows:
L(T)W=t=1TL(T)W(t)\boxed{\frac{\partial \mathcal{L}^{(T)}}{\partial W}=\sum_{t=1}^T\left.\frac{\partial\mathcal{L}^{(T)}}{\partial W}\right|_{(t)}}
Consider a RNN that has only output to hidden layer recurrence. What are its advantages or disadvantages compared to a RNN having only hidden to hidden recurrence?
An RNN that has only output-to-hidden layer recurrence is what's known as a one-to-many RNN. Such RNNs may take in an input at only the beginning time-step, and for the rest o the network use only its own outputs as sources for subsequent hidden layers. Such networks are extremely useful for generating sequences from a very small or short sequence. However, compared to hidden-to-hidden recurrence, they may forget data from time-steps further in the past (i.e., more gradient instability). As time goes on, more of the data the network learns from may consist of the network's own outputs (hence more limited in applications).
What is Teacher forcing? Compare and contrast with BPTT.
Teacher forcing is a strategy for training recurrent neural networks that uses model output from a prior time step as an input. Teacher forcing works by using the actual or expected output from the training dataset at the current time step y(t)y(t) as input in the next time step X(t+1)X(t+1), rather than the output generated by the network.
When we have both hidden-to-hidden and output-to-hidden feedbacks in recurrent neural networks, we can use both back propagation through time (BPTT) and teacher forcing learning methods.The main advantage of teacher forcing is to parallelize training of different time steps, where BPTT cannot exploit such parallelization.
What is the disadvantage of using a strict teacher forcing technique? How to solve this?
Unfortunately, too strict teacher forcing can result in problems in generation as small prediction error compound in the conditioning context. This can lead to poor prediction performance as the RNN's conditioning context (the sequence of previously generated samples) diverge from sequences seen during training
The disadvantage of strict teacher forcing arises if the network is going to be later used in a closed-loop mode, with the network outputs (or samples from the output distribution) fed back as input. In this case, the fed-back inputs that the network sees during training could be quite dfferent from the kind of inputs that it will see at test time.
In short, strict teacher forcing can result in poor performance on test or validation sequences.
Explain the vanishing/exploding gradient phenomenon for recurrent neural networks.
To train an RNN, people usually use backpropagation through time (BPTT), which means that you choose a number of time steps NN, and unroll your network so that it becomes a feedforward network made of NN duplicates of the original network, while each of them represents the original network in another time step.
unrolling an RNN
So BPTT is just unrolling your RNN, and then using backpropagation to calculate the gradient (as one would do to train a normal feedforward network).
Because our feedforward network was created by unrolling, it is NN times as deep as the original RNN. Thus the unrolled network is often very deep.
In deep feedforward neural networks, backpropagation has "the unstable gradient problem", as Michael Nielsen explains in the chapter Why are deep neural networks hard to train? (in his book Neural Networks and Deep Learning):
[…] the gradient in early layers is the product of terms from all the later layers. When there are many layers, that's an intrinsically unstable situation. The only way all layers can learn at close to the same speed is if all those products of terms come close to balancing out.
I.e. the earlier the layer, the longer the product becomes, and the more unstable the gradient becomes. (For a more rigorous explanation, see this answer.)
Another issue is that the product that gives the gradient contains many instances of the same term. I.e., The product that gives the gradient includes the weights of every later layer.
So in a normal feedforward neural network, this product for the ddth-to-last layer might look like:
w1α1w2α2 wdαdw_1\cdot\alpha_{1}\cdot w_2\cdot\alpha_{2}\cdot\ \cdots\ \cdot w_d\cdot\alpha_{d}
Nielsen explains that (with regard to absolute value) this product tends to be either very big or very small (for a large dd).
But in an unrolled RNN, this product would look like:
wα1wα2 wαdw\cdot\alpha_{1}\cdot w\cdot\alpha_{2}\cdot\ \cdots\ \cdot w\cdot\alpha_{d}
as the unrolled network is composed of duplicates of the same network.
Whether we are dealing with numbers or matrices, the appearance of the same term dd times means that the product is much more unstable (as the chances are much smaller that "all those products of terms come close to balancing out").
And so the product (with regard to absolute value) tends to be either exponentially small or exponentially big (for a large dd).
In other words, the fact that the unrolled RNN is composed of duplicates of the same network makes the unrolled network's "unstable gradient problem" more severe than in a normal deep feedforward network.
Why don't we see the vanishing/exploding gradient phenomenon in feedforward networks?
In non-recurrent feedforward networks, it is possible to produce unstable gradient problems with a sufficiently large network (and one without regularization). That being said, this is rarely the case, and the number of layers gradients have to be passed through in a very deep MLP is typically far less than the number of time-steps for which gradients in an RNN need to be computed.
The main reasons for the vanishing/exploding gradient problem are the following traits of BPTT in RNNs:
 - An unrolled RNN tends to be a very VERY deep network.
 - In an unrolled RNN the gradient in an early layer is a product that (also) contains many instances of the same term.
What is the key difference in architecture of LSTMs/GRUs compared to traditional RNNs?
All RNNs have feedback loops in the recurrent layer. This lets them maintain information in 'memory' over time. But, it can be difficult to train standard RNNs to solve problems that require learning long-term temporal dependencies. This is because the gradient of the loss function decays exponentially with time (called the vanishing gradient problem).
LSTM networks are a type of RNN that uses special units in addition to standard units. LSTM units include a 'memory cell' that can maintain information in memory for long periods of time. A set of gates is used to control when information enters the memory, when it's output, and when it's forgotten. This architecture lets them learn longer-term dependencies. GRUs are similar to LSTMs, but use a simplified structure. They also use a set of gates to control the flow of information, but they don't use separate memory cells, and they use fewer gates.
What is the difference between LSTM and GRU?
Structural Differences
While both GRUs and LSTMs contain gates, the main difference between these two structures lies in the number of gates and their specific roles. The role of the Update gate in the GRU is very similar to the Input and Forget gates in the LSTM. However, the control of new memory content added to the network differs between these two.
In the LSTM, while the Forget gate determines which part of the previous cell state to retain, the Input gate determines the amount of new memory to be added. These two gates are independent of each other, meaning that the amount of new information added through the Input gate is completely independent of the information retained through the Forget gate.
As for the GRU, the Update gate is responsible for determining which information from the previous memory to retain and is also responsible for controlling the new memory to be added. This means that the retention of previous memory and addition of new information to the memory in the GRU is NOT independent.
Another key difference between the structures is the lack of the cell state in the GRU, as mentioned earlier. While the LSTM stores its longer-term dependencies in the cell state and short-term memory in the hidden state, the GRU stores both in a single hidden state. However, in terms of effectiveness in retaining long-term information, both architectures have been proven to achieve this goal effectively.
Speed Differences
GRUs are faster to train as compared to LSTMs due to the fewer number of weights and parameters to update during training. This can be attributed to the fewer number of gates in the GRU cell (two gates) as compared to the LSTM's three gates.
In the code walkthrough further down in this article, we'll be directly comparing the speed of training an LSTM against a GRU on the exact same task.
Performance Evaluations
The accuracy of a model, whether it is measured by the margin of error or proportion of correct classifications, is usually the main factor when deciding which type of model to use for a task. Both GRUs and LSTMs are variants of RNNS and can be plugged in interchangeably to achieve similar results.
Explain Gradient Clipping.
Adam and RMSProp adjust the size of gradients based on previously seen gradients. Do they inherently perform gradient clipping? If no, why?
Adam and RMSProp make multiplicative adjustments


text:
The New York City Council released a study today entitled, "The Middle Class Squeeze," a report that details how New York City's middle class is shrinking as a percentage of the city's working-age population.
The study – which uses the Area Median Income (AMI) standard developed by the federal Department of Housing and Urban Development (HUD) to define the middle class – outlines the striking economic challenges for New York City's middle-class families.
Most remarkably, the study found New York City is one of the most expensive places to live in the country: Manhattan and Brooklyn ranked first and second with the most expensive housing costs out of 300 U.S. metropolitan areas. Queens ranked seventh.
In sheer numbers, the city's middle class has seen growth between 1989 and 2012, gaining 129,000 middle class adults.
However, the number of middle-class residents as a percentage of the total population has gotten smaller, as well as the overall median income of middle-class residents (see chart).
In addition, the number of poor residents in the City has grown significantly, causing what researchers are terming the "hollow in the middle" effect, where the middle gives way to a heavier top and bottom.
The City's share of residents who are college-educated or better is higher than the nation as a whole.
But the percentage of the population without a high school diploma fell, as well as those associated with the middle-educated section of the City's population – those with some college population or an associate degree, reflecting the same "hollow in the middle" income polarization.
Also, between 1989 and 2012 the City's middle class also has grown more diverse, a trend that largely reflects the growing Hispanic and Asian populations in the city. However, although the chance that an African-American, Hispanic or Asian was in the middle class remained relatively stable throughout the period, the representation of African-American and Hispanic middle-class households has fallen.
The report also found:
- Jobs paying middle class wages are increasingly scarce.
- Since 2001, median rents for middle class households rose by 6.2%, the price of a condominium apartment increased by 47%.
- New York City's middle class unemployment rate is 6.2%, three times higher than it was in 2008 and 75% higher than in 1989.
- In 1989, more than half of the city's working age high school graduates were in the middle class. Today only a third are in the middle class.
"Clearly the middle class wants to be here, but it's getting harder to stay," said Council Speaker Christine C. Quinn. "This report demonstrates the need to address long-term housing costs, develop opportunities for middle class workers and help create a New York City that middle class families continue to seek out as a place to call home."
To read the report online, please visit _URL_.


First Duke of Marlborough
Duke of Marlborough
The Dukedom of Marlborough (named after Marlborough, "Maulbruh"), is a hereditary title of British nobility in the Peerage of England. The first holder of the title was John Churchill, 1st Duke of Marlborough (1650–1722), the noted English general, and indeed an unqualified reference to the Duke of Marlborough in a historical text will almost certainly be a reference to him.
The Dukedom was created in 1702 by Queen Anne; John Churchill, whose wife was a favourite of the Queen, had earlier been made Lord Churchill of Eyemouth in the Scottish peerage (1682), which became extinct with his death, and Earl of Marlborough (1689) by King William III. Anne further honoured Churchill, after his leadership of the victories against the French of 13 August 1704 near the village of Blenheim (German Blindheim) on the Danube River (Battle of Blenheim), by granting him the royal manor of Woodstock, and building him a house at her own expense to be called Blenheim. It was commenced in 1705 and was completed in 1722, the year of his death. Blenheim Palace remains the Marlborough ducal seat.
The first Duke was also honoured with Imperial titles: Emperor Joseph I created him a Prince of the Holy Roman Empire in 1704, and in 1705, he was created Imperial Prince of Mindelheim (once the lordship of the noted soldier Georg von Frundsberg). However, he was obliged to surrender Mindelheim in 1714 by the Treaty of Utrecht, which returned it to Bavaria. According to some sources, he received the principality of Mellenburg in exchange. Regardless, his Imperial titles did not pass to his daughters, so became extinct on his death in 1722.
The Duke of Marlborough holds certain subsidiary titles: Marquess of Blandford (created 1702), Earl of Sunderland (1643), Earl of Marlborough (1689), Baron Spencer of Wormleighton (1603), Baron Churchill of Eyemouth (1682) and Baron Churchill of Sandridge (1685) (all are in the English peerage.) The title Marquess of Blandford is used as the courtesy title for the Duke's eldest son and heir. The Duke's eldest son's eldest son in turn can use the courtesy title Earl of Sunderland.
The later Dukes of Marlborough are descended from the first duke, but not in the male line. Because the first duke had no surviving sons, the title was allowed (by a special Act of Parliament) to pass to his eldest daughter in her own right. A younger daughter, Lady Anne Churchill, married Charles Spencer, 3rd Earl of Sunderland (c. 1674–1722), and from this marriage descend the modern Dukes of Marlborough. They therefore originally bore the surname Spencer. However, George Spencer, the 5th Duke of Marlborough, obtained a Royal Licence to assume and bear the additional surname and arms of his famous ancestor, the 1st Duke of Marlborough, and thus became George Spencer-Churchill. This double-barrelled surname has remained in the family to this day, though some of the most famous members have preferred to style themselves as merely "Churchill".
The Dukedom of Marlborough is the only Dukedom in the United Kingdom that can still pass in the female line. However, the Dukedom does not follow male-preference primogeniture as most other peerages that can pass in the female line do. It actually follows a kind of Semi-Salic Law. The succession for the Dukedom is as follows:
 1. The heirs-male of the 1st Duke's body lawfully begotten;
 2. his oldest daughter and the heirs-male of her body lawfully begotten;
 3. his second and other daughters, in seniority, and the heirs-male of their bodies lawfully begotten;
 4. his oldest daughter's oldest daughter and the heirs male of her body lawfully begotten;
 5. all other daughters of his daughters and the heirs male of their bodies;
 6. and other descendants into the future in like fashion, with the intent that the Marlborough title never become extinct.
However, it is now very unlikely that the Dukedom will be inherited in the female line again, as all the male heirs of Anne Spencer, Countess of Sunderland – including the line of the Earls Spencer as well as the Spencer-Churchill family – would have to go extinct. If that were to happen, the Churchill titles would pass to the Duke of Bedford as heir-male of Diana Russell, duchess of Bedford, a sister of the third Duke of Marlborough. Should Diana's male issue go extinct, the next in line is the Earl of Jersey, the heir-male of Anne Villiers, Countess of Jersey, daughter of Elizabeth Egerton, Duchess of Bridgwater, a younger daughter of the first Duke.
The 7th Duke of Marlborough was the paternal grandfather of the British Prime Minister Sir Winston Churchill (who was born at Blenheim Palace).
The present Duke of Marlborough is John George Vanderbilt Spencer-Churchill, 11th Duke of Marlborough.
The title of Earl of Marlborough, which was created for Churchill in 1689, had been created one time previously in British history, for James Ley, in 1626. This title had become extinct in 1679.
Spanish motto
The meaning of the motto, Fiel pero desdichado (Faithful but unfortunate), can be related to the fact that as a consequence of his loyalty to the king, the first duke lost his home and lands. It is original having the motto in Spanish and not in Latin. That could be related to the fact that the first duke become honored after the battle of Blenheim, decisive in the War of the Spanish Succession.
Earls of Marlborough, first creation (1626)
Earls of Marlborough, second creation (1689)
Dukes of Marlborough (1702)
Heir apparent: Charles James Spencer-Churchill, Marquess of Blandford (b. November 24 1955)
Lord Blandford's Heir: George Spencer-Churchill, Earl of Sunderland (b. July 28 1992)
See also
External links
Search another word or see First Duke of Marlboroughon Dictionary | Thesaurus |Spanish
Copyright © 2014, LLC. All rights reserved.
 - Please Login or Sign Up to use the Recent Searches feature


text:
Cortisol and growth hormone (GH) deficiencies are causes of neonatal hypoglycemia. When they coexist, a pituitary disorder is suspected. We present an infant with hypoglycemia in whom an ACTH receptor defect was associated with transient GH deficiency. A full-term boy with consanguineous parents presented with hypoglycemia (serum glucose 18 mg/dL) at 4 hours of life with undetectable serum cortisol (<1 μg/dL). Examination showed diffuse hyperpigmentation with normal male genitalia. Patient developed hyperbilirubinemia and elevated transaminase levels. GH levels of 6.8 ng/mL and 7.48 ng/mL during episodes of hypoglycemia, peak of 9.2 ng/mL with glucagon stimulation, and undetectable IGF-1 suggested GH deficiency. Thyroid function, prolactin, and gonadotropins were normal. Baseline ACTH was elevated at 4868 pg/mL, whereas serum cortisol remained undetectable with ACTH stimulation. Hydrocortisone replacement resulted in normalization of blood glucose and cholestasis with decline in ACTH level. GH therapy was not initiated, given improvement in cholestasis and euglycemia. An ACTH receptor defect was confirmed with molecular genetic testing that revealed homozygosity for a known mutation of the melanocortin 2 receptor (MC2R) gene. At 12 weeks, a random GH level was 10 ng/mL. IGF-1 was 75 ng/mL and 101 ng/mL at 7 and 9 months, respectively. This report describes glucocorticoid deficiency from an MC2R mutation associated with GH deficiency. With glucocorticoid replacement, GH secretion normalized. Our findings are consistent with a previously stated hypothesis that physiologic glucocorticoid levels may be required for optimal GH secretion.
- adrenocorticotrophic hormone
- cortisol deficiency
- growth hormone deficiency
ASJC Scopus subject areas
- Endocrinology, Diabetes and Metabolism


Battle of the Books
Who will Win the Battle of the Books?
Battle Of The Books Logo
Please remember: OCPS Code of Conduct (including appropriate dress) is in effect on battle day. No chewing gum will be allowed on site.
 1. Each six-member team will need a captain. Only five members will participate in each round. The extra student is an alternate. The alternate may change between battles, but the team captain must play every round. While all members playing a round may discuss the questions and possible answers, only the captain speaks for the team. Schools are allowed a maximum of six students.
 2. Each round will consist of forty-six (45) questions. Teams will have 20 seconds to discuss their answer after the question has been read. The captain may respond with an answer at any time within the 20 seconds. At the end of 20 seconds the captain will be asked to answer within five (5) seconds.
 3. Each battle room will have someone to tally points and keep time.
 4. Rules:
 1. The team on the judge's right will call the coin toss. The winner of the toss is asked the first question.
 2. The judge begins by giving the title of the book from which the question is taken.
 3. After the question is read, the team will have 20 seconds to discuss their answer. At the end of the 20 seconds, the team captain must give a response within five (5) seconds.
 4. If the answer is correct the judge indicates so and turns to the other team for the next question. One point is awarded for each correct answer. No points are deducted for incorrect answers.
 5. Play continues in this manner. If an answer is incorrect, the judge reads the question to the opposing team.
 6. If that team can give the correct answer within five (5) seconds after the question is read they are awarded the point and continue with the next question (because it is their turn either way).
 7. If the opposing team answers incorrectly or not within the five (5) seconds nobody is awarded a point. The judge never reads the correct answer for unanswered questions. Please do not ask. The opposing team gets the next question because it is their turn.
 8. Play continues until all forty-five (45) questions have been asked.
 9. PROTESTING ANSWERS: If a team feels their answer was correct they must ask for the answer to be checked before that question is passed to the other team. Play should continue with the next question until the answer to the challenged question can be verified. If the challenging team's answer is determined to be incorrect play continues with the question being offered to the other team. If a team makes a challenge which is denied they will lose one point. Only the Team Captain may issue a protest. Sponsors and alternates may not protest answers. Visitors may not speak during a battle.
 5. Scoring
 Points from each of the five round-robin tournaments will be totaled. The two teams with the highest totals will play in the final battle. During the final Battle, all six team members may participate. In the event of a tie at the end of the final battle, questioning will continue until one team misses an answer and the other team is able to answer that question correctly. The final battle is a timed event (20 minutes). If a team is already considering a question when time is called they will be allowed to answer, but if the question is still being read the battle is declared over.


text:
Objective: To report on the chiropractic care of a 6 year old female with subluxations, constipation and neck pain.
Clinical Features: A 6 year old female with constipation, neck pain, vertebral subluxations and gastrointestinal pain.
Interventions and Outcomes: High-velocity, low-amplitude (HVLA) adjustments at specific vertebral locations were administered at the areas of vertebral subluxation. Mother and patient reported bowel movements improving from once every 4-5 days to bowel movements every day along with resolution of neck pain.
Conclusion: Successful chiropractic care for a patient with a challenge in lifestyle due to irregular and sporadic bowel movements. Frequency of bowel movements was achieved as well as a decrease in gastrointestinal and cervical pain.
Author Keywords: Chiropractic, constipation, gastrointestinal tract, vertebral subluxation, pediatric
This abstract is reproduced with the permission of the publisher; full text by subscription.


Why Do We Wear Black?
Can you wear all black to work?
It's really not terribly unusual to wear a lot of black.
It's an incredibly common color, especially for professional wear.
And you're not even in all black — you're wearing light-colored cardigans.
And you know, even if it were something like daily head-to-toe hot pink, your coworkers' behavior would still be crappy..
Why do people wear black?
Black. "Black is a color that is taken seriously" says a fashion and style expert, Karen Haller. … People who prefer to wear black clothing are ambitious, purposeful but also sensitive. As a rule, they are emotional and easily excitable, although they often try to hide it.
Is it bad to wear all black?
Nothing wrong with all black, but it can be a bit boring if you don't try to play with the silhouette, though perhaps the blue ocbd/khaki chinos combo is more boring than that. Black is also a very bold and stark color so it can be harder to feature in an outfit, but it's still fairly versatile.
What does it mean when a woman wears black?
Your girl may be habitually wearing black to show her awareness of the bad things in the world, like famine, animal testing, war, or sexual violence.
What does wearing all black symbolize?
Black represents power, elegance, discipline and mystery. Sometimes, it's associated with evil and grieving. Wear black to communicate an authoritative image or protect emotions. Since too much black can overwhelm some, don't wear it when you want to establish rapport.
What does it mean when a woman wears a black dress?
Women in particular often wear all black because they are trying to be "more than what they appear." They want to divert attention from how they look onto what they do, or who they are. … Black is the color to wear when you're trying to impress, reassure or woo.
Is black a bad luck color?
4.) Black is not the happiest of colors in traditional Chinese color symbolism, representing destruction, evil, cruelty, and sadness. The Chinese word for black is 'hei' which stands for bad luck, irregularity, and illegality.
Why is wearing black bad?
Black is simply hard to wear. It tends to accentuate fine lines, blemishes and dark circles when worn close to the face.
Is wearing all black attractive?
Now, a study has confirmed that wearing black makes you appear more attractive, intelligent, and confident, the Independent reports. The study surveyed over 1,000 people to find which colors they most associated with certain qualities. … Sixty-six percent of women thought black was the most attractive color on a man.
What colors do guys find most attractive?
Now, if you haven't guessed it already, the colour that most men and women find attractive is the colour red.
Does wearing black make you look older?
According to colour consultants, wearing black can dramatically age the face by highlighting dark lines under the chin, shadows around the eyes and wrinkles on the cheeks.
Is all black a good look?
It is not hard to… Black is elegant and chic; black is slimming; black looks good on all skin tones; black looks good with all hair colors; black looks as good on men as it does on women. The dress code makes clothes buying and getting dressed in the morning easier.
How do I stop my emo from wearing black?
If you're just tryna look cute out here, here are my tips on how to wear all black outfits without looking emo!…Add some dainty and feminine jewelry. … Put on a bright coloured lipstick. … Wear neutral eye makeup. … Throw on a coloured accessory or two. … Layer different textures.


text:
From Ohio History Central
The exterior of Merrick Hall, named for Ohio Wesleyan University President Frederick Merrick (_PHONE_), was built as a science building and alumni hall. It was constructed of Delaware limestone from the Blue Limestone Quarry. Due to the university's financial straits and low enrollment during the Civil War (_PHONE_), raising funds to construct the building covered many years from groundbreaking in 1868 to dedication in 1873. Merrick Hall is listed on the National Register of Historic Places.
Ohio Wesleyan University received its charter from the state of Ohio in 1842. The first college classes were offered in 1844. The school was associated with the Methodist Church from the beginning. It was located in Delaware, Ohio. Between 1842 and 1844, Ohio Wesleyan was a preparatory school. Students paid a total of ninety dollars a year to attend Ohio Wesleyan in the 1840s: tuition cost thirty dollars, room and board cost fifty-nine dollars, and there was one dollar in additional expenses.
Originally, only men attended Ohio Wesleyan. Ohio Wesleyan Female College began to offer classes in 1853. It was not until 1877 that the Female College became part of Ohio Wesleyan University. Three women who had been instructors at the female college became the first female faculty members at the university.
Throughout the nineteenth century, Ohio Wesleyan experienced a number of problems. During the Civil War, the college faced financial difficulties, as both students and faculty joined the Union war effort. At various times, there were debates as to whether fraternities should be allowed on campus. At one point, fraternities were banned, but later they were allowed to return. Ohio Wesleyan officially received university status in 1897.
Ohio Wesleyan continued to grow in the twentieth century. Debates over sororities and fraternities continued, and wars also continued to have an impact on the school. Half of the male student population served during World War I, and the student population once again decreased during World War II. The curriculum changed from a classical liberal arts focus to practical preparation for specific occupations. Students were allowed to declare a major for the first time in 1919. The Great Depression caused financial difficulties for Ohio Wesleyan, but administrators trimmed the budget and the school survived. During the 1960s and 1970s, campus unrest led to the students having more of a say in campus decision-making. As a result of student protests, the university modified requirements that students attend religious services and placed less of a focus on religion in education. The university also offered new courses. Economic concerns and plans for the future have led university administrators to institute a number of fund-raising campaigns in recent years.
- Crook, Isaac. The Great Five: The First Faculty of the Ohio Wesleyan University. New York, NY: Eaton and Mains, 1908.
- Hubbart, Henry Clyde. Ohio Wesleyan's First Hundred Years. Delaware, OH: Ohio Wesleyan University, 1943.
- Jordan, Philip D. Ohio Comes of Age: _PHONE_. Columbus: Ohio State Archaeological and Historical Society, 1943.
- Lindley, Harlow. Ohio in the Twentieth Century: _PHONE_. Columbus: Ohio State Archaeological and Historical Society, 1942.
- Roseboom, Eugene H. The Civil War Era: _PHONE_. Columbus: Ohio State Archaeological and Historical Society, 1944.
- Tull, Barbara Mitchell. 150 Years of Excellence: A Pictorial View of Ohio Wesleyan University. Delaware, OH: Ohio Wesleyan University, 1991.
- Weisenburger, Francis P. The Passing of the Frontier: _PHONE_. Columbus: Ohio State Archaeological and Historical Society, 1941.


text:
Kelly Waugh, PT, MAPT, ATP
Barbara Crane, PhD, PT, ATP. University of Hartford
Successful outcomes in the provision of wheelchairs require an appropriate match between the seating support system and the wheelchair user's body; however, standard terms and measures have been lacking for communication of this critical information. There is significant inconsistency in the terms that are used to describe and measure wheelchair seating parameters (such as leg rest angle, seat height) and postural measures (such as hip angle, trunk lean, pelvic tilt). A common vocabulary of terms and measures is needed by clinicians, suppliers, manufacturers and technicians for accurate translation of assessment information into a seating prescription, and for effective set up of the prescribed product.
Additionally, the adoption of standardized measures will encourage collaborative research regarding the effect of seated posture on a wheelchair user's health, comfort and function. To address this need, we will develop and disseminate A Clinical Application Guide to standardized terms and measures related to wheelchair seating, translating a highly technical international standard into a format and language that is easy to understand and clinically useful. There is currently no single resource containing this information that is free, easily accessible and practical to use for health care professionals in the field of wheelchair prescription, service delivery and research.
Funding for this project was provided by the Paralyzed Veterans of America, Education Foundation Grant #668.
In this resource manual defining over 130 measurement terms, the authors present a complex ISO standard in a format and language that is easy to understand and practical to use. It includes the correct terminology for angular and linear measurements of the seated person's body and the seating support system. For each term the guide explains the purpose of the measure and its clinical relevance, with an accurate definition, a sample measurement procedure, and 1 to 2 illustrations helping to clarify each measure.
This glossary includes a searchable list of 550+ defined terms related to wheelchair, wheelchair seating, and wheelchair seated posture. The terms are organized functionally in four sections: (1) Wheeled Mobility Device Types and Related Terms, (2) Wheelchair Components and Features, (3) Seating Support System and (4) Angular and Linear Dimensions. Reference sources are included for each term and definition, and historical terms are linked to the preferred term in a comprehensive index.
Both of these resources are available for purchase and/or free download. For more information check out the Wheelchair Seating page under our Resources tab.
Waugh, K., Crane, B. Measuring Wheelchair Seated Posture and Seating Supports: Standardization of Terms and Methodologies. 28th International Seating Symposium, Vancouver, BC. March 7, 2012


Left Coast Voices
Archive for the tag "mind altering substances"
The New American Slave (Roger Ingalls)
Remember that game teachers played to help develop our logic and reasoning skills? They would hold up a picture and ask, "what's wrong with this picture" and we would have to figure it out.
Well, my fellow Americans, what's wrong with this picture?
Based on the incarceration numbers shown in this chart, it appears that many Americans suddenly became criminals during the Nixon administration and turned more evil during the Reagan administration.
Now, I ask you, does this really make sense? Did the citizens of the United States exponentially turn to the dark side during the 70s and 80s? Your gut is probably saying no, people don't change that drastically. Your intuition is correct, the people didn't change but the laws did.
Virtually overnight, human behavior was criminalized by Nixon's War On Drugs legislation. This was conservative backlash for the 1960's Enlightened Movements. Ten years later, the Reagans stepped into the Whitehouse. While the country was in a recession, Nancy spent a few hundred thousand dollars on new dinnerware and this didn't go over well with the public. The spin doctors came to her rescue and she became the Just Say No First Lady. The Sentencing Reform Act of 1984 came into existence along with harsh penalties for drug related crimes.
Nixon's prohibition of recreational drugs and the subsequent draconian penalties are responsible for the exponential growth of the prison and jail populations. To make matter worse, incarceration is becoming more privatized and the bigger prison companies are publicly traded. Wall Street expects these for profit companies to grow annually at a rate that is faster than the real crime rate. Do we see a problem here? The prison industry, their lobbyists and law enforcement need more criminalization of human behavior and harsher penalties to maintain jobs and profits.
Throughout history man has used mind altering substances, it's our nature. It is estimated that 30% of those incarcerated have committed non-violent drug related crimes.
Taxpayers can no longer afford an annual $70 billion bill for the War On Drugs.
We need to do away with the prohibition of recreational drugs and regulate them similar to tobacco and alcohol. We also need to do away with for profit incarceration that creates incentives for enslavement.
The 40 year experiment of criminalizing human behavior has failed.
Post Navigation
%d bloggers like this:


Take the 2-minute tour ×
I want to read each line of txt file which resembles something like this
1190/2132 123/23123 45
I want to read the whole line and then store them in three separate strings for future use to build a tree. I am using fgets right now, but getting errors regarding putting it into a string. How should i do it?
share|improve this question
add comment
4 Answers
Try this:
std::string line;
while(std::getline(file, line))
 std::stringstream linestream(line);
 std::string word1, word2, word3;
 line >> word1 >> word2 >> word3;
 // Store words
share|improve this answer
I was just about finished with the very same answer! :) – sbi Sep 21 '10 at 22:21
add comment
You've tagged the question C++, but you say you're using fgets, so I'm not sure which one you want.
Using C stdio functions:
fscanf(file, "%s %s %s", str1, str2, str3);
Using C++ streams:
input_stream >> str1 >> str2 >> str3;
share|improve this answer
add comment
This may work:
string a, b, c;
getline(cin, a, '/')
getline(cin, b,'')
//will only get executed if the third string exist
if(cin >> c){}
share|improve this answer
add comment
Stuff you need to get it work:
 - _TAG_ so that you can open the text file with a input file stream.
 - _TAG_ if you want to display some information on the screen as well but just optional.
 - The code part:
Pseudo code:
 - define a character array with length K, where K can be defined as a MACRO
 - open an input file stream
 - test if it is opened, if opened read a line and parse the line until the EOF.
 - if not opened, return -1.
The Code
int fileread(const char* filename, dataType& data /* some object saving the read info. */)
 char lntxt[MAX_LNTXT_LENGTH_CPTIMGIDX]; // 4)
 ifstream inSR(_filename); // 5)
 if (inSR.is_open()) // 6)
 // If file is open
 while (inSR.peek()>0)
 inSR.getline(lntxt, MAX_LNTXT_LENGTH_CPTIMGIDX);
 // delim can be a set of possible delim
 char* strTk = strtok(lntxt, _delim);
 while (strTk!= NULL)
 strTk = strtok(NULL, _delim);
 if (strTk!= NULL)
 // Your code to process the data, i.e. some arithmetic operation
 // or store it in other variables or objects.**
 return 0;
 else // 7)
 cout <<"The file " <<_filename <<" can not be opened.";
 return -1;
share|improve this answer
Avoid identifiers that begin with underscore. stackoverflow.com/questions/228783/… – Loki Astari Sep 22 '10 at 0:28
add comment
Your Answer


Solving the Korteweg-de Vries equation
The Korteweg-de Vries equation (KdV for short) is a type of nonlinear partial differential equation (PDE) which is commonly used to model the behaviour of waves in shallow water. Despite it being nonlinear, it is a PDE that possesses a special set of analytic solutions known as "travelling wave solutions". Here, we will look at one of those analytic solutions and how it is derived using coordinate transformations.
We shall begin with the standard KdV equation in 1 spatial dimension
Equation 1: KdV equation in 1D
where the solution u(x,t) represents the vertical displacement of water molecules at each position x and time t along a horizontal surface. To find a solution to this equation, we introduce a new coordinate
which acts as a "moving frame" (at a constant speed c, to be determined later). Then, using the chain rule (as explained in my previous story "Travelling wave solutions to partial differential equations") we arrive at the transformed equation
Equation 2: KdV in the new coordinate system
Note how this new equation is an ODE (e.g. the derivatives only depend on one variable as opposed to two). We can also write this as
which allows us to integrate both sides
Now, multiplying both sides by the first derivative of u yields
and using the chain rule of differentiation again we get
and finally integrating both sides again yields
Equation 3: transformed KdV equation in. terms of a single derivative
This is basically the same equation as before except we now only have one derivative term, everything else is some power of the solution u. At first glance this may not seem any easier to solve than our original KdV equation, but this has in fact a set of solutions in terms of "elliptic functions" for arbitrary constants A and B. We will however for the moment being focus on the special case A = B = 0 (the great thing about travelling wave solutions is we often can play around with the arbitrary constants to gain some insight), which yields the simplified ODE
Here, we can use separation of variables to obtain
and using a standard table of integrals for the left-hand side we obtain the solution in the original coordinate system
Equation 4: special solution to the KdV equation
This solution is known as a "soliton" or solitary wave, since it propagates at a constant speed c whilst retaining its characteristic shape. Although this solution is very constrained in terms of the initial conditions we can use for the PDE, it is exact, and is very useful for testing numerical algorithms used for this equation.
A simple MATLAB code which plots this function at different times t is shown below:
% Input parameters
L = 20;
T = 4;
x = linspace(0,L,201);
t = linspace(0,T,301);
c = 0.1;
% Analytic solution
step = 30;
[X1,T1] = meshgrid(x,t(1:step:end));
u = @(x,t) c/2*sech( sqrt(c)/2*(x — c*t) ).²;
% Plots
az_angle = 30;
el_angle = 60;
FS = '\fontname{Palatino} ';
pp = waterfall(X1,T1,u(X1,T1)); grid off;
pp.EdgeColor = 'k';
pp.LineWidth = 2;
xlabel([FS 'x (m)']);
ylabel([FS 't (s)']);
zlabel([FS 'u(x,t)']);
Figure 1: Soliton solution to the KdV equation using c = 6
As we can see in Figure 1, the multiple frozen snapshots of u(x,t) at different times show that the soliton propagates to the right along the x-axis at a constant speed, as expected from the travelling wave solution. What is interesting about this soliton solution in Eq(4) is that both the amplitude of the wave and the width of the wave are controlled by the speed of propagation c. For example, if I bring down c = 6 to c = 0.1, I produce the plot in Figure 2. In this case, the wave is barely moving within this time frame, but we can see its width has significantly increased. So what does this tell us about the behaviour of shallow water waves? It basically suggests that as the wave moves faster, it can only retain its stable "constant shape" without breaking by becoming narrower and narrower, which is consistent with what we would observe in nature.
Figure 2: Soliton solution to the KdV equation for c = 0.1
Oscar is a physicist, educator and STEM enthusiast. He is currently finishing a PhD in Theoretical Physics with a focus on photonics and stochastic dynamics.
Get the Medium app


Distance and digital learning during COVID-19 crisis: UNESCO Literacy Prizes laureates share their experiences
On 3 June 2021, UNESCO organized an online consultation with UNESCO International Literacy Prizes' laureates from previous years to inform this year's theme of International Literacy Day (ILD): "The right to literacy in times of COVID-19: Contributions of distance and digital learning". The programme representatives were invited to the meeting due to the diverse nature of their literacy learning activities and wide regional distribution, relevant for informing and adding to a rich discussion on the different way literacy learning programmes have coped with distance and digital learning during COVID-19.
The meeting brought together eight laureates who shared their respective experiences with distance and digital literacy learning, investigating the various kinds of distance learning solutions that were adopted in the different countries, communities and contexts. The laureates shared the challenges they faced in their transition and implementation of literacy learning to distance learning, and what they learned from these emergency responses that could feed into their programmes in the future.
The participating laureates included: Ageing Nepal and United World Schools (United Kingdom), both laureates of the UNESCO King Sejong literacy Prizes in 2020; BASABali from Indonesia, laureate of the UNESCO Confucius Prize for Literacy in 2019; Nigerian Prisons Service, winner of the Confucius Prize in 2018; the Centre for the Study of Learning and Performance, Concordia University (Canada), winner of the UNESCO King Sejong Literacy Prize in 2017; The Citizens Foundation, a Pakistani programme, and Fundza from South Africa, both winners of the UNESCO Confucius Prize for Literacy in 2017; We Love Reading, from Jordan, laureate of the UNESCO King Sejong Literacy Prize in 2017.
Some insights about the transition to distance literacy learning during the pandemic
Recognizing the importance of human interaction, most of the literacy programmes used hybrid approaches to distance learning combining face-to face instruction and distance learning of different kinds supported by high, lowand no-tech solutions. Digital tools were used for literacy instruction and teacher training, as well as for creating a virtual community to support peer interactions, where connectivity was possible. Other means of distance learning, low-tech solutions such as radio, TV and distribution of print handout were also used to ensure continuity of literacy learning during the pandemic, often combined with face-to face learning in small groups, for instance.
Distance learning, however, has posed a range of challenges, including digital divide in terms of infrastructure, the cost of digital tools, and digital skills of educators and learners. The real impact on learning outcomes are still to be understood.
Many representatives mentioned the need for appropriate infrastructure to implement distance learning for both high-tech solutions but also low-tech and no-tech practices.
Global Manager of the 'Centre for the Study of Learning and Performance', Ms Anne Wade, said. "In terms of infrastructure, one concern with this shift to using distance learning or distance education is that governments are going to assign a lot of money towards installing equipment in schools. But the concern would be that governments also address the teacher's professional development that goes alongside that, how to maintain and support that equipment overtime and finally how to replace that technology in the long term."
Furthermore, a majority of the programmes worked with learners who did not have access to digital learning nor to electricity. Chief Executive of 'United World Schools', Mr Tim Howarth said: "Within the context in which we work, in very remote villages typically with no electricity, almost always off the grid in terms of connectivity, had to make sure the programme was accessible and relevant to the communities."
Founder and director of the programme 'We Love Reading', Ms Rana Dajani, highlighted that the programme had to cope with many challenges including the cost of distance learning, the distribution of learning materials, an inadequate level of parents' literacy skills when teaching children, and the need for content to be adapted to learners in terms of language, culture, and learners' engagement.
Ageing Nepal stressed that older people needed to acquire basic literacy skills as a precondition to gain access to and use digital technology.
We Love Reading, United World Schools, the Citizens Foundation and Fundza highlighted the need for literacy learnings to be holistic. Issues of multilinguism, social and emotional learning, mental health, gender equality and economic disparities were highlighted as important elements to be incorporated in literacy distance learning.
Several participants also highlighted the opportunities that were created by the forced transition to distance learning. Controller of Correction of the Nigerian Prisons Service, Mr Frank Enabore put forward the case of learning in carceral environments and highlighted the positive side effects:
"What is significant with the e-learning platforms and distance learning programmes is that inmates now have a programme that outlives the period they spend in custody. Before, when we were having in-person learning programmes, if an inmate terminated his time in prison, it was not possible to keep contact with him or for him to continue the programme. Now, however, when inmates are leaving prison, they are still able to continue the programme. We are proud to say that we are still able to reach most of the convicts who left prison when we had our e-platforms in place and that they are making great progress."
Since 1967, UNESCO International Literacy Prizes have rewarded excellence and innovation in the field of literacy. Over 500 projects and programmes undertaken by governments, non-governmental organizations and individuals around the world have been awarded these prestigious Prizes, through which UNESCO seeks to support effective literacy practices and encourages the promotion of dynamic literate societies.


text:
-how.
This proposal takes its inspiration from the success of the Millennium Challenge Corporation launched in 2005 by the Bush administration to reduce poverty overseas, and is informed by Congressional proposals such as the Native Millennium Challenge Demonstration Act and the Rebuild Rural America Act. There may be ways to expand the authorities of an existing institution or programs rather than start from scratch, but it is vital to have a modern, state-of-the-art enterprise that aligns with each of the development principles articulated above. The ACC would be fundamentally different than any existing US domestic agency or program by:
- Providing large, five-year grants through "compacts" proposed and led by local leaders and organizations, with the goal of growing locally-led economies, reducing poverty and strengthening institutions, while respecting self-determination and local control.
- Selecting investments through an objective, competitive process informed by independent indicators. To help communities strengthen their readiness and improve their probability of selection, the ACC would have a robust "readiness" program that offers smaller grants, capacity-building assistance, and targeted support.
- Providing flexibility so that compacts are customized and designed to most cost-effectively achieve impact, to meet the unique needs and opportunities of communities, and to be adjusted as necessary during the life of the grant.
- Using a data-driven approach that invests in evaluation and rigorous analyses to identify community assets and assess high-value interventions, and that transparently measures the economic, environmental, and health outcomes of its programs.
Given that rural regions, including tribal nations, were the slowest to recover from the 2008 recession and have the highest prevalence of persistent poverty, we recommend that funding from the ACC be limited to rural communities and tribal nations in its first five years. It could then expand to a broader set of communities.
3. Elevate and expand domestic development finance.
Five-year grants like those described above will create initial momentum, but sustaining locally-led economic activity sufficient to improve community outcomes also requires adequate and relevant long-term financing options. Finding right-sized, affordable, patient capital is challenging in rural and tribal regions where market-rate financing often remains unaffordable, unavailable, or both.
Rural America had 33 percent fewer entrepreneurs operating businesses in 2018 than 1988, and the loss of community banks—40 percent of rural counties lost bank branches between 2012-2017—means those local entrepreneurs have difficulty finding financing to suit their particular needs. Communities are also challenged by significant infrastructure needs, especially broadband connectivity. Persistent poverty regions are chronically underserved, and a growing set of communities are newly vulnerable due to rapid economic shift in now-declining industries such as coal, timber, or manufacturing.
Some rural and tribal areas benefit from mission-driven institutions (e.g., Community Development Financial Institutions (CDFIs), Farm Credit System institutions, and Community Development Corporations) that federal policy enables. There are also a wide range of existing financing tools and loan funds dispersed throughout federal agencies. These are limited, however, by narrow authorities and mandates (e.g., housing, agriculture) and, as a whole, are significantly undercapitalized.
The result: fragmented financing sources with limited ability to take risks, innovate, and respond to community vision in a broad-based and ever-evolving way. It is time for the US to leverage its experience and history in innovative finance and elevate and expand the public development financing available to underserved areas in the US.
One model would be to create a new development finance institution (DFI) that builds upon existing tools and programs. This follows the template of the new US International Development Finance Corporation, created by the 2018 BUILD Act, which has considerably strengthened the US government's muscle overseas by combining complementary programs and financing mechanisms that existed in different agencies; taking on new, flexible authorities, such as the ability to make equity investments; and adding capital.
There is precedent for this: The US has had national development banks in the past, including the Reconstruction Finance Corporation (RFC) during the Great Depression. In fact, the RFC was the model for one of the world's most successful current DFIs, Germany's KfW, which the US helped create out of the Marshall Plan. KfW benefits from shared governance, with 80 percent of its ownership held by the national government and 20 percent by German states.
A national DFI would have greater flexibility and power to direct resources toward national-level strategic interests—for example, making it a priority for sufficient financing to reach rural and tribal areas—and to drive innovation that addresses unique financing needs than is possible within our current fragmented structure. Other models may achieve the same goal. This much is clear: To meet the urgency and scope of demand in underserved communities, the US must be as ambitious and creative at financing development here at home as it is abroad.
4. Elevate capacity building and evaluation.
Strengthening local institutions is fundamental to increasing local self-reliance and to shifting federal and state support away from supporting "projects" and toward supporting proven development strategies. Evaluation and the collection of more relevant data on activities and results are needed to create a feedback loop and understand what is achieved. To improve existing programs and maximize the development return, for every $90 dollars in federal funds invested in rural and community economic development, another $5 should be provided for local capacity building, with $5 more dedicated to program evaluation.
The term "capacity building" describes a wide-ranging set of activities that build the skills, governance processes, and finances of an organization or agency so it is stronger, more effective, and more sustainable. Evaluation entails intentionally collecting and analyzing quantitative and qualitative data on if and how a program is successful—and why.
Capacity building, evaluation, and adaptive learning are fundamental to modern international development successes that emphasize local ownership and facilitate continual improvement. By contrast, current federal investments in domestic community and economic development rarely allow funds to be used for either capacity building or evaluation. As a result, local leaders rarely have the necessary time or people to further develop or pursue locally-led innovations or solutions, and rural and tribal data lacks rigor that would be helpful to advance development.
The bottom line, we recommend this simple reform to existing programs: 5 percent mandated for capacity building, and 5 percent for evaluation. It will yield more autonomous communities and stronger local institutions, and increase transparency. It will also enhance our ability to continually improve programs, so we make better use of taxpayer dollars and more effectively improve economic, social, and health outcomes in rural and tribal communities.
COVID-19 is reminding us how integral rural and tribal communities are to strengthening America's competitiveness and resilience. The health of farmworkers in the Central Valley of California affects what shows up on shelves in Chicago; a rural North Carolina textile company retooling to make PPE means a safer workplace for front-line health workers in New York City.
Whether renewing small businesses, growing local ownership, strengthening regional supply chains for essential goods and services, or shifting to environmentally friendly energy, successfully reaching rural and tribal communities will require a coherent strategy, a commitment to investing in local people and institutions, and innovative tools of development finance. With nothing less than American competitiveness and the future of communities at stake, an agenda to modernize federal investments in rural and tribal communities and maximize the impact of every development dollar here at home deserves bipartisan support and attention.
Katharine Ferguson was formerly the Associate Director of the Aspen Institute Community Strategies Group and Director of CSG's Rural and Regional Initiatives. She is currently the Chief of Staff for the US Department of Agriculture.
Tony Pipa is a senior fellow in the Global Economy and Development Program at the Brookings Institution, where he studies place-based policies to improve social progress in the United States and globally; he has over 25 years of executive experience in the philanthropic and public sectors addressing poverty and advancing inclusive economic development both in the US and abroad.
Support for this article was provided in part by the Robert Wood Johnson Foundation. The views expressed here do not necessarily reflect the views of the Foundation.


Animal Soul Aggression & Fear Calming Reiki connects you and any animal on a deep soul level for understanding what the animal fears, and what is causing their discomfort and aggression. It works to bring a mutual trust between you and the animal, and soothes and calms them so they can learn to trust and let go of fears. Often when animals are aggressive it is because someone has mistreated them, or they are very afraid of something. Once you understand this and get a good idea of what is at the root of this behavior, you will be better able to help the animal be calm and soothe their emotions and energies.
This system also helps to soothe and calm fears and aggression that people may have towards animals. Most of the time this kind of think happens because people to do not understand the animal. People tend to fear what they don't understand. This is also true with animals. When a dog doesn't know what is expected of him, and he tries to do good but instead is yelled at, hit or worse, the dog has no understanding of what he did that was wrong. He learns to be afraid of he very people who are taking care of him and often love him. This can lead to things like fear biting or nervous anxiety in animals.
Allow animals to be animals, and gently teach them to trust and not fear you. With this attunement you will be empowered with the use of symbol to help you work with the energies.
Founder: Daelyn Wolf


text:
Groundwater Resources and Earthquake Hazards in the Los Angeles Basin
Periodic earthquakes and omnipresent water scarcity are two of the greatest challenges faced by Greater Los Angeles. Groundwater from the Los Angeles Basin supplies much of the drinking water for the area. As part of a cooperative project with the Water Replenishment District of Southern California and the Los Angeles County Department of Public Works to map the faults and the strata of the basin, the USGS drilled more than 30 monitoring wells. Scientists from the Geology Discipline and WRD were involved. They examined issues such as the rates of recharge of water infiltrated into groundwater from spreading ponds, and saltwater intrusion into freshwater aquifers along the coast.
The project resulted in new interpretations of the basin, including the recognition of ongoing tectonic deformation throughout most of the past several million years that has impacted the geometry and character of the sediments. These faults provide potential pathways for vertical migration of seawater and surface contaminants into the producing aquifers. This new framework should prove valuable in the design and operation of aquifer recharge projects, improve operations of seawater barriers, and identify areas of aquifer vulnerability. Overall, these efforts provided crucial information for sustainably managing the area's groundwater supply while also locating areas especially susceptible to earthquake shaking.
SOURCE: USGS Fact Sheet 086-02. Available online at _URL_
It is important to note that the USGS Disciplines evolved somewhat separately with different missions and organizational structures, as well as different clients. Therefore it is unrealistic to expect full integration of the various Disciplines. Full integration refers to the idea that you might make water resources or some central theme "the organizing principle for everything." However, one cannot reorganize the federal government to align each agency with every priority; hence entities must learn the arts of coordination, cooperation, and collaboration on complex objectives over a sustained period of years.


text:
During playback (your Little Musician lessons), you will need to know which keys and mouse clicks you can use to navigate your way through a lesson.
- To advance to the next slide, use the left-click on your mouse, or press the Right Arrow, Spacebar or Enter on your keyboard.
- To repeat the slide, click on your mouse-wheel or press the Down Arrow on your keyboard.
- To go back, use the right-click on your mouse or press the Left Arrow on your keyboard.
- To exit the playback, click on the ESC key, and you'll return to your Little Musician.
NOTE: If you want to use your keyboard to control lessons during playback, make sure that the Keyboard Lock is turned OFF (click once on the Keyboard Lock at the left side of the Play Panel so that the light turns red).


text:
Painting is an economical alternative to other finishing options, like powder coating. In painting sheet metal, the substrate is prepared for coating. Next, a primer is applied to the base metal, followed by multiple layers of paint. Finally, a protective coating, such as lacquer is added to protect the underlying paint.
Advantages of Painting Sheet Metal Products
Painting is a cost effective option for custom colors. If you need a specialty color, it can be matched to a paint color.
Unlike powder coating, painting does not require that parts be hung from a rack to apply. This makes it a viable option for a wider variety of shapes, sizes and weights of fabricated metal parts.
Painting does not require baking to cure, so is a better option for parts that may need multiple coats of different colors. You can also add paint to an isolated area of a part with an existing coat that would otherwise be affected by high temperatures.
Considerations of Painting vs Other Coatings
The cure time for painting can be several days, depending on the paint. Lead times for painted parts are generally longer than for powder coated parts.
Galvanized ferrous metals are the most difficult to paint. Ferrous metals contain iron; non-ferrous metals do not. Aluminum can be easier to paint than ferrous metals.
Painting can be less durable over a long period of time than powder coating.


text:
How bent spaghetti break
Bent dry spaghetti do not break in half but instead in three or more pieces. With the aim to explain this surprising phenomenon, we studied a related problem, namely the dynamics of an elastic rod that is bent quasi-statically and then suddenly set free. Counter-intuitively, we find that the mere release of the rod induces a stress increase. The multiple breaking of bent rods, like dry spaghetti pasta, can then be understood as a cascade of releases (loss of cohesion upon breakings) followed by stress increases leading to new cracks.


Running Business Central in Docker using SQL on the host
This is not my first blog post about how to use SQL Server on the host, but it is definitely the one describing the easiest way to do it. With the latest version of BcContainerHelper you can (with one Run-BcContainer command) create a container which uses SQL Server on the host as database engine for the container.
The functionality was actually enabled in version 1.0.14, but there are a few bug fixes, so I recommend that you use the latest BcContainerHelper
In order for the scripts in this blog post to work, you need to install SQL Server on the Docker Host with mixed mode authentication. The scripts will connect using Windows Authentication and the container will connect using Username/Password authentication.
New-BcContainer has a new parameter called –replaceExternalDatabases. This switch will only take effect if you also specify databaseServer, databasePrefix, databaseName and databaseCredential.
When ReplaceExternalDatabases is included, the New-BcContainer will do 4 things, which it typically doesn't do:
 1. Remove all databases on databaseServer with databaseInstance (might be empty) where the name starts with databasePrefix. This is done using a new function called Remove-BcDatabase.
 2. Restore databases (single or multitenant) from the selected artifacts to databaseServer with databaseInstance (might be empty) starting with databasePrefix. This is done using a new function called Restore-BcDatabaseFromArtifacts.
 3. Start the container using databaseServer with databaseInstance (might be empty) as database server and databasePrefix+databaseName as database name, connecting using databaseCredential for authentication.
 4. Create the default tenant (if multitenant) and add the default super user specified in $credential.
The following script should setup a container using SQL Server on the host:
$password = $passwordSecret.SecretValue
$licenseFile = $licenseFileSecret.SecretValueText
$auth = "UserPassword"
$credential = New-Object pscredential -ArgumentList 'admin', $password
$artifactUrl = Get-BcArtifactUrl -country us
$containerName = "bcserver"
$databaseParams = @{
 "databaseServer" = 'host.containerhelper.internal'
 "databaseInstance" = ''
 "databasePrefix" = "$containerName-"
 "databaseName" = 'CRONUS'
 "databaseCredential" = New-Object pscredential'sa', $password
 "multitenant" = $true
New-BcContainer _USER_ -replaceExternalDatabases '
 -accept_eula '
 -containerName $containerName '
 -credential $credential '
 -auth $auth '
 -artifactUrl $artifactUrl '
 -licenseFile $licenseFile '
Note: It uses $containerName followed by a minus as database prefix, meaning that all databases on the SQL Server on the host with a name starting with bcserverwill be deleted according to the #1 in the description above.
After running this script, I will have 3 databases in my SQL Server:
No SQL processes running in my container:
and after some initialization, a running Business Central Container:
Note: If you are using an SQL Server (not the host), you need the SQL Server Client Tools installed on the host – the functions Remove-BcDatabase and Restore-BcDatabaseFromArtifacts (used by the replaceExternalDatabases functionality) both have a dependency on SQLPS and the smoServer DLL.
If you want to create a second container, using the same database, you can use this script:
New-BcContainer _USER_ '
 -accept_eula '
 -containerName "$($containerName)2" '
 -credential $credential '
 -auth $auth '
 -artifactUrl $artifactUrl '
Only difference is really that the licenseFile and the replaceExternalDatabases parameters are NOT included.
Note: In the latest BcContainerHelper, the containerHelper will automatically share encryption keys between containers on the same host, which are connecting to the same external database. If you are creating a second container on a different host, you will need to copy the encryption key to the second host yourself.
The replaceExternalDatabases functionality uses the Remove-BcDatabase function to remove existing databases. You can of course use this function manually as well, simply by specifying databaseServer, databaseInstance (if not blank) and databaseName (or pattern), like:
Note: that this is a dangerous command to run on a SQL Server.
The replaceExternalDatabases functionality uses the Restore-BcDatabasesFromArtifacts function to restore the database backup file from a set of artifacts to a database server specified by databaseServer, databaseInstance (or blank) and databaseName, like:
$artifactUrl = Get-BCArtifactUrl -country dk
Restore-BcDatabaseFromArtifacts '
 -artifactUrl $artifactUrl '
 -databaseServer localhost '
 -databasePrefix prefix '
 -databaseName CRONUS '
 -multitenant:$false '
Specifying -async means that the function won't wait for the restore to complete. A file with the databasePrefix followed by databasescreated.txt will be created in the containerhelper folder when the restore is complete. Without async, the function will wait for the restore to complete.
Note: The New-BcContainer uses async and will add an override to the container SetupDatabase.ps1 script which waits for the databasescreated file to appear. If something fails in the database restore, this might lead to a endless loop.
Freddy Kristiansen
Technical Evangelist
12 thoughts on "Running Business Central in Docker using SQL on the host
 1. Hi Freddy,
 Awesome, I am running a container with a database on host and it's working but only if I turn off the Windows Firewall for the Public Profile! Very weird! Do you have any idea why this is happening?
 I can't even ping host.containerhelper.internal when the firewall is turned on for the public profile.
 Posted a question on stackoverflow but on answers 😦
 2. HI Freddy,
 Thanks for this update. When I try to use the script, it keeps on failing with the below error. I am using SQL Server 2019. Mixed mode authentication is already enabled.
 Waiting for database creation to finish…………………………………………………………..
 Import Encryption Key
 Cannot establish a connection to the SQL Server/Database.
 This could be due to one of the following reasons:
 * SQL Server is not started.
 * The database does not exist.
 * Proper permissions have not been given to the NAV Server Account.
 Try again later or contact your system administrator.
 at, C:\run\setupDatabase.ps1: line 152
 at, C:\Run\my\SetupDatabase.ps1: line 2
 at, C:\Run\navstart.ps1: line 121
 at, C:\Run\start.ps1: line 359
 at, : line 1
 Initialization of container bcserver failed
 At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.6\ContainerHandling\Wait-NavContainerReady.ps1:43 char:17
 + … throw "Initialization of container $containerName failed" …
 + CategoryInfo : OperationStopped: (Initialization …bcserver failed:String) [], RuntimeException
 + FullyQualifiedErrorId : Initialization of container bcserver failed
 3. Pingback: Restoring your online Business Central database locally | Freddys blog
Leave a Reply to MartonNagy Cancel reply
You are commenting using your account. Log Out / Change )
Google photo
Twitter picture
Facebook photo
Connecting to %s