When starting a new village, what are the sequence of buildings built?

Question: Obviously I know that everyone who is living there is going to want a house but what comes after? Do they build a butcher's building next or maybe a blacksmith's building? And what comes after that? Is a town hall only built once a village has become a town? Basically I want to know which buildings come first and in each successive step until you get to a city. Also, I've been looking at fantasy maps and the buildings all seem to surround a central spot that usually has a statue or fountain in it. Is that where the buildings first started?
Comment: It is vitally important how it is being started.  Many villages started when an inn -- set up a day's journey from the last inn -- slowly accumulated buildings because it was easier to make things locally than import them.
Comment: This depends a lot on why there is a town, for a satellite community it starts with processing whatever resource they are after, if not then it starts with food, farms or fishing. and you will have a lot of farms/homes before you get anything else. What comes next depends on the technology level and the local resources. there is no one answer.
Comment: It can't be general. When building a new village we start by building the exit lane from the highway, but I don't think you mean that. In the middle ages, I think the first communal building is usually the church (or maybe a barn in agricultural villages).
Comment: Yet another "it can't be general" comment.  They're started **for a reason**, and **you** have to decide the reason.  The two standard reasons are #1 trade (like at a crossroads, river ford, being a day's journey from the next town, etc) and #2 agriculture (there are many small farms in the area, and they petition the Church for a chapel.
Comment: So many possibilities. The answer changes depending on the circumstances - so give some background. Is it a planned settlement? What is the tech level? How hostile are the neighbours? Why did people want/have to settle there? What is the climate and terrain like? A settlement growing around a gold rush is different to a farming or fishing community, which is again different from a trade hub.
Comment: In what context? The question mentions fantasy maps, is it avswordsvandcdirdery, knights and kings village being founded? Or a settlement on a distant planet reached via cold-sleep spacecraft?  Or something in between?
Comment: @user2357112supportsMonica 'swords and sorcery' mangled by mobile keyboard.
Comment: You seem to think too much in terms of city-building-games: This is a house for living, this is a butcher, this a blacksmith. But in fact there is no such thing as a blacksmith _house_. If any of your villagers is a blacksmith (and yes, binging one along is probably a good idea), _their_ house will be the blacksmith's house. And in the beginning they may even share a building with the butcher (and the carpenter and even the mayor).
Comment: likely plowing farmland after that
Comment: this might be a good question for history stack, although you will have to give a real time period and location you are using for a model
Comment: @Mary I think you are right. The center of a new village will be food, drink and lodging for travelers, and then food, drink and socializing for residents.
Comment: It's supposed to be general. The basics used regardless of setting.
Comment: Is this a village that has been *deliberately* started as a result of some event or plan? Or is this an ancient village with roots in a long-forgotten group of starving, migrating hunter-gatherers who decided to give this newfangled "plow" tech a try.
Comment: I would spend diamonds building a worker hut maybe 2 or more then speed up the constructions, then chop down trees and give high rating for some free diamonds... wait what title are you playing? Oh wrong page.
Comment: Assuming a pre-modern setting, most workshops wouldn't be separate buildings, e.g. a blacksmith's house would contain their workshop.
Comment: @Jontia: What the heck is "avswordsvandcdirdery"?
Comment: Outhouse first!
Comment: @user11937382 I find I keep wanting to come back to this question to add more details to my answer only to find that the question is too broad.  When you ask a broad question where there are only 2 or 3  possible setups to consider, they can be okay, but without any frame reference for WHY this town exists, there are too many distinctly different yet possible answers so there is no way to provide a meaningful answer.
Comment: As asked, I've got to vote to close, but I think it would be a good idea if you were to create a new question that asks a more pointed question about the town you have in mind, like asking this same question, but about farming villages, or gold rush towns, or Roman Colonia, etc.  It is also important to add information about tech levels since modern, medieval, stone age, and futuretech towns would all progress very differently, even if founded for the same reasons.
Comment: Just listen to the first verse of Telegraph Road by Dire Straits: He built a cabin and a winter store/And he ploughed up the ground by the cold lake shore/And the other travellers came riding down the track/And they never went further, no, they never went back/Then came the churches then came the schools/Then came the lawyers then came the rules/Then came the trains and the trucks with their loads/And the dirty old track was the telegraph road
Answer: First is a little house, next to some sort of resource:
Farmable land, a stand of good wood trees, a nice fishing spot, whatever.
If the spot does not have good water, a well will soon follow. Of course, the spot needs to be really special for a settlement to start without a pre-existing good water source. And wells do not easily facilitate unlimited growth, so most villages start next to a river or around a fountain.
Goods are traded with distant neighbors or at the even more distant regional marketplace. Still, footpaths are established between places worth visiting. This starts the initial road network, along paths of necessity but along easy walking slopes in good terrain. Fences appear around valuable spots, and along the footpaths. You don't want the visitors to raid your orchard, and oh the headache if your sheep wander off onto the neighbor's pasture!
The population grows, the house(s) expand. They get tired of carting their produce to the marketplace over the hills, so they setup their own market stall. People start visiting this market, footpaths become cart-tracks become roads. The marketplace starts selling other settlements' produce. Some more permanent shops are set up. People build their houses nearby, as all that traveling is too much effort.
All of these people buying and selling want a place to eat, drink, socialize, so you get a tavern or similar gathering spot. The religious types complain about the louts frequenting the tavern, so they set up a church.
Everyone starts having kids, and the kids should not be stupid. So, lets build a school.
Now you have a rich community with lots of victims and valuables. Crime both internal and external. Better set up some Law.
The new sheriff keeps the peace well. More traders arrive, more settlers build houses. Growth everywhere. People start storing goods in bulk, and manufacturing new goods from those. Mines might be set up to satisfy the needs of this industry.
The village becomes prosperous, but the people start complaining about the few Elders wanting to run the whole show. They want a say in what happens, too! It doesn't help that by now most people have gone through school and can read and think for themselves. So, setup a town council. Hello politics! Hello large town tying to become a city.
The growth of a tiny settlement to a small village to a town to a city is a slow, organic growth system.
The extreme majority of such settlements die out, or stagnate at a smallish size, or are enveloped by their more successful neighbors. But the few that are truly successful will grow and become huge metros. And almost never is this growth planned in advance, the growth just seems to happen and then retroactive repairs to layouts get made to fix the silly mistakes of your ancestors. And some historical mistakes never get fixed, like those narrow, twist cobblestone streets of Europe. And some require gargantuan projects to fix the problem, like London's sewer and underground railway system.
About the specific question of a fountain, statue or square very often forming a centerpiece for a village:
This would almost always be near the center of the village, where two or more big roads cross, thus a place that everyone passes by. In those cases where this feature is in a clearing or square, that would be because that was the location of the Marketpace, when the market was still an open-air feature. Later the surrounding buildings became shops that absorbed the function of the marketplace, leaving an empty spot that was nonetheless a focal point of everyone's activity. A perfect spot to put up a statue!
Comment: @njzk2 Because -every- -single- small community in Europe, America, middle east, India, Central America and Africa has one. It is such an ubiquitous feature, one is ***much*** more likely to find a village with a church and no marketplace, than to find one with a marketplace and no church. Note "church" can also be "shrine" or "shaman's hut" or "druid's circle" or "ancestor's altar" or... any form of organized religion, virtually always with attendant priest/druid/shaman/toki/sangoma/whatever
Comment: @njzk2 false. As an extreme example, the High Pastafarian of the CHURCH of the flying spaghetti monster recently declaimed the Prime Auditor of the CHURCH of scientology as a "profit-seeking kook"..  The word "church" is much wider in scope than your limited definition of it.
Comment: So planned communities do exist if you examine the colonial history of the Americas, or probably even elsewhere.  A fortress with barracks, a company-town mine, a railroad stop, a trading site or harbor, etc.  This answer doesn't address this variety of settlement.
Comment: @Yakk but would these ex-forts be called  by the name "Village" as the OP asks? The answer tries to answer the question asked, not all similar questions
Comment: A village starts outside the fort, and grows into a city.  A colony ship arrives, and builds a settlement.  Some land is granted to a new government, who shows up with a corps of engineers and constructs a market village every X miles along a road while granting farmland to homesteaders.  Walt Disney wants to make a planned community near his theme park, and constructs a village before anyone moves in.  A wealthy farmer sees that the area could use a market, and takes a plot of land and builds services and houses there in order to create a village out of whole cloth.  Etc etc etc.
Comment: why specifically a church?
Comment: @PcMan "A church building, church house, or simply church, is a building used for Christian worship services and other Christian religious activities."
Comment: @PcMan as an organisation, sure. As a building, no.
Comment: Sooo... when do the brothels happen?
Comment: @Nosajimiki Don't those also fall under religious facilities, the same as the Beer dispensary? At least, people do seem to be quite devout in their attendance, of both. ;-)... Really though, that is covered by the "place to eat, drink and *socialize*"
Comment: @Nosajimiki when the settlers have at least a 50% chance of not dying by starvation/local monster attack/the elements or they just run out of things to do
Answer: Fence, or wall first, to ward off wild animals zombies (if any).
Community social place, to socialize especially while everyone busy building their own house, they need to rest somewhere, and socialize while resting. At first, it is a firecamp, and it may gradually grow into a tarvern.
Road, as people need to move around. So, the road will make itself (grass dies, make a trail).
Water sources, like a well, or a moat to lead water in farm.
Farm, as people need to eat. However, it might not be the case if every family want their own farm instead of collective farm.
So, collective farm, or 1 farm for each family.
Comment: fences often only show up very late in a villages growth, once space is less available. If it ever shows up.
Comment: @John I think they are talking about an external fence/wall.
Answer: Assuming a group of settlers came to an area with no prior settlement with the intent of settling down
Firstly people will need places of accommodation. So house constructions will start first with lower priority. While building the houses people will also need food and water. So at the same time people will plow the land to grow food and build wells,drinking fountains. Villagers will need somewhere to store the game they hunted, berry they picked and the grain they harvested. So they will also build a barn. These buildings are not queued but built at the same time with barn and well being the priority. Houses will be built in a longer time as storing and protecting the group's resources is a priority and the villagers can acommodate in the barn until the houses are built.

After basic need production chains are secured people with different professions might move in or villagers might find time for other professions such as tailoring, blacksmithing etc. That also depends on natural resources and trade opportunities with other settlements.

Building for taverns, especially Inns and brothels will be built if the village is on a trade route or a lot of traders visit the town.

Also regarding the last question of yours, the square with fountain/statue is most probably where the village started if it is the only square like that.
Answer: Depends. The technology level, the reason for moving, the resources available, culture and traditions, threats, geography, climate... In some cases, the resource extraction could be the only building. In some, the communal house complete with storage, cooking, and sleeping functions. One thing for sure, it's not a government building of any kind :)
Comment: Yup, a Polynesian island harbour tavern getting fresh resources by ship every week has a lot fewer requirements then a self-sufficient mining outpost in the middle of Russian taiga (or a roman border outpost in Germania Magna).
Answer: Unless otherwise specified the settlers have domesticated animals for food and other uses and have also developed agriculture. This means they would probably  prioritize as follows:
Immediately upon arrival;

Temporary animal pens;
Simple basic shelters;
Land clearing for food production (also produces fuel and construction material. PLUS construction of stockades and permanent animal pens- because the first process produces the material needed for the second as it progresses.
Permanent Shelters;
Barns,stables and other food storage and processing buildings;
Basic civic and/or religious buildings;
Specialized trade/crafting structure (forges, potteries, butcheries etc)

At first the village's growth is defined and limited by the need for protection and water. So a defensible site near a watercourse or spring initially sets the boundaries of the community.
As the population rises the community becomes large enough to outgrow these initial starting conditions. And this introduces the need for more planning and organization.

Sewers/drains & paving (at least at key points), warehouses/storage sheds, formal market squares & shops plus government buildings (depending on the type of government) civic halls/courts & jails, the rulers home etc plus higher walls enclosing a larger area with at least some degree of 'town planning' to regulate what work can be done where.
Answer: If your village-to-city is build according to plans to grow into a city, it follows other rules than a village that grows and grows and people find they are in a city one day.
The accidental growth.
A few families build houses quite near each other, maybe because the ground there is higher than the ground around in a low laying area or because there is a natural well or a small stream that provides them with water.
Once there are a few houses and the owners do well, they will likely build smaller houses, or add extra structures to their property, to house the people working for them.
I guess the first people are farmers, as that is what I am most used to, but fishermen and trappers/hunters could start villages as well.
When there are enough people to make a start of a village, more people may come in. I would say 'will' except that in many cases it did not happen and it would stay a hamlet, grow into one big farm or disappear completely.
Crafts people may have been part of the farms or may have had their own buildings as soon as there was enough of a village to give them enough work. And the blacksmith was likely one of the first with a separate dedicated building.
When there are enough people in a little village, it is not unlikely that a church/temple/mosque/whatever is build so the people have a special space for their religious services.
One of the houses may start selling tea and coffee, beer or wine (in places where those are drunk) or even stronger spirits, and grow into a tearoom, pub or kind of place where people can also stop overnight, call it a simple kind of hotel but in many cases not called that. (In Europe hotels are a rather recent addition, in the USA and all other countries that were filled with Europeans at that same time or after, hotels were there almost from the start.)
With enough people, trade started to get a structure, in a shop or a regular market, and with more people more trade and more shops (or a bigger market) came.
In the parts of Europe I am most familiar with, villages would stop growing once they had a certain size, as they covered the need of those people near them and an other village would take care of those a bit farther out. Some villages would be picked out by the lords of the area and given extra rights, so they could charge more taxes but for those could offer more protection to their people, often building walls once they grew over a certain size.
Not all those villages grew into walled towns, some failed and disappeared, others stayed and did not grow over the size of a small town.
Villages growing around castles or religious buildings or army camps have also grown into cities.
Once the size of a small town, buildings would start to appear that had no actual need for living or trade, like guild houses and city halls. This can be besides the old village but if the first farms have stopped being a farm those buildings may well be taken down and the space used for other reasons. The first huts of a trappers or fishers village have even less protection.
The more a small town succeeds, the more people come and often the towns build up all the ground within the walls and start to spill over. Then the town had to build new set of walls, bigger, and often take down the earlier walls once the new ones are secure.
When warfare had gone beyond protected cities and castles, the cities stopped with putting up new walls and most of them took down the last set to have some more space.
Depending on the location, a cathedral would be build and the town would be called a city. Around that same time a university might be started and of course enough schools that all boys from rich families could get lessons.
Again, by the time people spread in the USA, school would be available to (almost) everybody, not just to the males and not just to the rich, but by that time most of the current cities in Europe were established.
Of course when the society changed, like it did with industrialization, the smaller villages and small towns would grow again, mostly with 'random' growth but a lot of factory owners would have housing build for the people working for them, often small villages grew into towns because of that.
And sometimes cities were planned to house the people who did no longer fit in the villages and towns, and older cities, when too many people wanted housing and there was not a lot of space to build there anymore. But that brings you into the next part of this answer.
Planned cities
Most planned cities are relatively young, but there have been cities before the start of written history and some of those, from excavations, seems to have been planned rather than grown.
Planned cities can be started with any of the building, but again a start with series of houses and/or farms is likely.
Extra buildings can be any kind, a community center combining school, a shop or even a doctors office.
Most planned cities will have a certain size they expect and they might have city squares and central buildings from the start or they might be build from an edge and grow around a center, which get purpose when enough of the city is build.
Also see the difference between a planned city and a new suburb in the USA (and other countries) where the new residents have to have a car and are basically cut off from the center of the city they 'belong' to, with long distances and filled motorways. With malls out in nowhere with nobody living within walking distance and even the old city centers often falling in ruins.
How to make your own village or town
For a city growing in a book or game, or an other thought up environment, you can use whatever building suits your plans.
Consider the age and the environment the town grows in, combine whatever buildings your story needs and can be explained to the age you set your story in. The most recent of build cities are very new now. In the Netherlands we have several which are no more than 60 years old and most of their buildings way newer. In each science fiction book that has build cities you will find future ideas how cities will grow.
If you have a new city on a new planet, you may well mark the place of the 'first landing' as the center of the first city they build. But it may take a few generations before the 'fountain of the first landing' is in the middle of a city, as new societies need time to grow and earn before they can afford to build the cities.
Answer: For most of history, there were very few single-use buildings.  A large majority of people were farmers, and also would do other crafts in their homes during their downtime.  Most craftsmen worked outdoors, only the richest would work inside.  Potters and blacksmiths would have their kilns and forges just outside their home.  Most everyone would do some of their own textile work, spinning and weaving doesn't take much strength and can be a done a little bit at a time when taking a break from other work, and so would not warrant their own buildings.
If you don't count awnings built over a forge or kiln, which I wouldn't since they wouldn't have walls, the first non-residence buildings will be barns if the community is raising much livestock, granaries, or will be communal property like a church.
Comment: So at what point would they turn their craft into its own building
Comment: @user11937382 When the economics make sense.  This will vary depending on population density.  In a rural village, land is cheap, so the only real cost will be the construction materials and labor used.  But in a city land is expensive, it might never be worth having a shop separate from your residence.  Even in modern times, many people live in apartments above the business they own.
Answer: There is no Guaranteed Sequence
There are many reasons for a town to be formed.  Some towns begin as a farming community, some as mines, some start off as nothing but a port or way-station to facilitate trade, some start off as communes of people who practice the same craft, some start off as remote monasteries, some start off as slave plantations, some start as suburbs, and some start off as a fortress placed in a strategic location.
The buildings you can expect will also depend a lot on the tech level at your disposal.  A modern town will generally import a lot more of its basic supplies so you will get a lot less simple workshops.  A less modern town will not have anything like a water sanitizing station, power grid, or paved roads like you tend to get pretty early on in more modern towns.  A stone aged society may perform a lot more of their trades in open-air spaces than later civilizations such that you may not get buildings at all where certain crafts are performed.  A future tech town started on Mars will have very different needs than even a modern town has.
Because towns can be formed for so many different reasons under so many different circumstances, the order in which buildings are made can not be put into any set formula.  What may be the first 10 buildings in one town may not be seen in another town ever.  In-fact, you can not even assume it will begin with a house since many towns start off with a resource, industrial, or military building that people then settle around later for convenience.
So, you first need to ask yourself: "When, Where, and Why was this town founded?" and that will inform the order in which you need to build things.
Answer: Introducing:
Redfrogcrab's Universal settlement development plan
A basic outline for the development of any settlement for any setting, whether the town is built on the soil of an alien world in the distant future or in a mystical forest in the time of knights and dragons
Phase one: most likely, your settlement with start off with a few homes built around or near something deemed important. Examples: a Science outpost in the times of space flight, a medieval inn, a gold mine in the time of cowboys. crops and other food sources will be brought along as well because we all need to eat. Homes would be built around a central location as a place to gather and meet. Only bare-bone necessities in this phase. things that settlers need and can't get from the environment at this point will be imported.
Phase two: this phase is about population and economic growth in your settlement (most likely from migrants) and the expansion of the facilities and skills there, mostly stuff like a blacksmith (or fabrication facility for sci-fi settings), place of worship, local law enforcement building, a general store; pubs and other recreational buildings are an additional addition to this phase, the central plaza is paved and residents move out away from the center, with markets replacing them. local food production would also be ramped up. This phase could be fused with phase one as well. What you are exporting at this point matches what you are importing.
Phase 3: Congrats; your town has gained a spot on the map, more and more people have come in and settled down, the central plaza is bustling with people, paved streets, massive farmlands, and more specialized "commodity" stores (or stores that specialize in selling non-essential goods like paints, flowers, specialty foods, glassware or textiles) have appeared. Maybe a fountain or statue commemorating a local hero or important event has been erected in the town square. Your town will probably keep growing unless whatever brought your settlers there goes away and a new thing to keep people coming isn't found. This town at this stage is primarily self-sufficient and exporters of goods.
Other things to consider:
Ghost town: Everyone in the settlement have either left or been killed, something happened in history that stopped growth and the population is down to near zero
Geographical factors: consider the geography of the region that's being settled, ocean towns will be centralized on the port while Prarie and desert towns will be centralized on the general stores and trading post. Resources also play into effect, what you can use to build and what you can sell in the environment can have drastic effects on the growth rate(how many people are being born or coming in-the amount of deaths and people moving out), longevity (from the first settlers to the last), and pull of a settlement (how much do people want to live there?)
Tech level: it's easier to build and grow a town when you have access to modern technology and above, Rome wasn't built in a day but with high enough tech and enough will power you could build it in an hour
Sci-fi/interplanetary factors: If: breathable atmosphere then: individual buildings. If: airless or non-breathable atmosphere then: Interconnected air-tight modules heavily shielded from radiation or buried underground around a water source or other important resource.
I use this flow chart for my towns, cities, and colonies for whatever I'm writing, fit it to your specifics. It also doubles as an in-universe classification system for the development of settlements.
Hope this helps


Include guards vs #pragma once

Question: Is there any particular reason why #pragma once doesn't seem to be used in Arduino code? Is this just because it's not a well-known feature, or is there some overriding reason to use #ifndef XXX_H/#define XXX_H/#endif?
Comment: Might be that part of the Arduino core source code is older than `#pragma once`. Which is by the way non-standard. It was introduced in GCC 3.4.
Comment: `#pragma once` is not a standard feature.
Comment: Non-standard but damn useful. Would be wise to consider adding support for it.
Comment: all `#pragma`s are non-standard by definition. However, I started using them in about 1986 in various C compilers and it seemed pretty ubiquitous even then. I guess I'm surprised that's not the case in the C++ world.
Answer: #pragma once operates on the absolute filename of a file. Include guards work on the content of the file.
If you have multiple copies of the same library (maybe one library has some parts of another included in it - it happens...) #pragma once would have no hope of working right.
Add to that the fact that the Arduino IDE copies some files around the place when building and '#pragma once is pretty much screwed.
Include guards work regardless. So sensible people use include guards and shun #pragma once.

Include guards vs #pragma once


sharepoint 2013 compatibility between different front end with different windows server

Question: It is possible to have a farm with different front end servers with different OS installed on it , one 2008 R2 and one 2012 ? if it can be done , is there any constraint related to that or mal functionality that may happen or error to occur ?
Comment: if it is possible I would not recommend it.
Answer: Should work, we are running 2012 on our App server and 2012R2 on our Frontends no problems with that. But if you are going with 2012R2 I believe SP1 is a requirement.
But if you can get the same os on all machines, less hassle, when applying windows updates and bulding test environments etc.


Relationship between Frobenius homomorphism and legendre symbol for $K/\mathbb{Q}$ a quadratic extension

Question: Let $K/\mathbb{Q}$ be a quadratic extension and d its discriminant. Show that $Frob_p(\sqrt{d}) = \Big( \frac{d}{p}\Big)\sqrt{d}$.
I am not sure what the Frobenius homomorphism means. I was told that it is the preimage of the usual frobenius homomorphism in the reduction homomorphism $D_{\beta}\to Gal(\frac{O_K/\beta}{\mathbb{F}_p})$ where $D_\beta$ is the decomposition group of an ideal that contains p. I don't really understand how you actually calculate this homomorphism.
Answer: The homomorphism $f:D_\beta\to \mathrm{Gal}((\mathscr{O}_K/\beta)/\mathbb{F}_p)$ is calculated as follows. For any $\overline{a}\in \mathscr{O}_K/\beta$, let $a\in \mathscr{O}_K$ be any representative of $\overline{a}$, then for $\tau\in \mathrm{Gal}(K/\mathbb{Q})$, we simply let $f_\tau:=f(\tau)$ act by $f_\tau(\overline{a})=\tau(a)$, which is well-defined from the fact that $\tau(\beta)=\beta$ for all $\tau\in D(\beta)$. In other words, the action in on residue field $\mathscr{O}_K/\beta$ is just determined by looking at the action on $\mathscr{O}_K$ and reducing everything mod $\beta$.
When $p$ is unramified, this $f$ is an isomorphism, so we can speak explicitly of the element $f^{-1}(\mathrm{Frob}_\beta)\in D(\beta)$, which is what is being used in this exercise. When $p$ is ramified, the map $f$ has nontrivial kernel, and fits into a short exact sequence $$0\to I(\beta)\to D(\beta)\xrightarrow{f} \mathrm{Gal}((\mathscr{O}_K/\beta)/\mathbb{F}_p)\to 0$$
where $I(\beta)$ is called the inertia group of $\beta$, so pulling back the Frobenius element only describes a coset of $I(\beta)$, so there is some ambiguity. For this reason, when one speaks of "the" Frobenius element, it assumes the unramified case (this is obvious here: if $p$ is ramified we know $p\mid d$, so $\left(\frac{p}{d}\right)=0$, and the equality you ask to prove would be nonsense). From this point, the solution to your problem follows quickly if you think about the reduction of $\sqrt{d}$ mod $\beta$, and you should stop reading here and try to find it yourself.
Now let $p$ be unramified, and from the way we have defined the homomorphism $f$, we can calculate the action of $\mathrm{Frob}_p$ on $\sqrt{d}$ by reducing mod $\beta$. Denote by $\overline{\sqrt{d}}$ the reduction of $\sqrt{d}$ mod $\beta$. Then by definition, $f^{-1}(\mathrm{Frob}_p)\in \mathrm{Gal}(K/\mathbb{Q})$ acts nontrivially (i.e. by negation) on $\sqrt{d}$ iff $\mathrm{Frob}_\beta\in \mathrm{Gal}((\mathscr{O}_K/\beta)/\mathbb{F}_p)$ acts nontrivially on $\overline{\sqrt{d}}$.
We know that $\mathrm{Frob}_\beta$ generates $\mathrm{Gal}((\mathscr{O}_K/\beta)/\mathbb{F}_p)$, so the condition that $\mathrm{Frob}_\beta$ act trivially on $\overline{\sqrt{d}}$ is exactly  the condition that $\overline{\sqrt{d}}\in \mathbb{F}_p$. But this must mean $d$ is a square mod $p$, so $\left(\frac{p}{d}\right)=1$. Likewise, if $\overline{\sqrt{d}}\not\in \mathbb{F}_p$, then $\mathrm{Frob}_\beta$ acts nontrivially on $\overline{\sqrt{d}}$, so $f^{-1}(\mathrm{Frob}_\beta)$ acts nontrivially on $\sqrt{d}$.


How do I /setblock a sign with text?

Question: How do I /setblock a sign with text?
I've tried
/setblock ~ ~1 ~ minecraft:wall_sign 5 {id:"Sign",Text1:"hi;,Text2:""}

Answer: In commands, the order of arguments is important. This is the syntax of /setblock:
/setblock <x> <y> <z> <TileName> [dataValue] [oldBlockHandling] [dataTag]

You have given /setblock a [dataTag] argument where [oldBlockHandling] should be, so it doesn't do anything with it.
You will need to give an old block handling mode, such as replace before you give the data tag.
Although likely a typo, it is also important to have correct a JSON format. You have put a ; where a " is needed.
The corrected command should be:
/setblock ~ ~1 ~ wall_sign 5 replace {Text1:"hi",Text2:""}

Comment: Does this still work? The wiki says you also need `Text3` and `Text4`, otherwise the text will not appear.
Answer: Try this:
/setblock ~ ~1 ~ wall_sign 5 [replace|destroy|(none)] {Text1:"{\"text\":\"Your Text Here\"}"} << never forget to use backslashes before an opening or closing quotation.
If you want it to have colors:
/setblock ~ ~1 ~ wall_sign 5 {Text1:"{\"text\":\"Your Text Here\",\"color\":\"your_color\"}"} << on using colors, for spacing (such as red or dark red), use an underscore to indicate it as space ; see colors here: http://minecraft.tools/en/color-code.php , use the color names; never forget to use backslashes before an opening or closing quotations, right :) .
For text styles:
/setblock ~ ~1 ~ wall_sign 5 {Text1:"{\"text\":\"Your Text Here\",\"color\":\"your_color\",\"bold\":\"true\"}"} << existing style tags: bold, italic, underline, obfuscated (or randomizing text) only use boolean responses on these tags (like true or false. 0 or 1 is not accepted.);
To put text on appropriate text line:
For 1st line: Text1 tag;
For 2nd line: Text2 tag;
For 3rd line: Text3 tag;
For 4th line: Text4 tag;
(take note that these Text~ tags have same tags inside, like the colors and style tags); (also take note that signs only have 4 lines :) .)
Want all lines to be put? Use them altogether.
Comment: Well, he may take use of it some other time.
Comment: You relied to all the future readers of this question. If you look at the top right of the page, you can see that 10127 people visited this question already. And the protected state indicates that apparently there were many "I have this problem, too" comments. So you can expect many people in the future to read this answer.
Comment: You don't need it to be so complicated. The text in `Text1` can just be a regular string instead of JSON, if you just want to display a normal text. In general you wrote a lot of things that were not asked. Maybe search for a question that actually requires JSON and answer there, if noone did yet.
Comment: No, because he wasn't even notified. He deleted his account.
Comment: So I just replied to no one? :P

How do I /setblock a sign with text?


Prevent WooCommerce from decrementing stock on payment

Question: I'm working on a plugin that handles the rental of vehicles via WooCommerce. The default WooCommerce behaviour is to decrement the stock of items in an order as soon as payment is made. To cut a long story short, I need to prevent this from occurring (I will be implementing a custom function to only decrease stock on the chosen rental date).
In the WC_Order class I found a function called payment_complete() (class-wc-order.php, line 1278).
In this function is the following:
if ( apply_filters( 'woocommerce_payment_complete_reduce_order_stock', true, $this->id ) )
            $this->reduce_order_stock(); // Payment is complete so reduce stock levels

It would appear to me that I simply need to include
add_filter( 'woocommerce_payment_complete_reduce_order_stock', '_return_false' );

in my plugin in order to prevent stock from decreasing on payment, but unfortunately this does not work. I've also tried wrapping my add_filter() in a function which triggers on init, but still no luck.
Any help greatly appreciated.
Answer: function filter_woocommerce_can_reduce_order_stock( $true, $instance ) {
return false;
};
add_filter( 'woocommerce_can_reduce_order_stock','filter_woocommerce_can_reduce_order_stock', 10, 2 );

This helped me sort out the issue!
Answer: This is old, but if you don't want to WooCommerce to manage stock you can tell the entire store not to manage stock in the options. OR, individually on each product.
Studying the reduce_order_stock() method in the WC_Abstract_Order class reveals that stock will not be reduced in those cases.
/**
 * Reduce stock levels
 */
public function reduce_order_stock() {

    if ( 'yes' == get_option('woocommerce_manage_stock') && sizeof( $this->get_items() ) > 0 ) {

        // Reduce stock levels and do any other actions with products in the cart
        foreach ( $this->get_items() as $item ) {

            if ( $item['product_id'] > 0 ) {
                $_product = $this->get_product_from_item( $item );

                if ( $_product && $_product->exists() && $_product->managing_stock() ) {
                    $qty       = apply_filters( 'woocommerce_order_item_quantity', $item['qty'], $this, $item );
                    $new_stock = $_product->reduce_stock( $qty );

                    $this->add_order_note( sprintf( __( 'Item #%s stock reduced from %s to %s.', 'woocommerce' ), $item['product_id'], $new_stock + $qty, $new_stock) );
                    $this->send_stock_notifications( $_product, $new_stock, $item['qty'] );
                }

            }

        }

        do_action( 'woocommerce_reduce_order_stock', $this );

        $this->add_order_note( __( 'Order item stock reduced successfully.', 'woocommerce' ) );
    }
}

However, the OP's observation is correct, but includes a typo. The __return_false() function is preceded by 2 underscores instead of 1, so the correct code would be:
add_filter( 'woocommerce_payment_complete_reduce_order_stock', '__return_false' );

From there I would add your custom stock-decreasing function to the woocommerce_payment_complete hook.
Answer: It doesn't work because it should be __return_false, not _return_false - the prefix has two underscores. __return_false() is just a function defined by WordPress in wp-includes/functions.php.
Answer: Instead of add_filter, You should use remove_filter function.
Comment: Can you please explain? Surely I need to add a filter on that hook to return false and prevent the reduce_order_stock() function from running? I tried changing to remove filter but it doesn't work, stock still reduces on payment.
Comment: You would not remove the filter, you need to return a value of `false`.


Is there demand for higher resolution alternative to GPS tracking in GIS market?

Question: If there was an alternative to GPS that provided higher resolution tracking, what applications would there be for it in GIS?
Note that this means higher resolution, but not necessarily higher accuracy. For instance, the absolute position (lat/long) would not be more accurate than GPS, but the relative movement during tracking could be within a few inches. This means you could get a very detailed track recording of a device's movement, allowing you to see small changes in position or elevation. If you were to carry this device while hiking a trail, you could see elevation changes with 1-5 inch resolution. I imagine this might be useful for GIS, but I am not familiar with the market.
Answer: But doesn't such a thing already exist? Not as an alternative but as a complement technology. I'm thinking IMU's which, granted, track the orientation of the object, but sometimes the devices are combined (or accompanied) with an INS (Inertial navigation system). So: GPS + IMU can give you a 7 parameter position of an object, and you can (for a short period of time) replace GPS with an INS (whose issue is that accuracy is worsening with time/distance traveled). Unfortunately, to my knowledge, it is impossible to make such a bundle into a practical size at this point.
If you did, you could do all sorts of crazy stuff with that, for example, track a postal package to ensure it is handled properly, or always turned upwards as it should be (no radical position changes). Theft prevention. Limit object movement to a particular predefined area. Indoor navigation (where there is no proper GPS signal), cluster object monitoring (lots of objects that require good relative precision), for example overhead powerline wires,...
Whether or not there is a market for this. Hard to say, way more seemingly useless things turned out successful.
Comment: You can combine an IMU with GPS, but it will not give you accurate motion *tracking* over more than a very short distance. Using an IMU to track motion over time is called dead reckoning, and it very quickly accumulates too much error to be useful.
Answer:
Indoor navigation (as already mentioned), at least for a certain time/distance until the cumulative errors make it too unreliable.
Urban use among tall buildings where your GPS fix may be intermittent, to provide the user a 'simulated' fix during GPS outages.

But particularly regarding the high precision aspect, not sure. People who need high precision usually also need high accuracy.
Answer: I agree with @U2ros answer in that a lot of this is already technologically possible.  To a large extent phones now are getting smart enough to be able to do a lot of this if there were apps that could read/process the data efficiently and effectively.
As far as the market, I can't imagine there not being one.  After all, marketing teams and such are already using various wi-fi triangulation and other in-door location determination techniques to identify a cell phone's location within a store to deliver location specific adds and coupons.  So if you had an even more precise technique for this that could allow some existing business processes and customer information gathering processes to be automated even more, there would likely be numerous potential uses.


Embedded System that is able to connect to the internet

Question: I am thinking about starting a project and was just looking for some general input. Where I work our company currently have remote stations that take data in from a radio link and input the data to a sql database. I am responsible for maintaining the stations and their scripts. Currently they are just running on a desktop pc connected to a radio receiver and an internet connection. I have had some limited experience with working with embedded systems in the past, and would like to explore the possibility of migrating the current setup to an embedded system. The most difficult aspect of the project that I can foresee is gaining internet connectivity to a pic chip and having enough memory for the libraries that would be needed to connect to a sql database.  Can anyone recommend a resource so I can learn how to connect a pic chip to the internet as well as any recommendation on what kind of pic chip to use?  I know this can be quite a daunting task, but I like to think that I am up for the challenge.
Comment: You never said *why* you want to do this. What's the problem with the current setup?
Answer: Some members of the PIC32 family, such as the PIC32MX675F256H and     PIC32MX795F512L include an integrated Ethernet interface.    An evaluation board for the PIC32MX795 is available: DM320004.
You can also add an Ethernet controller and use Microchip's free TCP/IP stack with their PIC18, PIC24, dsPIC and PIC32 families.
Comment: Thanks, This looks to be a great place to start. Makes me happy because I have already ordered a pic32 starter kit to wit my feet  from microchip.... I have used pic18's in the past. I never knew they had an ethernet interface on board:D
Answer: There are many devices that could fit the bill for you...
If you're looking for ease of programming, consider an embedded Linux solution. You can find a list of possible boards here. Most of these have ethernet on board as well as large external flash and RAM chips. Many have USB host, meaning that USB flash drives or GPRS modems can be added.
On Linux, programming your application is easy. You have a choice of languages (C, C++, python, perl, Java, etc) and it should be straightforward to port your existing PC software. Curl is a good library for HTTP and sqlite is a compact database.
But, this ease comes at a hardware cost. In medium volumes, boards are likely to cost around $80-$120 going down to $30-$50 in high (10K+) volumes.
If you're looking to cut costs further, you'll want to target a microcontroller. Your code is going to end up much more hardware dependent and development will take longer...
Plenty of hobbyist devices use a low end AVR or PIC along with the ENC28J60 ethernet MAC/PHY. See here and here. These systems often use the excellent uIP and sometimes FreeRTOS.
For an integrated solution, TI/Luminary have a range of ARM Cortex-M3 devices with on-chip ethernet MAC/PHY. These devices go up to 512KB flash and 96KB RAM, so are capable of complex tasks. But, you won't fit an SQL database inside.
There's lots of choice - it all depends on your requirements.
Comment: The protocol to access your database may also affect your choice. If you need HTTPS or SSL/TLS, you'll have a hard time fitting that in an 8bit micro.
Comment: Thanks, I like the idea of being able to use my existing code.. it is written in python which would obviously not work for a pic chip. The database will not be housed on the chip it self. I will have to access the database which will be housed on a server.
Comment: HTTPS or SSL/TLS would not be needed. I would just need to connect to a mysql database...
Comment: ah the old hammer + walnut...
Comment: dspic has a library for asymmetric encryption. i doubt you want to deal with it.
Answer: I'll throw in the Arduino option into the mix. An Arduino + a WiShield can get you the ability to periodically post data to a webpage (e.g. on an apache server) over an 802.11 network. Your webserver would then handle the job of putting that data in a database (e.g. a PHP script that handles the posted data). This is probably a good place for you to be on the effort to cost curve. Best of luck, this sounds like a fun project!
Comment: Also, you can get servers that include an SD card. This makes it possible to serve up images and complex web pages.
Comment: @Dirk, or perhaps an SD shield like (http://www.seeedstudio.com/depot/sd-card-shield-for-arduino-v21-p-492.html) - but maybe that's what you meant :)
Answer: I've been working with Microchip microcontrollers for a long time and I know that family quite well, but I think you would be better served by the solution proposed by the Mbed dev board.
This will give you without doubt the fastest route to have Ethernet running on a microcontroller. Take a look at them, the price isn't too bad either. Also, take a look at the forum, there's already a driver for MySQL, although I don't know the reliability of such driver. I suppose it could be a starting point for your particular SQL database (in case it is not MySQL).


My turtle fell from fifth floor, almost 40 ft

Question:
I kept it at the window side for basking and it jumped off. When I went down it was walking, but was bleeding near the mouth. Now, I keep it in water and it looks like bleeding has stopped. It is moving normally, no cracks are visible in the shell (hoping there is no crack), but it's not taking food or opening its mouth. Is there anything to worry about; any internal injury or jaw fracture? I am posting the pics from when it was bleeding, and afterwards when keeping it in water. Is it safe to keep it in water or should I keep it dry to prevent infection? It's one year old, no vets nearby.
Comment: If you're having trouble finding vets, I'd look for area animal rescue and rehabilitation groups. They'll usually have a wildlife vet they use to care for injured animals they take in. Or if you call other groups that deal with wild animals, like zoos or game wardens, they would probably be able to recommend a vet in the area.
Comment: 40 ft is a big fall and bleeding from the mouth could indicate internal injuries.  Good luck.   A vet would able to tell you more and hopefully treat the injuries.
Answer: TAKE IT TO THE VET OR ANIMAL HOSPITAL!!! Your turtle might be seriously injured. If someone broke their leg, would you say "alright time to go swimming now!" Even better example, your friend falls off that window, so you take him out for food and than go swimming. It's the same with turtles. You take them to the vet/hospital.


How to select dates and times of office hours for the benefit of students and instructors?

Question: Office hours can be selected at any time, but how they can be selected to benefit all? The students to ask the instructors and the instructors to have some time to conduct research? Before a class or after a class? In the same days as the class, days with no classes, or all days?
Answer: If I had a two day a week class, I would have it before class on Tuesday, and after class on Thursday.  And also by arrangement, if someone couldn't come because of their class or work schedule.
At my school, the rule was two hours for each class.  There's no recommended amount of time where you are?
Comment: I think it is same
Comment: I like that schedule for a Tuesday - Thursday class.  More generally, you want to vary your times.  Don't do, for example, Monday and Wednesday at the same time of day.
Answer: I try to set "official office hours" on some schedule that shouldn't clash with classes, but encourage students to ask directly after class if warranted. I tell them that otherwise they can get an appointment, or just drop by. I'll tell them (or leave a note on my door) when I'm unable to spare a few minutes for a quick question.
Answer: I think it is important to cover as much time slots as possible. So if classes start for example every two hours, let's say 8-10, 10-12 etc. try to make your office hours for example from 9.30 to 10.30. This way students with a class in one of these slots can still visit you.
edit: Also, if your office hours are directly before or after your class, your students won't have time to prepare for the class after your talk, or think about questions after your class.


Digital circuit to toggle on rising edge of two signals

Question: I need to design a circuit to toggle on the rising edge of two signals A and B. A is a square wave @10Hz, 50% duty cycle. B is a pulse that gets generated approx 20-30us after the rising edge of A.
I came up with a circuit to achieve it, but it uses monoshots which I wish to avoid. The monoshot is triggered by the pulse and it's Q' as well as signal A are the inputs to an AND gate to generate the required output Y=A.B'
Can you suggest a better way which uses digital circuits only? Thanks.
Comment: How accurate and consistent does the timing have to be? Would it be okay to have 5-100 ns of uncertainty about how long after the edges of A and B the output changes?
Comment: Also, are you doing this with discrete logic, in a CPLD, in an FPGA, or in an ASIC or full custom chip?
Answer: You can do this with a D flip-flop with an asyncronous clear function

simulate this circuit – Schematic created using CircuitLab
Practically, you'll more often find the clear function has a low-active input, so you might need an inverter on your B signal.
For example, you could use 74AC11074.


Use a COM object in .NET 2.0 CF without calling CreateObject

Question: I need to use a COM object in my .NET 2.0 compact framework project, but I can't use the CreateObject function. Is there any other way to call a COM object that will work in my environment?
Answer: You'll need to call CoCreateInstance().  You can find a P/Invoke declaration for it here.  If you only have a ProgID then you need to call CLSIDFromProgID() first.  Make sure you've exhausted all possibilities of finding a type library for the COM server (Tlbimp.exe), this kind of code isn't easy to get right.


Here Maps Navigation samples seem to be missing the Navigation Library

Question: I am very new to Android development as well as to Here API.
I have downloaded the examples, registered and downloaded the Freemium explore sdk, and generated the required keys.
I can compile and run the examples in the latest/explore/android folder, however I cannot compile those examples in the examples/latest/navigate/android/Navigation folder. All Navigation samples complain that the navigation library is missing.
for example:
/home/ninja/AndroidStudioProjects/here-sdk-examples/examples/latest/navigate/android/Navigation/app/src/main/java/com/here/navigation/NavigationExample.java:37: error: package com.here.sdk.navigation does not exist
import com.here.sdk.navigation.ManeuverNotificationListener;
Is the Navigation library separated from the Explore and Lite libraries? If so, what is the simplest method of accessing this library to compile and run the examples?
Answer: The 4.x Navigate edition is still in the closed beta testing phase. It is planned to go commercial during the second half of 2020. We do offer the Premium edition of the SDK, which including features like turn-by-turn and voice navigation. Please check if you can waiting till Q3 for the Navigate edition, and during the mean time please feel free to try the Premium edition. The Premium edition is included in our Freemium plan btw.


Mystery Plant ID

Question: I found this odd rooty thing growing in one of the pots on my patio - any idea what it might be? I'm in Cape Town, South Africa, and it's the tail end of winter here.
Comment: Has this grown at all? If you have pictures of newer growth, it might help someone ID this plant...
Comment: Could it be a gymnosperm (cycad-group)? Just a bit visual similarity. Something else could be happen, such as a bulbous monocot.
Answer: This is possibly some species in the subfamily Scilloideae. (sometimes considered as separate family called Hyacinthaceae). This group of plants is a subfamily of bulbous plants within the family Asparagaceae.

Scilloideae are distributed mostly in Mediterranean climates, including South Africa

This subfamily contains many popular spring-flowering garden bulbs, so it would not be unlikely to see these growing up toward the very end of winter.
Drimiopsis maculata seems like a fair guess at the species (or closely related to the species in the question).

According to here, info pertaining to Drimiopsis maculata includes:

Distribution: widespread in eastern South Africa
Bulb description: Globose, fleshy, mostly exposed at the surface of the ground, about 2.5 cm in diameter and have large visible scales
Leaves: mottled, but typically lose color to become all green.

I'm hesitant to provide more info because I'm still not sure about this identification. Figured I'd throw it up to see if others could rabbit-hole their way to a better answer...
Comment: wow brilliant similarity.
Comment: @AlwaysConfused right?! except for the mottled leaves.... However, I assume since the spots fade in most specimens, they could possibly be absent altogether in specific cultivars? I looked into other species in this genus (and similar *ledebouria*) but didn't find anything that looked *as* similar to the OP's pic...

Mystery Plant ID


Making a single 'ripple' with motion of concentric shapes

Question: I'd like to imitate a ripple, imagining the effect off pushing the central ring down as a result of impact and seeing it oscillate with heavy damping, something like this.
.  My assumption is that I can just do an offset for the other rings, with the time difference (C) being proportional to the radius of each ring and it will look decent. How can I do this effect? I had a go with the 'Elastic' interpolation mode, but I wasn't able to get enough control over motion.
Answer: Try joining the meshes together into one object, and adding a wave modifier and adjusting the settings.

If you want to make it so theres a ripple when you push from the middle ring, try using dynamic paint in the physics tab. Make a separate object as a brush, and your circles as the canvas, and change surface type to waves. Also, give it a bit of subdivision so it looks nicer.


I was learning how to rig and now I can't figure out why the eyes are not moving with the body nor the rig

Question: I can't figure out why the eyes are not moving with the body nor the rig, I checked if the eyes are parented with the body and it seems they are. I'm new to blender
Comment: The eyes must be parented to the armature, then you need to assign their weights to the head bone, a vertex group that has the same name as the head bone.
Comment: please provide blend file
Comment: [Add An Eye Rig To Your Meta Rig](https://youtu.be/Q8StN42TmS0)
Comment: @Blunder , i have tried to do that but i can't select the eyes, i can't find them, when clicking on them it selects the body instead
Answer: The problem is that the eyes of your model are a separate (loose) mesh in the bunny object. You need to fix the weights manually because the Parent To > With Automatic Weights operation doesn't work well when the mesh object has loose parts such as eyebrows and eyes.
And if there are intersecting faces within the same mesh or duplicated vertices then it does not work at all. See Heat weighting failed to find solution for one or more bones for details.

check your mesh for duplicated vertices and if the face orientation is correct.
to control the eyebrows and eyes you can add a few more bones. Two for each eyebrow and one bone in the center of each eyeball pointing in the direction of view.
check your bone hierarchy. It looks like the first ear bones are not children of the head bone. Parent them to the head bone with Keep Offset.
parent the mesh to the armature with automatic weights. Make sure there is no error in the status bar popping up.
time to fix the weights. Repeat the steps for the eyes and the eyebrows:

Select the bunny mesh, go to Edit mode, deselect everything (Alt+A)
then hover the mouse over the eye and select the mesh with L. Then go to the Vertex Group list. Use the drop-down arrow and select Remove From All Groups. The mesh is no longer connected to any bone.
Look for the correct vertex group in the list and press the Assign button to assign the selected mesh to the vertex group of the eye bone.

In the Edit mode you can activate the Vertex Group Weights overlay to see the weights. Or switch to the Weight Paint mode. Here you need to paint the weights. Make sure you select the correct vertex group.
Comment: omg thank you so much! it helped me understand, and your animation of my bunny is really cute :) again, really gratefull


Have email disclaimers been tested in court?

Question: Every company these days has the standard confidentiality disclaimer at the bottom of their email signature. However, researching this online reveals that their effectiveness is somewhat dubious. My question is: Has the legality and power of email disclaimers ever been tested in court, anywhere in the world?
Answer: For one example, see the treatment by the Saskatchewan Office of the Information and Privacy Commissioner. Financial and Consumer Affairs Authority of Saskatchewan (Re), 2014 CanLII 3995 (SK IPC):

With regards to such automatic email confidentiality notices, I considered these in Review Report F-2012-003 and found that depending on the wording and content, these confidentiality clauses could pass the 'in confidence' test.
The disclaimer clause, at the end of several emails in the record before me, is worded similarly as the one I considered in the above Review Report. It is a more legalistic disclaimer than the usual confidentiality clause found at the end of general emails.
Therefore, I find that this would indicate that the communication was intended to be confidential and would meet the third part of the test for section 22(a) of FOIP.

Here is an example from the context of a purported settlement offer. Langley (Township) v. Witschel, 2015 BCSC 123:

The cases in this area are fact-specific. The approach ... requires that the communication as a whole be considered. ...
While the location and font of the disclaimer in the present case does leave the impression that it is automatically generated, I do not see that this means the language must necessarily be ignored. It depends on the situation. If the disclaimer directly contradicts the substance of the email and has been used in a multitude of communications between these parties regardless of their purpose, then the overall impression left on a reasonable person may well be that the disclaimer language is to be ignored in favour of the substantive message, ... .
In the case at bar I do not have any evidence showing a use of the disclaimer in communications between these parties that is so automatic, and perhaps inappropriate in some instances, that I should conclude it is meaningless language. ...
... When the email as a whole is considered, including the disclaimer, I conclude that a reasonable person would find that it was not an acknowledgement of any liability.

My review of the case law confirms that these disclaimers of all sorts are not generally determinative. Instead, they can be evidence of intention that a communication be in confidence (or without prejudice, etc.). The weight of that evidence depends on the precise context and wording. And other evidence might pull in the other direction.
The signifiance of a document being sent in confidence will depend on the legal issue. Confidence can be relevant for:

claims of privilege, especially case-by-case privilege
certain defamation defences
government disclosure obligations under freedom-of-information statutes
adherence to professional standards
etc.

Disclaimers more generally can be relevant for:

admission of liability
whether a settlement offer is "without prejudice"
etc.
Comment: What is the "in confidence" test? If I told you a personal secret "in confidence" and you sold it to a tabloid, would that be illegal in your juristiction?
Comment: @nvoigt Certain information supplied in confidence by other governments and third-parties is exempt from disclosure under FOI legislations in some jurisdictions.
Comment: Is the pointed to document by the officer https://oipc.sk.ca/assets/foip-investigation-f-2012-003.pdf ?


Running multiple Nginx and MySQL instances within Docker containers

Question: Could someone tell me if I am making correct use of Docker's workflow?
After reading about Docker and going through some brief tutorials, I see you can isolate services and applications within its containers. Ultimately, I'd love to replace virtualization with Docker but maybe I am taking this a bit too far.
I do application development with Laravel and implement using Nginx on Ubuntu. I would like to setup one large VPS and share its resources among 4 or 5 applications. That way I can keep different versions of PHP and dependencies and also isolate the web server and database (MySQL). The goal in doing this is to only share the Linux kernel and keep everything related to those applications within their respective containers.
Will services that require ports (e.g. Nginx/MySQL) need to be configured to use non-default port numbers in order to avoid conflict? Maybe I'm not completely understanding what Docker's intended use is but I was thinking you have the option of installing a web server outside of the container and share it with all respective projects or install several web servers - one for each container and tweak individually. Is that correct?
Answer: Use a frontend proxy like nginx (for relatively static backends) or hipache (for rapidly changing backends, for example if you are going to replace containers every hour or so and don't want to change the nginx config). The frontend proxy will listen on ports 80 and 443 and redirect the request to the right backend. I run 10 or so websites behind a single IP that way.
Comment: Thank you! I will try that configuration out in the next day and let you know how it goes for me.


Xray and distracting geometry

Question: I want to retopo an object so I tried using the Xray option to make my new mesh appear in the viewport in front of others. However I don't want to be able to see on my new mesh faces that are facing away from the camera or are behind other faces as it's making the process pretty hard. How can I do this?
Answer: It turns out that the feature I was looking for wasn't actually X-ray or at least there's another workaround. Instead I used the shrinkwrap modifier with a little bit of positive offset so that the new mesh doesn't sink into the original one.
Answer: There is a property called 'Hidden Wire' which I think might do what you are talking about. When you are in edit mode the option will appear in the 'Properties' toolbar in the 3D view (N) in the 'Shading' panel:

This will change the object into a wireframe shaded mode (so make sure you turn off any other wire/x-ray properties you may have turned on for that object) but will occlude faces behind the object.
Here I have turend on 'Hidden Wire' while in edit mode of a sphere. The sphere has turned to wire so I can see the object within it, but I can't see the other side of the sphere:
Comment: Hidden wire simply hides the faces but I don't mind them showing up. It doesn't also fix the sinking part. Perhaps the original question wasn't clear enough as I wasn't even sure what I was looking for. I wanted that the retopo mesh appears on top of the original one without interacting with its surface with the exception that the back facing parts should be hidden. Something like topogun: http://fc03.deviantart.net/fs71/i/2012/239/5/0/humphrey_davis_topo_fix_in_topogun_by_wachak-d5cm4du.jpg
Comment: Ah, then I'm afraid I'm not really sure what you're asking as even what you described in the comment sounds like what hidden wire is. Perhaps my answer wasn't clear in the fact that the sphere, even though it is higher res, is in fact the equivalent of the retopo object.

Xray and distracting geometry


Custom URL structure using Playa segments

Question: How can I build a custom URL structure using Playa fields as segments?
Like this:
<code>http://example.com/templateGroup/template/playaParent/playaChild
</code>
Answer: Playa tags will not have parsed before the page loads.
If you matched your playa field and template names you could generate links with Playa then clicking the link would take you to the corresponding template.
Answer: We'd need a bit more detail about what you're trying to do to give a more specific answer, but I don't think you need to do anything special to do this. I've done it before. Having both parent and child url_titles in the URL and using each to load up the correct entries.
Really that doesn't have anything to do with Playa at all, except for when you want to ensure that the parent-child relationship in the URL really exists.
I've done this in the past by loading up the parent entry in a channel:entries tag and comparing the playa field's selected entry to the child entry in the URL. If they don't match, then throw a 404.


Traveling Salesman Problem with Neural Network

Question: I was curious if there were any new developments in solving the traveling salesman problem using something like a Hopfield recurrent neural network.  I feel like I saw something about recent research getting a breakthrough in this, but I can't find the academic papers anywhere.  Is anyone aware of any new, novel developments in this area?
Comment: What research have you done?  Have you searched on Google Scholar?
Comment: I read the paper on Stack LSTM's, which I was told might help: http://arxiv.org/pdf/1506.02516.pdf, but I'm not seeing the connection.
Comment: drop by [chat] for possibly more discussion/ analysis
Answer: there are many papers on using artificial neural networks to solve TSP including recurrent and Hopfield networks, and they "succeed" in a rough sense, but so far there does not seem to be any evidence that the techniques are in any way (strongly?) superior to other algorithmic approaches, so its something more like a research curiosity at the moment. the use of ANNs for this problem is indeed counterintuitive from the pov of combinatorial algorithmics and the mechanisms by which the problem inputs/ outputs are encoded are novel and tend to vary, and maybe are not yet so standardized. the authors seem maybe more interested in demonstrating "proof of concept" and a comparison with other algorithm types seems more rare (there is some in the last paper). see eg

Traveling salesman problem using neural network techniques / Abdel-Moetty
Using Hopfield Networks to Solve Traveling Salesman Problems Based on Stable State
Analysis Technique / Feng, Douligeris
Comparison of Neural Networks for Solving the Travelling Salesman Problem / La Maire, Mladenov
A Recurrent Neural Network to Traveling
Salesman Problem / Siqueira, Scheer, Steiner
Comment: I believe that it will be possible for neural networks to solve within a confidence interval with some consistency.  As in `a top 5% solution 85% of the time`, I was just curious to learn how this sort of problem was solved with a neural network, because I just read the deepmind paper on Neural Stacks.  It seems like Neural Networks, especially Deep Reinforcement learning networks, can handle any problem a genetic algorithm would have in the past.  So that was the progression in my mind.
Answer: This Medium post lists the latest (not a full list of course) studies in the combinatorial optimization domain. All three papers use Deep Reinforcement Learning, which does not need any training set but learns completely from its own experience.
I have been working on the first paper for some time and inference time is on milliseconds level. According to their experiments, the approximation ratio (a metric they use to benchmark their own method) on 1000-1200 test cases reaches to 1.11.
Comment: It would be interesting to know the best approx ratio of the best algorithm not using any neural network with comparable execution time. So that we can have an idea of the gain brought by neural network compared to the best classic combinatorial algorithm (at similar exec time).
Answer: I commented this on another answer, but I think it deserves its own answer. Some Google Brain fellows presented a method for solving TSP using an architecture reminiscent of seq2seq in the 2017 paper NEURAL COMBINATORIAL OPTIMIZATION WITH REINFORCEMENT LEARNING. In the introduction, they call out a (1985) paper that uses Hopfield networks to solve TSP. So that idea has been around for a while.
Another answer mentioned the 2015 "Pointer Networks" paper. It did something similar to this paper, but it was a supervised algorithm - it needed labeled data. The 2017 paper doesn't require this (by using negative tour length as a reward signal in a reinforcement learning algorithm).
The heuristic "always bet on neural nets" hasn't let me down (but then again, I've never been through an AI winter).
Comment: Beware, though: the paper makes clear that their results are "far from state-of-the-art" in solving TSP.   It's kinda like marvelling at a dancing dog.  The point is not that it dances particularly well; the amazing part is that it can do anything approaching dancing at all.
Comment: Thanks for responding, I'm happy to revisit this curiosity again!
Comment: I don't know D.W., I remember when deep learning was the dancing dog of image recognition... and language modeling... and chess... and Go...
Answer: I don't see any reason to expect Hopfield recurrent neural networks to help with the traveling salesman problem.
Neural networks are a form of machine learning, and they are effective when we have a labelled training set: a bunch of instances, where for each we know the input (the feature vector) and the correct label/classification/output.  Machine learning is often useful for finding patterns when we're not sure exactly how to define what the right output is; "we know it when we see it".
In contrast, the traveling salesman problem is a combinatorial problem: we want to know the shortest route through a graph.  There's no issue in defining or specifying what the right output is: it's a well-defined mathematical problem.  There's no obvious reason to think machine learning would be useful for the traveling salesman problem.
Comment: Some PHd's from UC Berkeley working for google sounds like a reputable enough team to me.....
Comment: This paper makes reference to attempting to apply a neural network to the traveling salesman problem: http://arxiv.org/pdf/1506.03134.pdf .  So I'm not completely crazy.  My curiosity about the issue was how it could be utilized because I couldn't imagine a way.  I appreciate you taking the time though and if you look through the article I'd love to hear what you think.
Comment: Also, this paper makes reference to using a hopfield network to solve the traveling salesman problem http://cdn.intechopen.com/pdfs-wm/4612.pdf , so not total buzzword bingo ;-)
Comment: @Rob, that somebody wrote up something and posted it on arXiv doesn't mean it isn't way off. Unless this got serious review, I'd be very wary.
Comment: Here is the Google Brain team showing TSP optimization using a seq2seq model https://openreview.net/pdf?id=rJY3vK9eg "We focus on the traveling
salesman problem (TSP) and train a recurrent neural network that, given a set of city coordinates, predicts a distribution over different city permutations. Using negative tour length as the reward signal, we optimize the parameters of the recurrent neural network using a policy gradient method."
Comment: This explanation explains neural networks as a subset of supervised learning (needing labelled data) but that is not true. As in the Google Brain paper, you can use a reward function that doesn't reference training data. "These results,
albeit still far from state-of-the-art, give insights into how neural networks
can be used as a general tool for tackling combinatorial optimization problems."


Magento2: Disable CSS cache

Question: I would like to see css changes instantly, without having to return to the command line. I'm in developer mode with all cache disabled, yet I have to remove pub/static var/di and cache directories, recompile dependencies, and run setup:static-content:deploy command for css changes to take effect.
Is there a better way? Can I just make magento monitor css changes and deploy them automatically?
Answer: http://alanstorm.com/magento_2_less_css
I like Alan Storm's article.  It goes through what a front end developer needs to know about LESS and working with Magento 2 front end.
You're previous answer is correct, and Grunt is a great way to go.  "Gulp" is similar and apparently even faster at it's job.  It's fast, and you can setup at the very minimum a watcher that watches your .less files and when you save the file in an editor it will automatically compile your changes for you.  This is only really useful on your local developer machine naturally and on the staging and production server you need to use the Magento 2 commands.
Grunt is very capable of doing more automation tasks for you such as minify files and anything else you want to set it up to do.  I also would recommend a chrome plugin called "Auto Reload" through Chrome or Firefox to your project as it too detects changes (you can make it to your css directory).  This way Grunt watches and compiles LESS, and auto reload will reload your window automatically when Grunt is finished.  You can have it on a separate monitor.
You can also use an awesome tool for Magento such as PHP Storm.  Works really well not only for this task but will also help you develop as you wonder where is this random file (usually XML or a PHP / phtml file).  Not only can you click and find the files you can also setup compass (and I believe Grunt) watchers through this tool for further automation.
This may sound like a lot of work and configuration to some of you (did to me) but "Give me six hours to chop down a tree and I will spend the first four sharpening the axe." -Abraham Lincoln
I still believe it's better the time spent on using tools that save us time in the long run.
Answer: I think I found a way. Looks like there is way to do it with Grunt tool.
For anyone who is wondering:   http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html#grunt_prereq

Magento2: Disable CSS cache


How do i know if rendering my animation is finished,

Question: So I know my percentage goes from 0 percent to 100 percent and keeps repeating I don't know if its finished or still rendering? SO when I do watch the video that pops up on my windows, its only like a split second of the animation. I've tried clicking render animation but I'm not sure if it ever finished. My problem is I don't know if my rendering works.
Comment: I know on Mac OS X (or macOS) there is a handy notification that pops up when it's done rendering in notification center, maybe Windows has something like that as well?
Answer: There are three things you can look for.
Most of the information that will be useful to you is in the Render Result view of the Image Editor window. The Render Result usually comes up automatically when you start rendering. You can also bring it up by pressing F11.
This is by far the best place to get information about a render process.
At the top of this window is a row of text that has information about the render. As a frame is rendering, it will show the number of the last tile that finished, or the number of samples done/remaining. It will also show information "between" frames about loading images, synchronizing geometry, calculating BVH caches, and stuff like that. That should give you some indication of whether the render is busy with something or not.
In the image below, you can see the bar I'm talking about says:

"Mem: 17.09M Peak:17.09M | Time: xxxxxx | Done | path Tracing Sample 10/10"

That text will be a little different depending on a number of factors (like image vs. animation), but that's what you're looking for.

Another thing you can look at is the render progress bar. It will show the progress for each frame (not the whole animation), but if the progress bar isn't being displayed at all, then Blender isn't rendering.

Blender provides pretty good feedback while rendering, so the previous two solutions should be plenty. If, however, you want to look at something else, the last thing you can check is the output file. You should be rendering the frames as individual images (for a host of reasons). You should be able to look at the creation time of each image and determine how long to wait for the next one. If the next one takes too long, you can use that to determine if it's still rendering.
If you're rendering to a video file, you can still look at the size of that file, and it should be increasing regularly as each frame is finished.
Answer: You could always use the Render Music addon which might be a fun solution to your question.
https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/Render_Music
The wiki page describes the addon as:

While rendering, "elevator" music automatically plays. When the render
  job is complete, a bell rings.


Matter - antimatter collision

Question: I have read that when matter and antimatter collide they just cancel out each other with the emmision of bright light. But doesn't it violate law of conservation of mass? If the the atoms dissapear into nowhere?
Comment: Possible duplicate of [Why doesn't $E = mc^2$ contradict the conservation of mass principle?](https://physics.stackexchange.com/q/339282/)
Comment: Also [Is (rest) mass conserved in special relativity?](https://physics.stackexchange.com/q/175444/)
Comment: Mass is not conserved.
Answer: Antimatter comes from the level of quantum mechanics and particle physics, not classical physics, and is subject to special relativity mechanics, not Newtonian mechanics. Specifically the particles are described by four vectors, $(E,p_x,p_y,p_z)$ where E is the energy of the particle and p the momentum.
There is no conservation of mass at the quantum mechanical and special relativity level. Only conservations of the momentum and energy in the fourvectors participating in the interaction.
The "length" of the four vector characterizes the particle and it is called the invariant mass. The particles in addition are characterized by a number of quantum numbers, which are conserved quantities:baryon number, lepton number,  charge, strangeness...
The antiparticle of a particle has to have the negative of these quantum numbers by definition of antiparticle. When particle and antiparticle interact, the sum of the quantum numbers is zero and the four vector of the sum can disperse in new combinations of particles and antiparticles, or even photons, as happens with electron positron annihilation at low energies into two photons( at high energies particle antiparticle pairs can be produced given enough energy)

Matter - antimatter collision


Security of Paillier against chosen ciphertext attack

Question: Is there a proof by now that Paillier is secure against chosen-ciphertext attack? The original Paillier paper mentions that it is not.
Answer:
Is it yet proofed that Paillier is secure against chosen-ciphertext attack. The original Paillier paper mentions that it is not.

It is indeed not - CCA security is incompatible with the property of partially homomorphic encryption.
If we have a ciphertext $C$ and an Oracle that will decrypt any ciphertext (other than $C$), what an attacker can do to decrypt $C$ is generate the encryption of $0$ (which is presumably not the ciphertext value $1$), and homomorphically add that to $C$, generating the ciphertext $C'$, and hand $C'$ to the decryption oracle.  As long as the encryption of $0$ is not $1$, then $C \ne C'$, and so the decryption oracle will have us the plaintext corresponding to $C'$, which will be exactly the same value as the plaintext of $C$ - the attacker wins.
Comment: So is there any security measurement to compensate for this weakness in paillier. I am trying to compare between paillier and Elgamal and it seems that both have the same weaknesses in terms of security.
Comment: @TasneemGhunaim Poncho showed more than that. The malleability of the scheme prevents the CCA. It is not a weakness, there are schemes that can achieve CCA, take AES-GCM, for example, it has AEAD and AEAD > CCA. The partial homomorphism, actually the full homomorphism was the target of the work of Pailler's scheme to seek for the Holy Grail of cryptography - Fully, Homomorphic Encryption, the first existence demesorated by Gentry's seminal work.


How to scan a folder with AVG via the command line?

Question: I'm running avg anti virus on linux and I'm using only the terminal. So sudo avgscan / -a -H -c scans the whole disk, is there a way to scan just a specified folder (also scans for the folders within said folder)?
Answer: To launch The AVG Anti-Virus on Ubuntu, run this command from the terminal:
sudo avgctl --start
Here are some useful scanning commands:

To scan a specific folder, use this command by replacing "folder_name" with the folder you want to scan with AVG:

sudo avgscan -H /folder_name

To download an update:

sudo avgupdate -d

To update the current virus database, use one of these commands:

sudo avgupdate --priority 1
sudo avgupdate --priority 2
sudo avgupdate --priority 3
sudo avgupdate --priority 4
sudo avgupdate --priority 5

1 - Critical update
2 - Virus update
3 - Recommended update
4 - Program update (default)
5 - Optional update

To download an update:
sudo avgupdate -d
For more help about using AVG, run this command:
sudo avgscan -h

Note: To stop the scan process, press Ctrl + C in the terminal.
Answer:
is there a way to scan just a specified folder

Yes, simply give it the folder path instead of the / you are using now.
For example:
sudo avgscan /home/shelby -a -H -c

Comment: +1 for mentioning that the full system scan was done using `/`, I was looking for some sort of specific command
Answer:
Open a terminal
To update AVG type sudo avgupdate - you then have to enter your password to get "sudo"-rights, then AVG will start updating
To scan your whole system type sudo avgscan / -a -H -c --ignerrors - this scans your system (/), all of the included (and maybe compressed) files (a), in a heuristic scan mode (H), your cookies (c), and ignores the normal I/O errors (= errors you get normally as linux protects system/proc - files.

Important: When doing sudo avgscan / -a -H -c --ignerrors you have to leave blank spaces between the commands so you type sudo then blank then avgscan then blank then / then blank then -a ...... and so on.
source: http://forums.avg.com/us-en/avg-forums?sec=thread&act=show&id=218426
Comment: Does AVG still offer a (free) linux product? There's nothing "linux" listed under their ["All Products" page](http://www.avg.com/us-en/home-small-office-security#all-tab)


Selenium IDE and Drupal

Question: Can I use Selenium IDE on a Drupal system?
I found http://drupal.org/project/selenium but that involves downloading Core and not using my current machine.
Does anybody know of a way to use the IDE with Drupal, or if not what do you suggest I do?
Answer: You can, in the same way that you can use selenium on just about any web page.
From what I can see (though I haven't' used it) the selenium module seems to be more about using Drupal to store and run selenium tests, which is useful, but will not explicitly test your Drupal site. (edit: this module dosn't look like it is currently maintained)
Drupal comes with it's own testing framework which uses simpletest. This can do a lot of the testing that you will need. It can handle form submissions and check for text in a page. There are two cases that I personally have found that it is not very useful for:

Data integrity, where you would like to check that the content of a particular page is correct where you know what to expect on your system

Two is checking the site layout, where you wish to check your live site that certain elements appear as they should do.
Selenium can be used for both of these, in the simplest case you can record tests against your site and play them back to check it. You can check for an elements existence and style. You can check that elements have the text you would expect. Even a few of these can be useful as a tool for checking the configuration of your site.

It is also possible to integrate selenium with simplest so that while running your simpletests through Drupal it will run selenium tests, however this can get very complicated and confusing.
Answer: There's a nice new module that takes Selenium exports (in PHP) and converts them to Drupal SimpleTest suites. http://drupal.org/project/simpletest_selenium
This is nice because you can then do continuous integration testing by using Drush to script the running of your tests.
Answer: The question is what do you want to achieve?

testing a Drupal site?
saving / playing back configuration settings (automation through the browser)?

The Firefox & Selenium IDE (FF extension) combination works great with Drupal for functional testing.
It also works great if you want to capture some Drupal configuration settings (that you'd like to play back e.g. in another environment) but there are better ways - Patterns and Strongarm modules - to achieve that.
A couple of tips & tricks:

while capturing clicks be careful with timings (between clicks), sometimes you need to add "pause" lines to your test case,
for HTML form checkboxes Selenium often records the "click" action instead of the much safer "check" or "uncheck" action (this is important if you run your test case several times against the same page / form),
if your page reloads when you click a certain link, use "clickAndWait" instead of the simple "click" action,
use "verifyTextPresent" often, especially if you're running your tests "blindly", using Selenium RC.
Answer: I use selenium IDE all the time. It's an awesome tool for productivity and communication.
But Drupal's Simpletest framework has a built in browser for user testing. So you probably won't that module.
See:
http://www.lastcraft.com/web_tester_documentation.php
http://drupal.org/node/265762
http://www.lullabot.com/articles/drupal-module-developer-guide-simpletest
Answer: You can test Drupal 7 with SeLite, which extends Selenium IDE. It allows your tests to access (read and write to) a test DB (isolated from the DB of the tested application).
It's especially good for Drupal 7, which can have its data in (separate) SQLite DB. So if your test environment can use SQLite, your test data lifecycle will be very easy. However, you can benefit from SeLite even if your test Drupal instance uses other type of DB.
See https://code.google.com/p/selite/wiki/ProjectHome and https://code.google.com/p/selite/wiki/DrupalTutorial.

Selenium IDE and Drupal


Bae stands for?

Question: If bae stands for 'before anyone else', when somebody mention salt bae (Nusret Gokce-the meat guy), does it mean he is the one doing that salting move before anyone else?
Answer: As noted on KnowYourMeme, Nusret Gökçe became famous in 2017 after one of his Instagram posts, in which he slices a steak and sprinkles salt onto it down his forearm, went viral. Twitter user lolalissaa reposted another video of his with the hashtag #saltbae, which was then adopted by others.
As Jason B has noted, bae is slang for a romantic partner;

Your bae is someone you are romantically involved with or in love with. [informal]

as Collins puts it. It's almost certainly a derivation of babe or baby; before anyone else or beyond all else as sometimes attested have the distinct ring of a backronym. Certainly, before anyone else is not at all a common phrase, and it unlikely that anyone would have needed a shorter way to say it. Salt Bae therefore doesn't mean anything beyond a/my/the bae associated with salt, or the person who I wish was my bae because he dispenses salt in an attractive manner.
Plenty of people use hashtags like #boyfriend or #futurewife jokingly, to indicate an attraction to someone or to comment that something about them is attractive. It isn't surprising that the chef adopted this moniker: it's short, probably easier to pronounce than his real name for most people, and suggests that he is found attractive by the public, all valuable for marketing. Perhaps, given his nationality, it also serves as a play on bey.
Comment: Thank you for your answer and really interesting point on "bey". I didn't know that the pronunciation is very close to the word "bey' in Turkish.
Answer: I was pleased to see that bae is now actually defined in some main dictionaries and that I don't need to resort to using a less definitive reference.
From Merriam-Webster:

US slang
  : SWEETHEART, BABY · If you're in a relationship, you've probably already begun frantically searching the web for the perfect gift for your bae, but don't fret—I have you covered. —Amanda Fama

From Oxford:

US
informal
A person's boyfriend or girlfriend (often as a form of address)
'I'm going to see my bae'
[as name] 'Bae just made me tacos'
'what's wrong, bae?'
Origin
  Early 21st century: abbreviation of baby or babe.

These dictionaries trace its origin back baby or babe (as per the Oxford link) and not to before anyone else—even though that does seem to be something that has since been ascribed to it.
Regardless, it's still an affectionate slang term, and it isn't meant to be used as a replacement for before anyone else in normal language use.
(I have never heard salt bae before, so I cannot comment on that specific instance.)
Comment: It has also crossed the atlantic, and is in use by young people in the UK
Comment: This definition may fit better than "before anyone else" I guess for "salt bae". Nusret Gökçe is a Turkish restaurant owner making this particular salting movement; when he cooks or serves meat, he salts the meat with a weird but very famous way. So "salt baby" he is, maybe!
Answer: BAE is short for "Birleşik Arap Emirlikleri" in Turkish, that is United Arab Emirates, where he had opened his first overseas restaurant. When the salt thing became popular, he kept hashtagging BAE alongside the word "Salt" to promote his UAE establishment.
Comment: That is very interesting! Do you have a source for that information?
Comment: Well, I cannot find a Congress report on this. What would qualify as source?

Bae stands for?


Creating Charts with multiple series in Powerpoint 2013 using C#

Question: I am using VS2013 Ultimate, with Office 2013 (PowerPoint, Excel and Word all installed). I am coding in C#.
I am creating a PowerPoint presentation using C#. So far, I have managed to accomplish everything that I have wanted to do. However, I am having problems attempting to create a chart. My understanding is that Excel is used to manage the data (in a worksheet). I have the following code, which will produce a chart with two series in a PowerPoint slide. The problem is that 'sometimes' the chart does not get added to the slide. It gets added, the worksheet appears and the data is modified and the chart disappears from the slide! I also notice 2 instances of Excel firing up but I cannot understand why. Can anyone shed any light on this please? Thanks.
<code>public void CreateChart(PPT.Slide slide)
    {
        slide.Layout = PPT.PpSlideLayout.ppLayoutBlank;

        var chart = slide.Shapes.AddChart(XlChartType.xlLine, 10f, 10f, 900f, 400f).Chart;

        var workbook = (EXCEL.Workbook)chart.ChartData.Workbook;
        workbook.Windows.Application.Visible = true;

        var dataSheet = (EXCEL.Worksheet)workbook.Worksheets[1];
        dataSheet.Cells.ClearContents();

        dataSheet.Cells.Range["A1"].Value2 = "Bananas";
        dataSheet.Cells.Range["A2"].Value2 = "Apples";
        dataSheet.Cells.Range["A3"].Value2 = "Pears";
        dataSheet.Cells.Range["A4"].Value2 = "Oranges";
        dataSheet.Cells.Range["B1"].Value2 = "1000";
        dataSheet.Cells.Range["B2"].Value2 = "2500";
        dataSheet.Cells.Range["B3"].Value2 = "4000";
        dataSheet.Cells.Range["B4"].Value2 = "3000";

        var sc = (PPT.SeriesCollection)chart.SeriesCollection();

        do
        {
            var seriesToDelete = sc.Item(1);
            seriesToDelete.Delete();
        }
        while (sc.Count != 0);

        var series1 = sc.NewSeries();
        series1.Name = "Pauls Series";
        series1.XValues = "'Sheet1'!$A$1:$A$2";
        series1.Values = "'Sheet1'!$B$1:$B$2";
        series1.ChartType = XlChartType.xlLine;

        var series2 = sc.NewSeries();
        series2.Name = "Seans Series";
        series2.XValues = "'Sheet1'!$A$1:$A$2";
        series2.Values = "'Sheet1'!$B$3:$B$4";
        series2.ChartType = XlChartType.xlLine;

        chart.HasTitle = true;
        chart.ChartTitle.Font.Italic = true;
        chart.ChartTitle.Text = "My First Chart!";
        chart.ChartTitle.Font.Size = 12;
        chart.ChartTitle.Font.Color = Color.Black.ToArgb();
        chart.ChartTitle.Format.Line.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
        chart.ChartTitle.Format.Line.ForeColor.RGB = Color.Black.ToArgb();

        chart.HasLegend = true;
        chart.Legend.Font.Italic = true;
        chart.Legend.Font.Size = 10;

        chart.Refresh();

    }
</code>
Comment: so, putting a chart.refresh() within the Do{} block has resolved my problems! How odd!?!
Answer: so, putting a chart.refresh() within the Do{} block has resolved my problems! How odd!?!