How to get Steam to recognise previous game files from The Witcher 3?

Question: Well, I didn't know that I could use the backup tool in Steam and I didn't use it before reseting my Windows. I don't want to download The Witcher 3, neither lose my saved games, but I couldn't get Steam to recognize the files I copied from the folder /Steamapps/Common. I copied the folder back there and clicked in Intall, although it started downloading a new game. I really don't wanna download all 50GB of game again, considering I have a 10MB internet :( Anyone can help?
Answer: You can declare your old steam folder as a library. This should immediately make Witcher 3 playable again after a quick data integrity check.
Go to the Settings - Downloads. Click Steam Library Folders, then select your old steam folder(s).
I reinstalled Windows just a week ago. Set my old steam folder as a library and all my games worked again.
Answer: What Dulkan said is correct, however it happenned to me once and even that did not work. (Maybe they fixed it now)
What I did at the time was simply put everything in place and launch the .exe as it will automatically 'connect' with Steam.
Comment: I would genuinely love to, however I don't have enough reputation for that and still thought my answer might be useful as Dulkan's approach didn't work for me. At that point I'd like to ask why you need 50 reputation to gain comment-rights anyway.
Comment: Please use the 'add a comment' link to comment on other users posts rather than creating new answers.
Comment: Ask on Stack Exchange Meta :D


Somehow a directory got converted to a file, how do I change it back?

Question: When I ls -ls on my folder I get this now:
27216 -rw-r--r--   1 qat users 27865731 2012-03-16 09:13 deploy

But it was a directory, is there a quick way to convert it back?
Comment: No, there sure is no quick way to "convert it back". I can't imagine how this happened in the first place, probably you deleted the directory and placed a file there.
Comment: Using the same tiny magnet that was used to bypass all the filesystem safety check, you can flip the bit back.
Answer: No, there's no quick way to convert it back.
I share the opinion of one of the commenters that you probably inadvertently removed the directory and replaced it with a file.  Assuming the file size didn't change, 27MB would be a gigantic directory, containing hundreds of thousands of files.  In many years of doing Unix admin work, I've only seen one directory with over 100,000 files in it, so I'm doubtful that you had a directory that large.  Take a look at the files contents and see if it looks familiar; odds are good that the file contains logging output from some process or the other.
Assuming you're not mistaken and a directory was silently converted to a regular file, this is very bad news for your system.  A number of things could be wrong, and I would not trust this system again until I figured out what component (disk, disk controller, RAM, filesystem code) is failing.
Comment: Good explanation. My advise would be to use `file deploy` to check the file type.
Answer: This was happening to me running arch-linux because my /home directory was mounted on a usb hard drive and it was autosuspending.  So I had urxvt and tmux open in the /home/user directory and was logged into X.
I went away from my screen for an hour and came back and typed vim into the urxvt bash shell.  Since the drives were suspended they first had to wake up so it took about 5-10 seconds for vim to load.  It doesn't have to be vim for this to happen but when I went back to bash some of my directories like /home/user/tmp and /home/user/.vim had been converted from directories to files.
The fix for me was to reboot into level 3 as root and unmount /home, then running an fsck -f on the hard drive, then I rebooted and the files had been converted back into directories and none of my files were lost or corrupted.
Then I disabled usb autosuspend to keep it from happening again.


Word for someone who finds oil reservoirs

Question: This question may be way too specific, but what is the word for someone who surveys land in search for Oil (for petroleum). I think it might be a scientific word, like one that ends with -ist (like biologist)
Comment: Well,  you might start with "geologist", though there are lots of specialties involved.
Answer: Petroleum geologist.

A petroleum geologist is a earth scientist who works in the field of petroleum geology, which involves all aspects of oil discovery and production. Petroleum geologists are usually linked to the actual discovery of oil and the identification of possible oil deposits or leads. [Wikipedia]

Petrogeologist is used also but it is less common.
Answer: Both my father and his father made their livings at precisely this job. The term used for it within the petroleum industry (in the United States, anyway) is exploration geologist.
A person who conducts seismic mapping of the strata of rock and other deposits in a particular area in order to help assess their potential as a source for oil or natural gas is called a stratigrapher.
Comment: Interesting. It seems like a more general term and not specific to petroleum industry. "An Exploration Geologist is a person who uses their specialized knowledge of the earth's surface to discover resources of value. This type of Geologist is used extensively in the mining industry." [careerminer.infomine.com](http://careerminer.infomine.com/exploration-geologist-salaries-in-canada-by-province/)
Comment: @ermanen: Right. But since multiple specialties of "petroleum geologist" are employed within the petroleum industry, the term "exploration geologist" is actually more specific than "petroleum geologist" within the industry. It's also a bit odd in that you might expect it to be something like gold prospecting, with the vast majority of the exploration geologist's time being spent in the field; but in fact most of the person's time is spent in an office analyzing stratigraphic data, recognizing continuities with known petroleum-bearing layers elsewhere, and the like.
Comment: *Petroleum geologist* explores and charts stratigraphic data also but specifically to locate hydrocarbon fuels (oil and natural gas).
Comment: I can't account for the word choice then, I guess. It's certainly true that the engineers that my father worked with were known as "petroleum engineers," but for some reason "petroleum geologist" was not a job title at the oil company where he worked (nor, I believe, at the one where my grandfather worked).
Comment: Yes, it might depend on the company also. One distinction might be, exploration geologists search for new fields and petroleum geologists explore and develop the petroleum reservoirs.
Answer: Prospector.
Today prospectors are almost always (and when hired by serious interests, always) exploration geologists. Since their field is geology they are more likely to refer to themselves as geologists than prospectors.
But prospector covers both them and also those in earlier times whose methods were informed by less scientific knowledge than today.
Conversely, geologist covers geologists who apply their training to other ends.
Answer: If you're just guessing there might be oil down there and drill a well, you're a wildcatter. The days of wildcatters is long gone. All the crude that is ridiculously easy to find was found (and extracted) long ago.
If before drilling that expensive well, you drill a number of holes, sink small amounts of explosives into those holes, and apply some hairy mathematics on the seismograph readings (and other readings) that result to "see" what's down there, you're more likely to be a petroleum geologist (or more specifically, an exploration geologist).
The petroleum industry distinguishes between upstream, midstream, and downstream, and within upstream, it distinguishes between exploration and production. This is a question about exploration.
Comment: Yes, I believe that [Jed Clampett](http://en.wikipedia.org/wiki/The_Beverly_Hillbillies) discovered the last previously unknown near-surface oil deposit back in 1962.


Third party base layer other than Google map

Question: Can we use third party base map (images tiles) for displaying vector data?, like we use google map as base layer for displaying vector data in OpenLayers application.
Answer: Yes.  You need to connect to a web map service (WMS) or web feature service (WFS).  Have a look here for a few.  You need to watch the licencing though.  For instance, OSM are happy for you to use their data and even their servers but you can't use their servers for heavy (commercial use).  You can also render your own layers.  You can also connect to Google and use Google base maps in OpenLayers.  You just need to import the Google API at the start of your JavaScript.
There is a lot of advice on how to do this in this forum.
Answer: I just worked through some of the details to show google basemaps in the JSAPI.  You can see a working example here.  The majority of the code is posted on questions/20766.  ESRI JSAPI example for OSM can be found here but this should get you started:
Required the osm package:
dojo.require( "esri.layers.osm" )

Create the layer:
osmLayer = new esri.layers.OpenStreetMapLayer( options );


Managing Users With Multiple Roles & Properties

Question: I need to manage a list of users who can have different roles on different websites. A user could manage up to 20 websites. I'm trying to find the best way to organize this information. The image below fails in that it does not show each user's role per each website. It would also get messy real quick if the user belongs to many websites.
Comment: In situations like this we use expanding table rows. Like this http://bit.ly/2knD8JC  - That at least would solve your location issue. Is something like that feasible?
Comment: Does the eventual UI also have to function as a CRUD interface? or are you just looking for a way to show a read-only list of all the websites a user is associated with?
Comment: It would also need to function as CRUD. I'm hoping to avoid uniquely listing each website & role combo. I'm also hoping to avoid adding any filters. The final solution does not need to be a table though.
Comment: Either expanding table rows like what @dennislees said or have a View action that either opens another page or shows a modal of more complete info.
Comment: @dennislees I think that is the best solution given my restrictions. Thank you for the suggestion. jen +1 for similar line of thought.
Comment: I added this as an answer, and also included an option for when you need to show a long list item, but the interactions are simpler.
Answer: For complex interactions (e.g. CRUD) on table rows, consider an expanding row
This provides the space for your interactions.

For simple interactions (e.g. read-only lists), consider a modal window.
I think the way Facebook lets users review all the likes on a given item is a good example of this.
Answer: you can also try displaying is statistical way.
Answer: You could present the overflowing row information as follows:
In case the websites managed by the user begin to overflow, you could include a chip that presents the count of overflowing websites, including the one that is partially overflowing.

As the user hovers over the particular chip, the user is shown a floating modal that presents the list of all the overflowing websites. This view facilitates quick view in case the user is merely browsing the table.

Also, if you notice, I have incorporated a drop-down chevron at the end of each row. In case you wish to present a detailed view of the user with all their information, say his/her contact, their company etc. you could create an expanded view in the form of an accordion that expands and collapses as the user acts on the row element.


In Scrum, how to estimate research stories?

Question: In our Scrum team, when there is uncertainty about a story or the team is not sure about how to implement it, we take up a research story first. Based on the findings of this research story, we are able to estimate the base story better. Should we assign a time box (so many hours) for research stories or a regular point estimate?
Comment: More on Spikes - http://www.scaledagileframework.com/spikes/ And this one suggests how not to use spikes - http://www.leadingagile.com/2014/04/dont-estimate-spikes/
Answer: Research stories (called Spikes in Agile terms), should be:

used sparingly
kept short
always be time-boxed

Should we assign a time box (so many hours) for research stories or a regular point estimate?

Regular point estimate cannot be used mainly due to following reasons:

story points give out a measure of business value
points are used to calculate team's velocity of generating business value
spikes are initiated when "there is uncertainty about a story or the team is not sure about how to implement it". When there is already an uncertainty, it becomes unreasonable to estimate it in a planning poker session. It becomes difficult to compare relative sizes of a research work (unknown activity) against a piece of working software, such as creating a shopping cart module (known activity). A spike would help you in reducing risks so that you may better understand / estimate other user stories.

A spike ends when you have achieved the desired results or time is up.
Similarities between story and spike:

has acceptance criteria (what means "done" for this spike)
added to iteration/sprint backlog
findings are discussed or output of spike is demonstrated at end of iteration

Difference between story and spike:
Spike does not deliver shippable product (business value).
As Agile Principles states, Working software is the primary measure of progress, completion of a spike does not directly create a working software.
Comment: Consider also that a spike is sometimes used when a development team doesn't feel confident in other valuable Product Backlog Items's in the backlog; having a "research" PBI can be a smokescreen. I tend to encourage teams to include the uncertainty they feel in their estimate for the valuable PBI rather than separating it from the work. This helps to minimize the possibility of waste i.e. the research gets done, but the valuable PBI does not.
Comment: @aziz-shaikh how do you account for the effort and time of the dev team put into these spikes which are also part of the sprint backlog? Just let the velocity go down? Reduce the teams capacity? Something else?
Comment: @bit-pirate Yes, spikes are part of the sprint backlog. Regarding the point of measuring and recording the efforts spent on a Spike, there are two views. One view is that spikes are time-bound but without Story Points. This means that you velocity will go down, however outcome of this spike may help you in picking up velocity in subsequent sprints. Second view is that you assingn Story Points to a spike just like other user stories. Advantage is that your velocity will not drop due to this spike. However, not all spikes are easily estimatable. Do you give higher points or lower?
Answer: TL; DR

Should we assign a time box (so many hours) for research stories or a regular point estimate?

You should do both. A spike (or "spiked story") requires both a time-box and a level-of-effort estimate, and is always counted as work.
Spikes Are Just Special User Stories
As one source states:

Like other stories, spikes are put in the backlog, estimated, and sized to fit in an iteration...The output of a spike is demonstrable, both to the team and to any other stakeholders...And, like any other story, spikes are accepted by the product owner when the acceptance criteria for the spike have been fulfilled.

The main distinction is that a spiked story is designed to reduce the cone of uncertainty rather than deliver a shippable increment. However, all the other requirements of good user stories and framework processes apply.
Why Spikes Should Be Estimated with Story Points
Scrum and XP are all about time-boxing; it is therefore axiomatic that all processes within these frameworks need to have a finite duration. However, the reason for assigning story points is slightly less obvious.
The CodeGnome agile motto is No invisible work, ever. Since a spike consumes time and resources within a sprint, it is essential that the effort expended on the spike is made fully-visible to the project. The way to do that within Scrum is to ensure that the spike is:

listed on the appropriate backlogs,
counted as work to be pulled into the sprint, and
represented in the burn-down chart.

While some people may argue that assigning story points to spikes will skew velocity, this is a misunderstanding of the velocity metric. Velocity doesn't measure features, it measures capacity. Specifically, velocity is a trailing average used to estimate the team's available capacity for future sprints.
It is up to the Product Owner to prioritize that capacity. Balancing the delivery of shippable features against other (perhaps less-tangible) project requirements is the province of the Product Owner; tracking and estimating all project-related effort on the Product Backlog is the essential mechanism to express that balance visibly within the project.
Comment: how do you convert timeboxed spikes to stories? For doing that you must use a conversion ratio which in the end can result with the team counting hours instead of points. The other thing, based on my observations, is that it is hard to predict the outcome of research tasks and people have tendency to spend more time because "I'm so close to find the solution". That's why you need timeboxing. Don't you see a problem here?
Comment: @BartekKobyłecki You ask interesting question about ideal hours vs. story points, and about time-boxing in general. There are no inherent conflict here, but if you don't understand why then they deserves a longer answer. Please ask these as separate questions.
Comment: Did that http://pm.stackexchange.com/questions/9377/how-to-timebox-spikes-using-story-points
Answer: This is a great question, since this comes up for us a lot, too.
We haven't done anything specific for this before, but I think you're right about timeboxing it. X amount of hours, and then reconvene. If they're "almost there" in finding answers, maybe make a new story for round 2 of research and so on.


Coud I ferment a five gallon batch on top of the yeast cake from a finished one gallon batch?

Question: Title says it all: Could I ferment a five gallon batch on top of the yeast cake from a finished one gallon batch?
Answer: Sure. This amounts to a large starter, so you may be slightly overpitching, but I've used the yeast cake from a 5 gallon batch to ferment another 5 gallon batch and had no issues. Depending on the style you are brewing, this could change the flavor somewhat, so to get an optimal pitching rate you could use a yeast calculator and discard part of your yeast cake. However this probably won't make much of a difference, other factors such as temperature will play a much larger role.
Also, if you aren't washing the yeast, you generally you want to ferment a similar style or darker beer the second time around to avoid clashing flavors.
Comment: And make sure there are no off-flavours or aromas in your 1 gallon beer or in the yeast that you are pitching onto.


cva for a collateralised swap

Question: For a swap thats fully collateralised once a day, i suppose that the cva measures risk only for the intraday chance of counterparty default?  Surely thats tiny enough to be neglible, or am i missing something?
Answer: Collateral imperfections: the CVA cover the expected exposure in the event that the counterparty defaults. When the trade is collateralized and subject to variation margin. This exposure will come only from the imperfection of the collateral. Because posting and receiving collateral actually has a cost, usually the collateral agreement will be a threshold amount (bellow which no collateral is posted / received), and a minimum transfer amount.
The Margin period of risk: Also, when computing the CVA, you are concerned with the case where the counterparty defaults, and in this case before the default, the counterparty would usually stop posting collateral for a given period (called margin period of risk), usually around 10 days. In this period, the value of the swap can move with the market and diverge from the collateral balance.
The initial margin: The IM is supposed to cover these market values moves during the MPOR, it's a quantile like PFE, but it not the same as PFE is a quantile of the credit exposure = max(MV(t), 0) whereas the initial margin is a quantile of the market value variation over the margin period of risk = MV(t + MPOR) - MV(t).
Answer: I would say it is negligible, the only times have ever had to compute that on standalone ISDAs (with just one albeit large swap) it's really honestly been very small perhaps a few tens of k for a 500mm swap over 15 years from distant memory, even if you say for example that your period of risk is greater than a day (let's say you have a massive swap, a major deriv cprty defaults, whole market is same way around so you can't replace your market risk hedge as quickly as you'd like - inconceivable in vanilla swaps but bear in mind regulatory hedge replacement windows typically assume 7 days or similar).
This is even in the context of wrong way credit rates correlation - if you model credit intensity and rates as correlated brownians you just aren't going to get a material one day move. As a caveat I would say however if you have a large long dated swap book that is very one way vs a counterparty (let's say you are receiving fixed and assume low rates <-> wide credit), then obviously it will add up. So as in many problems, it's worth looking at with conservative assumptions on period of risk and correlation, to allow you decide if you can afford to ignore it on your portfolio. Regulators as mentioned do demand a marghin period of risk, but unless am wrong for certain banks, this does not generally make it into economic CVA calculations and hedging decisions.
Comment: It's also why exchanges have initial margin etc... and CSAs may not have zero thresholds.
Comment: Any trading desk that was around on the weekend of the Lehman default went through these processes (ahem, yours truly included), namely when to replace the hedge (worse in credit space, all fully collateralised but in many cases correlated and hence gap risky exposures). However again, you are asking is it ok to ignore gap risk, on your example, in most cases it probably is, if you have a multi billion wrong way book vs a counterparty, then it's sth you might want to think about.
Comment: the vast Mjority of swaps are traded fully collateralised, so where is tge demand for cva calculations coming from?
Comment: In full generality: Gap risk. Basically full collateralisation is not necessarily a guarantee of zero default risk. However as per above,m in this case it is most likely negligible, unless, as I say, you have a very large long dated wrong way exposure to a systemically important counterparty, then, just like a regulator demands a non unit margin period of risk, there is some default risk on a fully margined product - you do have to replace your hedge before the market moves
Answer: i think that cva is meant to cover Expected credit losses
and PFE x% covers Unexpected credit losses
and so gap risk would be more covered by PFE
i think initial margin for ccp cleared trades is more like a charge for PFE than for cva
So, i still dont really fully get where the demand for cva is coming from
Comment: hmm - Expected and Unexpected are regulatory distinctions. PFE is obviously a tail measure, which is not the same as an expected shortfall, as priced by a model in collateral vs MTM. For an extreme example, consider a daily margined CDS where you buy protection from on an entity, from that entity itself. You would obviously price the wrong way risk on that, which is not the same as PFE at all. WWR should be part of a CVA calc if deemed important. Although PFE derived thresholds do cover and provide protection against WWR, that is not the same as saying PFE and expected WWR are the same.
Comment: actually put another way the presence or absence of collateral makes no difference to a modelled correlated price process. The correlation, if wrong way, creates gap risk. If there were zero collateral, you would call this CVA, if you now put collateral in, you don't immediately discard the correlation effect and call it PFE or sth, it's still part of the CVA calc, you just have collateral which means its impact  is rendered, in most cases, negligible.
Comment: http://eu.wiley.com/WileyCDA/WileyTitle/productCd-047074846X.html

Brigo's excellent book on collateral and CVA has good mentions and reference to WWR in CVA calcs. Definitely not to be conflated with PFE, if you are trying to **price** CVA - PFE is, more for trying to protect against it. Correlation can create gap risk even in the presence of daily margining, it's no more complicated than that really.

cva for a collateralised swap


What was the first Hentai ever made?

Question: I just want to ask what is the first Hentai manga and what is the first Hentai anime?
Comment: The first hentai manga depends on what exactly qualifies as a manga. Pornographic drawings have been made in Japan since the Heian period if not earlier, and they could qualify as manga under some standards. Under other definitions, the origin of manga was likely in the 18th century, but regardless of what definition you use, it seems likely that the first pornographic manga was quite early in the history of manga and probably not known today. For anime, the question is somewhat more tractable.
Answer: The history of Japanese hentai manga is very, very old.
For example, The Dream of the Fisherman's Wife (NSFW) was drawn in 1814.
The work is also known as the earliest tentacle erotica.
In 1722, the government created a law to ban hentai manga.
This means hentai manga had already been known in public.
For Japanese hentai anime, Wikipedia entry says Suzumi-fune (1932) is oldest hentai anime.
But well-known oldest hentai anime is the Cream Lemon series.
This series was ranked in the best-seller video list (which contains non-adult videos.)
Answer: This is just additional information with regards to the previous answer.
The first hentai OVA is credited to Lolita Anime, which was first released in February 21, 1984, not to Cream Lemon, which was first released in August 11, 1984, although both series are one of the earliest to be released. Due to its sensitive nature, you would have a hard time finding a copy of Lolita Anime legally, because as described in Wikipedia,

Containing eight episodes, the series focused on underage sex and rape, and included one episode containing BDSM bondage.

Urotsukidōji, on the other hand, was the first hentai film brought to American viewers.

Often cited for creating the hentai and tentacle rape genres, it contains extreme depictions of violence and monster sex.

What was the first Hentai ever made?


Is "altitude" an absolute measure of air "thinness"?

Question: I am wondering if altitude is the only thing you need to know in order to evaluate the "thinness of air" at certain point on Earth. For instance, will climbing a 6000 m peak in the Andes or a 6000 m peak in the Himalayas make any difference in how you need to acclimatize to the elevation? (I'm not referring to how tough the climb is.)
Comment: You mean the oxygen concentration and not the density I guess. Temperature is the most important point that comes to my mind. If you are asking concerning to the influence on the human body: as far as I know it's not the oxygen concentration in the air, it's about the partial pressure, that lowers the body's ability to absorb oxygen.
Comment: Right! So is the altitude the only thing that matters when estimating the partial pressure ?
Answer: I'm guessing by "thinness" you mean the ability to breath air. Couple of things to note here:

Your ability to breath decreases as your altitude increases because of a lack of Oxygen.
the relative amount of Oxygen in the air is static (there is almost exactly the same percentage of oxygen 23% at 10,000 feet as 1 foot).
What does decrease at altitude is the air pressure (there is less oxygen but there is less of all air gasses)

I am wondering if altitude is the only thing you need to know in order
  to evaluate the "thinness of air"

Yes and No....

At low altitudes above the sea level, the pressure decreases by about
  1.2 kPa for every 100 meters. For higher altitudes within the troposphere, the following equation (the barometric formula) relates
  atmospheric pressure p to altitude h

From Wikipedia
Where:
p0  sea level standard atmospheric pressure 101325 Pa
L   temperature lapse rate, = g/cp for dry air  0.0065 K/m
cp  constant pressure specific heat ~ 1007 J/(kg•K)
T0  sea level standard temperature  288.15 K
g   Earth-surface gravitational acceleration    9.80665 m/s2
M   molar mass of dry air   0.0289644 kg/mol
R   universal gas constant  8.31447 J/(mol•K)

You may be in the troposphere depending on the height:

Weather also alters air pressure, the high and low symbols on your weather chart. High pressure means their is more air currently and low means less. Though these are very small variations in the scheme of things.
At the altitudes that people climb at pretty much the only thing that is important is altitude!

When it comes to climbing mountains, Oxygen pressure is only one factor.
Sometimes a much more important factor is the persons ability to efficiently process as much of the available Oxygen as possible. This is why (for example) sherpa's perform much better at high altitude than someone from Wales. Being born at high altitude (and possibly their genetics from thousands of years of living at altitude) they have more red blood cells and their bodies are much better at processing the available Oxygen.
Comment: Also, the Sherpa drinks far less beer.
Comment: Great answer. That pretty much answers my interrogations.


Simple method of forecasting number of guests given current and historical data

Question: I am trying to predict the number of guests a restaurant might serve in a meal period based on the volume of business that same day from prior years (3-5 years of data), trends for the same day of the week in the recent past (6-8 weeks), and the daily trend vs last year for the 21 days leading up to the day in question. For example, I would like to predict the number of lunches I might serve on Wednesday, Nov 15, 2017 using data from each of the same Wednesdays from the past 3-5 years, as well as the 6-8 Wednesdays immediately prior to 11/15/17, and the daily trends vs last year for each of the 21 days prior to 11/15/17. Ideally, I would like a to return a result showing a low end, high end, and most likely. I am not a statistician, just a restaurant manager trying to take some of the guesswork out of staffing and ordering. I am with a small company that uses Excel for most spreadsheet applications.
Comment: The *forecasting* tag might be useful for you to take a look at: https://stats.stackexchange.com/questions/tagged/forecasting
Comment: Interesting problem (+1). You seem to have a lot of data and a number of possible approaches could be considered in here, but what I understand is that your main concern is that you need some kind of simple model for it, that can be easily applied by hand in Excel. To make it more likely for you to get a applicable answer, maybe you could share with us an example of your data (e.g. made-up example, of a sample of a fraction of your data etc), so we are totally clear what you're talking about. Are there any "cycles" or seasonal effects (a lot of orders in the summer etc.) in your data?
Comment: As for restaurants, in some cases it may make sense to add weather as a predictor.
Comment: The answers have all focused on the forecasting aspect, but there's also a decision science aspect to this: how much does will it cost if the model is under by 50 vs over by 50?  How big are the swings in model predictions that would actually affect a management decision?  Having answers to these questions in mind will give you a sense of how much optimizing your forecasts is worth.
Answer: There are simple methods to use but they are probably profoundly wrong as daily data presents a ton of opportunities . Simply striking daily averages is both simple and useless BUT I guess if there is no analytics around it is probably better than the overall average . The absolute LAST approach would be to use the overall mean . Models need to be as simple as possible BUT never too simple.
As was nicely summarized by @Frans your problem/opportunity is a complicated one but very rewarding. Besides some of the items mentioned there are individual lead and lag effects around each holiday along with possible level shifts and changes in day-of-the-week effects and of course how to identify and treat anomalies. There are also possible week-of-the=month effects and day-of-the-month effects et al. Identifying the structure is the problem and possibly even incorporating pricing and advertising effects.
Take a look at http://autobox.com/cms/index.php/afs-university/intro-to-forecasting/doc_download/53-capabilities-presentation particularly slide 50- . I  have been working with fast-food restaurant chains to even push down the forecast to 15 minute intervals and will try and give you some guidance. If you post your data and specify the country and the start date , I will try and help further. Preferably you might post 3 years of daily data as there are probably seasonal and holiday effects that might need to be identified.
In terms of being able to quickly come up with forecasts this is handled by storing and updating models and then quickly forecasting using models that have been archived. Prediction intervals should be approached via monte-carlo to provide robust estimates for the range of future values.
You have a complicated problem AND there are a lot of bad simple solutions that may be insufficient but inexpensive. if this is important then perhaps you need to muscle-up to a workable & affordable solution.
EDIT UPON RECEIPT OF DATA:
After receipt of your data I arbitrarily took the LUNCH series (you had provided both LUNCH and DINNER data )and inserted 0.0's for some missing days obtaining 1454 daily values .. start date 1/1/2013 ending 12/24/2016 and introduced the data to AUTOBOX requesting a 14 day forecast.
Here is the 14 day (arbitrarily chosen) forecast  . The acf of the original data showed significant memory structure which is of course presuming no special causes  while the acf of the final model's residuals showed no remaining stochastic structure in the residuals  . Since the sample size is large we get "false conclusions" using the very approximate standard deviation of the acf (1/sqrt(# of observations). The plot of the final model's residuals supported the randomness conclusion or at least the suggestion that the model couldn't be rejected
How to evaluate deterministic vs stochastic components of a time series? discusses the advantages  of integrating both stochastic (arima/memory) structure and event /fixed effects found via search procedures culminating in a holistic model.
Restaurant activity is a classic example of how we do things in predictable rhythms. Arrivals to a restaurant follow day-of-the-week patterns and monthly patterns albeit being very affected by holidays and other special events. To summarize the model contains 6 types of factors/features separating the observed series to signal(predictable) and noise(random) .These 6 features are 1) Baseline ; 2) day-of-the week ; 3) month-of-the-year ; 4) pre, contemporary and post holiday effects ; 5) Deterministic effects discovered via Intervention Detection ; 6) memory (previous values).
The Final model's statistics are here  with Actual/Fit and Forecast here
Detailing the 6 features . First the baseline  ..essentially an expectation before identified effects are introduced .

now the day-of-the week

now the month=of-the-year

now the holidays

now the identified exogenous deterministic/unattributed effects (partial list)

and finally the effect of prior observations i.e. memory reflecting unspecified variables omitted from the model . This is the conditional effect of memory GIVEN the deterministic (assignable cause) structure

The window of response around each holiday is presented using the backshift operator B ;  https://en.wikipedia.org/wiki/Lag_operator
Comment: This link has 4 years of data from 2013-2016. https://1drv.ms/x/s!An6hzJ1mua8qogC39ObGOM3YUqP_
Comment: That is a gorgeous answer.  Nicely done!
Comment: tu very much. I have often wondered why the OP never responded , upvoted or accepted what I thought was a very complete and thorough response.
Answer: This is not a trivial task as there are many ways to approach this problem, as well as things to take into consideration. Instead of proposing a model, I will give you some general advice.
What you are describing is a time-series and predicting the number of guests in the future is a forecasting problem. A time-series can be modeled for example using a mixed model, modeling the days as random effects because they occur multiple times in the dataset.
The first things you may want to consider are:

Did the average number of guests remain fairly constant over the past years or has there been an increase/decrease? This determines whether the time-series is stationary or not.
Are there any special days to take into consideration, such as national holidays? In a regression model, these could be included as dummy variables.
What other factors might affect the number of guests on a given day? Surely the daily or weekly menu may have an effect, or perhaps there are a different number of guests depending on the season.

Some other things that might help once you want to decide on a model:

Excel is very limited when it comes to statistical analysis. Consider using R or Python, both of which are free programs. In R, there is a package forecast with a plethora of useful models exactly for the purpose of forecasting time-series.
If you are going with a regression model, consider that the number of guests are count data. Independent counts are Poisson distributed, but since there will be returning guests, recommendations from other guests, changes in the daily menu and many other (possibly unknown) factors affecting the number of guests, you may want to consider a distribution that can model these extra sources of variance (overdispersion) by using e.g. a negative binomial distribution.
You mentioned you want to report an expected number of guest with a lower and upper bound. Prediction intervals can give you this lower and upper bound for a given amount of uncertainty. The expected value depends on the distribution you intend to use.

I imagine the restaurant won't wait for you to complete this analysis, so I should also note that for starters simply going with the mean number of guests might work reasonably well, especially considering the time investment to calculate it. You could even do this in Excel.
Lastly, search for questions related to yours. There are many good questions about time-series on this site.
Comment: This answer is misleading as it mixes different types of analyses. You keep mentioning time series forecasting but what you're describing is all about _non-time series_ techniques. With a specialised time series approach (e.g. the ARMA family of models), information such as national holidays is _endogenous_ not _exogenous_ and should therefore not be included in the model as external regressors. Stationarity is in fact required by statistical forecasting techniques, but what you're describing is not the right way to detect it.
Comment: A mixed model with a properly specified covariance structure is as much a specialized approach as an autoregressive moving average. As for your second point, I did not describe a method to detect stationarity, just the what might cause deviation from it. The question was very broad, so I answered to the best of my knowledge (mainly linear regression) what this user might read up on. If your knowledge of ARMA is more extensive and you can summarize it for a beginner, then I think it would be better to write an answer. I can't tell what you want me to change about the answer from your comment.
Comment: Frans, I'm not attacking you, nor am I questioning your understanding of the things you're describing, I just believe that an answer should be clear to any reader and not just the OP. Obviously, getting technical about statistical forecasting of any type of school would not be helpful to the OP in this case, but if an answer stays high level it should at least be coherent. Your answer is mixing up two different paths of analysis as well as technical with non-technical jargon, this can be confusing for a novice on the subject.
Comment: @Digio  iN what sense are holidays endogenous. They are not to be predicted but rather are fixed, The response to them is part of the prediction for Y the endogenous series. All dummy indicators be they day-of-the=week, day-of-the-month, month=of-the-year et all are deterministic exogenous series .


Why do people say rhubarb flowers, when I've never seen it flower for me?

Question: I have a lot of family that has the same cultivar of rhubarb, but it never seems to  flower (from the same mother plant that we split the roots apart over 30+ years). Why do people say that it flowers, when it never has for us?
Comment: If you harvest the stems a few times during the growing season , that will prevent the plant from building enough energy to bloom.  I bought roots from a neighboring farm that harvested 3 times a year. The second year I had blooms because I had not harvested much ; They never bloomed on the farm.
Comment: Pics: https://gardening.stackexchange.com/q/64527/41923
Answer: Well it can and does flower under certain conditions; first, some varieties are more prone to bolting or flowering, but otherwise, the factors are usually maturity, or conditions such as a very warm spring might trigger flowering, or stress such as suffering drought. Rhubarb crowns which are lifted and split when they get large enough are less likely to flower than crowns left alone to get very mature. https://www.gardeningknowhow.com/edible/vegetables/rhubarb/rhubarb-bolting.htm
Comment: I can confirm that it is most about varieties. My rhubarb makes many flowers every years and it continues to make flowers also after cutting them. OTOH most rhubarb will never flower.


Change color of top menu bar in Unity and top menu bar in any window (application and file explorer)

Question: How can I change the color of top menu bar in Unity and top menu bar in any window (application and file explorer)?
Answer: You can use Ubuntu Tweak to change the themes of different elements instead of having a single theme for every thing.
How to install Ubuntu Tweak?

Hit Alt+Ctrl+T to open terminal and run following commands:

For Ubuntu 14.04 onwards, it's available in softxare sources, just type:

sudo apt-get install unity-tweak-tool

For older Ubntu releases:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

How to change the window theme?

Once installed, Hit Super key (Windows key) to open Unity dash and search for "ubuntu tweak" and open it.
Open the "Tweaks" tab and click on "Themes".

Hare you can change the theme of window (title bar). As you can see I've changed the window theme in this screenshot. You can change the theme of Unity panel (menu bar) by changing Gtk theme.

Where can I get themes for Ubuntu?
Hare are two exelent sources for themes.
Gnome-Look
Ubuntu-Art
Answer: click windows button and in Appearance find the theme and change default dark Ambiance theme to Radiance
Answer: I believe I have stumbled upon a more satisfactory answer to this question. I have yet to figure out how to change the window titles; however, the Unity panel color, within the Ambiance theme, can be changed using dconf-editor:
sudo apt-get install dconf-tools

Utilizing dconf-editor, navigate through "org", to "gnome", to "desktop", to "interface". Modify the entry "gtk-color-scheme" to read:
dark_bg_color:#333377

Replacing #333377 with whatever color you wish (in hexadecimal format). Then, log out and back in; the Unity bar should have changed appropriately, as have all of the menus. (If it has not, double check what you entered -- it seems that any typos cause the entire gtk-color-scheme entry to be ignored.)
I have verified this to work in Ubuntu 12.04.2, including both the 3D and now-outmoded 2D versions of Unity.
Answer: The color of the top panel bar and the launchpad background are a function of the wallpaper colors and the opacity/transparency set with Ubuntu Tweak or MyUnity. With Ubuntu Tweak select the "Tweaks" tab and then the "Unity" button. The parameters you'll want to change are "Launcher opacity:" and "Panel opacity:". Changing themes won't impact those colors. To change the label bar color you'd need to edits the image components used to create it. You could set the opacity gradient, dark bottom to light top, of the label bar before 12.04 and my upgrade from 11.10 to 12.04 carried forward my former title bar opacity. I'm not sure where access to that parameter is in 12.04.
Answer: By default, at least in 12.04, you only get a chance between dark and light (dark brown or pale cream) - these are selected in the "appearance" section of the system settings and are named "Radiance" and "Ambiance".  You may also be able to get certain accessibility modes such as "high contrast".
But you can, if you want, install different window decoration and GTK+ themes.  There are various packages available in the repositories which include metacity, GTK+, etc themes.  Using the myunity package you can then select these themes, including the ability to independently select different themes for the window titlebars and window controls.
It would be nice if there were an easier way to customise these colours without resorting to a bunch of other software, and themes of varying quality levels.  I stick with the default theme because nothing else quite looks perfect in Unity.


Trying to bleed brakes, but getting no fluid out

Question: I replaced the calipers, rotors, and pads on a 2007 Pontiac Grand Prix. I'm trying to bleed the brakes and I'm having trouble. I've got a Mityvac brake bleeder and I'm starting on the passenger side rear and I'm not drawing any fluid from the master cylinder brake reservoir. I'm wondering why. Can anyone help?
Comment: Are you getting *anything out*? I mean, is air coming out? Is the fluid level going down in your master cylinder?
Comment: This is totally something that you should be able to do on your own, especially with a Mityvac. Are you sure that you've opened the bleed nipple enough to allow fluid out and that you've got fluid in the master cylinder reservoir?
Comment: Yeah when I bleed the front driver side brake, it bled fine. Then I went to the rear driver side I can't get anything. I replace vet caliper and the other rear caliper. All I get is a steady line of bubbles nothing sporadic so I think it's just coming from around the bleeder valve. So I spread grease around the bleeder valve and cracked the bolt and it held 15 psi for probably 60 seconds and then finally started leaking air again so it's not pulling air out of the line
Comment: did you ever solve this problem?
I now have the same problem with my Mazda 3. It has two hyrdaulic circuits.. the RR ( right rear) and the LF ( left front) are on one and the LR ( left rear) and the RF ( right front ) are on the other., I was able to bleed one set the LR RF combo, but when I try the RR - LF combo there is almost no fluid coming out of either of the brake bleeder valves. I tried using a Vacuum bleeder tool and verified it hold pressure, then when I open the bleeder value I get a little more than a miniscule trickle. For the most part I may have got 1 1/2 oz of fluid from the RR
Answer: Is the car on the floor?  Many vehicles, I'm not sure if yours does for certain, feature a brake bias apportioning valve which is essentially a "tap" which opens or closes depending on the position of the rear beam axle.  If the car is heavily loaded (i.e. has people in the rear seats and a boot / trunk full of cargo), more braking force is sent to the rear wheels.
Problems can occur if you try and bleed brakes with the car jacked up and the rear wheels not touching the ground as this system can be tricked into thinking there is no load on the rear at all thus shutting off the rear brake circuit.
Another possibility is that the car needs to be plugged into a diagnostic computer to tell it that it's brakes are being bled in order to open the ABS lines.  However, as you say you bled the front without issue, I suspect the bias valve.
Comment: You could potentially jack the rear rotors to lift the rear wheels a little?
Comment: Do you suppose this could be possible with the car turned off? In the Haynes manual i have it talks about proportioning valves and how they can apply more braking pressure to the front than the rear due to the fact that the rear of the car can be lighter and not require as much breaking force.
Comment: Typically it's a spring and lever arm attached to the rear suspension physically so it is doesn't depend on the cars electrical system at all.
Comment: Steve Mattews, i have the car jacked up and blocked on all 4 corners with no wheels on so you may be onto something. It would be very difficult to bleed the breaks with the wheels on. But I suppose I could put all of the rotors on with the Lugnuts and block Under the rotors so that the suspension had weight on it and then try to Bleed It That Way. What do you think about tying this? Would this alleviate the problem with the bias valve?
Comment: Does this bias valve or proportioning valve work electronically or manually? What I mean is could it detect no weight on the rear suspension with the car being shut off??
Comment: Good call stece mattews i will try this tonight and let you know how this turns out. Thankyou so much my friend!
Comment: So I got the brakes bled last night finally. I called the Chevy dealership and spoke with a mechanic. He said it's probably because I haven't set the Pistons in the rear calipers with the emergency brake. So I push the emergency brake on and off several times open the valve and fluid started to flow. But this was after I jacked up the rear suspension has you recommended. LOL so I'm not really sure which one helped but thank you for your Insight and at the end of the day the job done and I know 2 things to try in the future! Again thank you very much
Answer: Bleeding the brakes is a 2 person job. One to open and close the valve at the caliper and another stepping on the brake pedal to force the fluid out.
Comment: Doesn't the Mityvac let you pull fluid down to the caliper?
Comment: I just bled the driver side front. It bled fine and the level in the master cylinder reservoir dropped. I went directly to the driver side rear brake. Because that's the order you're supposed to bleed the brakes in. All I could get was air. So I pumped the vacuum pump to 15 psi and smeared Greece all around the bleeder valve. When I cracked it open I didn't get any air like I had and the vacuum pressure stayed at 15. That tells me the only air I was pulling was from around the bleeder valve. Something with the ABS or the master cylinder is not allowing fluid to be pulled to the rear brake.
Comment: And yes the Mighty Vac allows you to pull fluid from the master cylinder reservoir to the brake caliper and bleed the air in that fashion. It should be working fine I just don't know why it won't allow the vacuum to pull fluid from the reservoir to the rear brakes. That's what I replaced on the car was the rear calipers brake pads and rotors
Comment: *"Bleeding brakes is a 2 person job"* - I bleed my brakes by myself - surgical tubing, bucket, gravity feed and a beer.


How should we cite scientific papers?

Question: Should we adopt a common standard of citing scientific papers or should people decide on their own whether they just add a link or cite the paper like you would cite it in a scientific paper?
Comment: Related: http://meta.skeptics.stackexchange.com/questions/3/support-for-citations
Answer: A common standard would be nice: however I see no need of enforcing it for now.
Can you spell out (in the question) how you would propose to do cites so we can start adopting it if we like?
Answer: I don't think we need formal citations, as long as we have a permanent way of referencing particular sources.
Just about all journals use the Digital Object Identifier (DOI) System. I think it's perfect for here since it provides a permanent URL to specific resources. I think that's what we should use for linking to published papers, but I also don't think it needs to be enforced.
Answer: Since this is the web, I tend to prefer links.  It's usually impractical for people to dig up articles that can't be linked to.  This post is a good example of readable, useful linking.  Note I'm not commenting on the quality of the references, just that it is useful when done in this fashion.

How should we cite scientific papers?


Why are there three stop codons but only one start codon?

Question: I was wondering whether there is any specific reason that there are three stop codons but only one start codon in prokaryotic and eukaryotic cytoplasmic mRNAs.
Comment: There are more than 1 start codon. *E. coli* have 3, for example.
Comment: Yes, I just saw that. Though in most cases AUG dominates. Thanks
Comment: @David: I guess you didn't read all of my answer. I'm waiting for you to dive into the reasons behind the varying translation efficiency of different start codons. I'm not sure the OP really wants that level of detail for a question like this.
Comment: @David: and don't forget to downvote the answers on this question: https://biology.stackexchange.com/questions/9990/why-is-aug-the-initiation-codon
Comment: @Fizz — Although not really relevant as a comment to this question, I am obliged for your pointing out another which is certain to have poor answers.
Answer: Disclaimer
It is important to realize that it is not possible to answer questions of this sort (the evolution of translation)  in anything other than a speculative manner. Please bear this in mind, especially if you find the speculation below persuasive.
Summary
It is suggested that the redundancy of termination codons is largely similar to that for 'elongation codons' decoded at the A-site of the ribosome, although protection against suppressor tRNAs may also be a factor. The consideration here is, therefore, mainly focussed on the question why there is only a single codon for methionine (initiation and elongation), and I suggest this may have been a combination of the late appearance and infrequent usage of methionine, together with the particular requirements for an initiation tRNA at the P-site of the ribosome, where standard wobble is apparently not possible.
Disposing of a Red Herring
Although alternative initiation codons are sometimes used, this usage differs in prokaryotes and eukaryotes, is very limited, and is not seen with the use of methionine in elongation. I would therefore consider this does not invalidate the question, but perhaps rephrase it as:

"Why does the genetic code have only one codon assigned to methionine,
  the initiation codon, whereas other amino acids and termination have
  generally more than one?"

Time of appearance of and extent of use of Methionine
It is generally thought that genetic code initially encoded a small number of amino acids, and that this number increased over time. Methionine is one of the most complex (and energetically expensive) to synthesize (see Wikipedia entry), so is likely to have appeared late. One can argue that most of the codons would have been 'taken' (assigned) by that time. This argument is consistent with the situation for tryptophan, the other amino acid which has only a single codon, and which is also synthetically complex. Furthermore, these are the two least abundant amino acids so on can argue that their number of codons reflects their relative usage.
Admittedly, there need only be one stop codon per protein, but it is possible that the mechanism of termination evolved before that of methionine-specific initiation. (Initiation might originally have been from the 5′-end of the mRNA.) There is also the question of protection against suppressor tRNAs, but I shall delay discussion of this until the end.
The unique features of the initiator tRNA
Elongation involves several dozen amino acyl-tRNAs being recognized by an elongation factor which binds them to the A-site of the ribosome, at which 3′-codon wobble occurs where the redundancy of the genetic code allows and the anticodon of the tRNA has evolved appropriately.
In contrast initiation involves exclusive recognition of a special tRNA by initiation factors but not elongation factors, and subsequent binding at the P-site The tRNA has unique structural features that allows it to be N-formylated — structural features that are retained in eukaryotic initiator tRNA, even though there is no transformylase in eukaryotes. (see this SE Question]
This uniqueness may explain why there is only one tRNA for initiation. However one might ask why there is a not a group of methionine codons (e.g. AUA as well as AUG) recognized by the same initiator tRNA through wobble. The reason for this would seem to be that the P-site does not allow third position wobble (as I explain in the answer to a related question), so the initiation met-tRNA would be codon-specific.
Loose Ends
Although perhaps straying a little from the question, one might still ask why there are not alternative elongation codons for Met — e.g. AUA, which could have been 'stolen' from Ile, which already has AUU and AUC. In fact in mammalian mitochondria this codon reassignment has happened, but unfortunately does not help explain things. In mitochondria there is only one tRNAmet for both these codons, consistent with the simplification of tRNAs for the small mammalian mitochondrial genome. Initiation requires the formylation of the methionine.
I will finish by returning to the question of multiple termination codons, which are not really consistent with my suggestion that the extent of redundancy reflects usage. Although termination codons, like elongation codons, are recognized at the A-site they are recognized by protein release factors rather than tRNAs. This means that they will be affected differently by a mutation in a tRNA that alters the anticodon. For an amino acid codon, an altered non-cognate tRNA would only cause some misreading and an altered cognate tRNA might be neutralized by wobble or by duplicate or redundant tRNA genes. AS termination codons are not normally decoded by tRNAs, a suppressor tRNA would cause read-through at all the suppressed codons. The presence of two alternatives means that termination would be likely to occur within about 30 codons 3′ to the original termination codon. Variation in the length of the N- and C-termini of proteins is common among related species, and thus need not be deleterious to the cell.
Related SE Questions

'Wobble' in Initiation and Elongation — I have contributed an answer to this.
Why is AUG the Initiation Codon? — I will respond to this presently.
Redundancy of the Genetic Code — I have contributed an answer to this.
Initiator and Elongator tRNAs in Translation — I have contributed an answer to this.
Comment: Since my initial post of an answer I have added a section considering the possible reasons for multiple termination codons.
Answer: The simplest answer is that redundancy has evolved into these codons. A cell would not want a mutation at the stop location and have the protein get excessively large before another stop codon is hit.
Here is a better explanation and if you are very interested in the subject, I would recommend Lehningers Principles of Biochemistry.
Lehninger, A. L., Nelson, D. L., & Cox, M. M. (2000). Lehninger principles of biochemistry. New York: Worth Publishers
Comment: it would be helpful if you expanded your answer with some of the material from the link, e.g. "In prokaryotes, E. coli is found to use AUG 83%, GUG 14%, and UUG 3% as START codons. "
Comment: But it would also not "want" a mutation in the start codon so that no protein at all was made.
Answer: Somewhat obvious, there's weaker selection on the stop codons than on the start codons:

The selection affecting stop codons is relatively weak. In particular, comparison of the strength of purifying selection to that on start codons indicates that purifying selection on UAA is slightly lower than that on GUG and UUG start codons and much weaker than purifying selection on AUG, the primary start codon.

The reasons for this difference are a bit more difficult to grasp... but even for stop codons...

UAA is the optimal stop codon based on its higher proportion in highly expressed genes

On the other hand there's drift ("switches") in the stop codons

Fast-evolving genes generally accrue more stop codon switches than slow-evolving genes, suggesting that the higher evolutionary rate involves also the stop codons.

So come back in a few billion years with the same question on the stop codons.
On the other hand it's fairly well-established that

In prokaryotes, the start codon is one of the major translation initiation determinants: replacement of AUG with an alternative start codon, such as GUG, typically leads to a several-fold drop in the translation efficiency

As for the stop codons:

The causes of the observed preference for UAA as the stop codon, particularly in highly expressed, slow-evolving genes remain unknown. One potentially plausible possibility is that UAA is less prone to formation of stable secondary structures in RNA molecules than UAG or UGA which facilitates the release factor access and is likely to be particularly relevant for highly expressed genes. Furthermore, the frequency of readthrough differs for the different stop codons and is the highest for UGA, at least, in E. coli. Because the deleterious effect of readthrough is the greatest for abundant proteins, the difference in readthrough frequencies could, in part, explain the strong preference for UAA in genes encoding such proteins.

So, in summary, the selection reason for the start codon is fairly well understood, but the reason for the observed preference for UAA as an optimal stop codon (in highly expressed genes) is more speculative, which goes hand in hand with its purifying selection not being as strong as that for the AUG start codon.
Comment: I didn't downvote this answer but your first quote is essentially a restatement of the question: It doesn't in the least provide a rationale for *why* this is. The rest of your answer is merely describing facts, again not offering reasons *why*. I actually prefer the answer you've just posted on the related question about AUG.


Is there any way to measure the amount of radiation the earth receives from the sun?

Question: My understanding is that it is difficult to measure the amount of radiation the earth receives to the sun and that due to variability in a number of different quantities such as the changing distance to the sun, the tilt of the earth, and the variable amount of radiation emitted from different parts of the sun's surface, it is not currently possible to measure solar irradiance. Is this correct?
Comment: Your understanding is incorrect. My first job out of college involved the Solar Backscatter Ultraviolet / Total Ozone Mapping System experiment on NASA's NIMBUS-7 satellite. Just down the hall, others were working on the Earth Radiation Budget experiment on the same satellite. We've been measuring the Sun's output since the late 1970s.
Comment: No, it is not correct. Solar irradiance is measured by satellite instruments (to avoid errors due to clouds, dust, &c), and has been since the 1970s.  This link has a graph, and a discussion on problems with things like reconciling measurments from different satellites: https://earthobservatory.nasa.gov/Features/VariableSun/variable2.php
Comment: Yes you can measure it.  See https://www.ngdc.noaa.gov/stp/solar/solarirrad.html
Comment: "WHICH" radiation
-infrared
-UV
-Gamma?
Since the suns output will vary by time, Satellites do the job of monitoring solar irradiance.
Answer: Your understanding is half correct. Yes, we can measure the amount of radiation the Earth receives from the Sun.
Yes, it is difficult to get an extremely precise measure of how much radiation the Earth receives from the Sun in any one time interval. But there's not really much value in such extreme precision anyway.
However, it is fairly easy to measure solar irradiance at any one place (on earth, in the atmosphere or in space); as NASA and others currently do (kudos to farrenthorpe for the link). These measurements account for the changing distance to the sun, and the tilt of the earth, and to a very large extent the variable amount of radiation emitted from different parts of the sun's surface, because the Sun's diameter is tiny compared to the distance between the Earth and the Sun (just under 1%).
And having measured solar irradiance at one or more places, it is then easy to get a fairly precise estimate of how much radiation the Earth receives from the Sun in any one time interval.
Comment: Your question does not ask **how** it is measured: but I take it from your comment that that is what you intended to ask - is that correct?
Comment: This does not answer the question because it does not describe the way in which solar irradiance of the earth is measured.


Embedded system for image processing project

Question: Is it possible to do image processing (to extract numbers and text) using a microcontroller? If not, what are the alternatives to do this task?
Comment: You should asq questions for image processing : How do we get the image in microcontroller?
How are images stored (memory size)?
How do we perform operations on them (encoding ex jpeg)?
Can we do this fast enough (Max frame rate)?
Comment: you should use a DSP with some specific functions for image processing like MAC and SIMD used for image processing and transforms function FFT, DCT...etc
Answer: Yes, image processing can be done using Microcontrollers and Microprocessors. You can either do image Processing using Arduino with OpenCV or MatLab. Or if you are more interested in Microprocessors you can use a embedded computer such as the Raspberry Pi(RPi) or Beaglebone(BB) which is more suitable for powerful image processing projects. RPi has an inbuilt GPU which is better for your applications but BBB can also be used for image Processing application considering the fact that it has a better and faster ARM processor. Since BB and RPi both run on linux you can use the most common OpenCV or simpleCV to do the task.
You can use Image Processing using BBB and OpenCV or RPi and OpenCV. OpenCV is an It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android.. I would suggest you to use OpenCV that uses C++ for BBB (C++ is faster compared to RPi and BBB doesnt have GPU so there is a chance to slow down processing) and use OpenCV that uses Python for RPi (python is much easier to code and RPi has a GPU) . I have used both RPi and BBB in the past but I would suggest you to buy a RPi for your application since its cheaper and has a huge Documentation online.
Update : There are many OCR based algorithm's available online for OpenCV but are not that reliable. I think best Open Source OCR Engine is Tesseract. You can get more idea about this from the thread Tesseract or OpenCV for OCR.
Comment: At present I am using OpenCV-python for RPi but I find it difficult to find documentation related to Text extraction techniques.I tried to implement stroke width tranform based algo in python but I got nothing. Can you suggest best algo to implement and why openCV is preferred over Scikit-image and PIL ?
Comment: I have updated the thread ,Please mark this thread as complete if this is what you were looking for. Regards. :)
Answer: It is really depending on which kind of microcontroller and peripherals we are talking about, as well of what kind of image processing. You should ask yourself following questions (and answer them of course)
1) First problem is to get the image data into the processing unit - how will it be done? Where is the data is coming from? Where is it stored?
2) How fast the processing should be?
3) Does the image have to be fully loaded to processing unit memory in order to be processed or just part of it is enough? It will lead to memory requirements
4) What are you going to do with the processed data?
In general, image processing is done on a special kind of microcontrollers/processors, called DSP (digital signal processors) that are optimized to process large arrays of digital data. So after you have answered the above questions, look into these.
Answer: Extracting numbers and text from a document is called Optical Character Recognition (OCR).  This is a fairly complex topic, and there are several approaches to performing OCR.   Although the term OCR implies using some sort of camera to image the text, more often than not the characters are "read" from an existing document, such as a Word or PDF file, a FAX, or a scanner output (which maybe an image file such as a jpeg).  So in all of these cases, the format of the file has to be taken into considerations.
In any case, there is usually a pre-processing stage, in which the characters are de-skewed (aligned so they are vertical for example), and then edge detection is performed.
If the characters are known to be created from a particular font, such as Times Roman, or from a few known fonts, pattern recognition can be used.  This is fairly easy but requires quite a bit of fixed memory (which can be in flash).  If the characters are from a variety of fonts, this becomes more difficult.  In that case feature extraction may be used instead.  The hardest challenge is if the characters are free-form handwritten.
If it is known that only numbers are being input in a particular field, this also  makes things much easier.  Likewise, a dictionary may be used to help recognize words (once again, this would require a lot of flash memory.)
Given enough memory, both flash and RAM, there is no reason a microcontroller cannot perform OCR, although it probably would not be able to do so in real-time -- it would need to be an off-line task.   In addition, a 32-bit processor is highly recommended.
OCR as mentioned above is primarily a pattern recognition task, and does not necessarily require DSP; however DSP could be useful in cleaning up the characters before OCR post-processing, such as removing noise.
Answer: Basically, no. Do it with an embedded computer such as the Raspberry Pi or Beaglebone. These are great for embedded computer vision, are very cheap, and the Beaglebone has reference schematics so you design your own system after prototyping stages are over.
Text recognition algorithms probably have many open source libraries available now, but they will all be for proper linux OS, rather than a real-time microcontroller OS. It's just much easier with a full CPU style architecture.
On the raspberry pi (using OpenCV 2/3 with Python bindings) I got 20-30 frames per second on object recognition and tracking with slightly down-sampled images from the Pi camera module.


Detection of battery status totally messed up

Question: I already posted this question in the Ubuntu forum and stackOverflow. I forward it here with the hope to find some different opinions about the problem.
I have an Acer TravelMate 5730, which is 3 y.o., running Ubuntu 10.04 LTS. One year ago I changed the battery because the old one died. Since then, everything worked like a charm.
A week ago I was using my laptop running on battery; it was charged up to 60%. Suddenly it shut down and for about 24h it was like the battery was totally broken: it didn't charge anymore and the 'upower --dump' said
<code>    state: critical.
</code>
I was kind of resigned to buy a new battery, when suddenly the orange light became green: battery was charged and actually working; strangely the battery indicator was stuck to 100%, even after 2 hours running.
I tried again with 'upower --dump' or 'acpi -b' commands and it kept saying battery is discharging, though maintaining the percentage to 100%.
Thus, battery working fine up to 3 hours, without any warning when it was almost empty, likely to result in a brute shut down.
Today something different. the 'upower --dump' command says:
<code>    ...
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    energy:              0 Wh
    energy-empty:        0 Wh
    energy-full:         65.12 Wh
    energy-full-design:  65.12 Wh
    energy-rate:         0 W
    voltage:             14.481 V
    percentage:          0%
    capacity:            100%
    technology:          lithium-ion
</code>
I tried to boot WinXP and the problem is pretty much the same, with the battery fully-charged, percentage equal to 0% and no way to fix it.
While writing, the situation has changed again:
<code>    present:             yes
    rechargeable:        yes
    state:               charging
    energy:              0 Wh
    energy-empty:        0 Wh
    energy-full:         65.12 Wh
    energy-full-design:  65.12 Wh
    energy-rate:         0 W
    voltage:             14.474 V
    percentage:          0%
    capacity:            100%
    technology:          lithium-ion
</code>
...charging, but it does not charge up. (Recall, the battery lasted 3 hours until yesterday!).
So, the big question is: is it an hardware issue, like a dedicated internal circuit is broken? or maybe it is just the battery that must be changed. Or, rather, some BIOS problem that could be fixed in some way.
I'd appreciate every help that can shed some light on this annoying problem
Answer: Well if it doesn't work in either Windows nor Ubuntu, I think it will probably be the battery that's bad or a circuit that's indeed broken. I think you should send it back to Acer.
Comment: I think guarantee has expired. I just wonted to be sure it is not some software issues which can be fixed, before buying a new battery.


Stereotype in UML

Question: What is a Stereotype in Unified modelling language?And What are the primary class stereotypes?.I need clear explanation using diagrams or real world scenario.
Comment: It's often helpful to tell us in the question what research you've done, what resources you found, and why you rejected them or why they didn't help.  Why were standard resources unhelpful or insufficient in this case?  It's great to answer your own question, but the question should be of reasonable quality too.  See also http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/, http://meta.stackexchange.com/q/183847/160917, http://meta.stackexchange.com/a/256654/160917, http://meta.stackexchange.com/a/137369/160917.
Comment: https://www.google.de/search?q=stereotype+um
Comment: Actually i searched it in google. There are some issues. There is no proper article in wikipedia for that. And  some websites define it related MVC architecture. But wikipedia define it in  another way. what is the correct one?. If MVC is the correct one, Only those (boundry,controller,model) are the stereotypes in UML?. And what are the primary class stereotypes. This was a question which i got in the  software engineering paper paper at the University.
Answer: A stereotype is a mechanism you can use to categorize your classes. You can create new stereotypes and categorize as you like
For example:

Think if you want to simply find all of the forms in the model. In
  that case you can create a stereotype called form and assign all of
  your view classes which consists with a form, this stereotype. To find your
  forms later You would just need to look for the classes with that
  stereotype.

There are three primary class stereotype in UML.

Boundry class
Entity class
control class

Boundary class
They provide the interface to a user or another System(ie. Interface to an actor)
Entity class
They are needed to perform task internal to the system, reflect a real world entity.
Control class
Serve as the glue between boundary elements and entity elements, implementing the logic required to manage the various elements and their interactions.

Stereotype in UML


Password protect Shimano Di2?

Question: I'm working on a bike with Shimano Di2 (electronic shifting with servo motors in the derailleurs), and I use the e-tube software on a laptop to configure it.
What I would like to do is be able to password protect the derailleurs setup so it is not able to be changed unless the owner wants it changed. So it's not able to be changed by someone else without the owners permission.
Comment: Really, what is your actual goal here? I know you're saying you only want to protect the firmware, but... why? If someone has physical access to the bike and malicious intent surely you have bigger problems, so you have to guard against physical access anyway, so this becomes a non-issue, right?
Comment: While it begs the question, the issue of WHY has not been addressed. Assuming this could be done (pretty big assumption), this could be used to "lock in" a purchaser to a single bike mechanic or shop. Sort of like some automotive electronic codes can only be read/changed by the dealer due to proprietary interfaces. This is a dangerous proposition.
Comment: When gold medals and world #1 placing's are concerned I would suggest anything is possible, or I would not ask!
Comment: What is the use case here?  What is not physically secure?  The laptop, the bike, or both?
Comment: It is not the physical that I would like to protect, it is the firmware or program in the components.
Comment: I would like this reposted to the correct forum as I am confident there won't be a bike mechanic able to help, is this possible?
Comment: @Danny Your confuse interface with password.  And a password can be shared.
Answer: This is an odd question. The sentiment that the only security here is physical security is correct. Think about the following:

The Shimano Di2 components are not mated/matched to a specific computer or instance of E-Tube software. So there's no 1:1 relationship.
Therefore, any computer equipped with the SM-PCE1 or SM-BCR2 programming cables can be used to modify the configuration and firmware of the Di2 componentry.
This has to be done via the junction box/charging port.
Firmware can only be downloaded from Shimano and applied through this interface. And while the application has comprehensive logging, it's unique to the computer. There's no audit trail on the devices themselves.
Since this is the case, where or when would there be an opportunity to password-protect anything? You could protect your computer, but any computer can be used. The devices are relatively dumb, and the firmware is likely overwritten during updates.
E-tube is basically used to apply firmware and manage custom settings. You can save presets and load from a configuration file, but firmware is not revved very often.

Given all of this, use common sense. You can just keep the bike secured or limit access to the bike's junction box (think low-tech, like duct-tape or hot-glue). Or you can inspect settings and check firmware revisions.
In the end, the Di2 junction box is the brain of the system. Someone with ill-intent (and physical access) could just replace the entire module in 30 seconds or so. You're seeking a technological solution to a people problem.

pix!
physical junction box and proprietary port

programming interface recognition

application and communication logging

device settings

firmware revision dialog
Comment: @bykfxa ***NO!!!***
Comment: I explained why firmware passwords are irrelevant for your use case, as well as how it can be circumvented. In the systems administration world, the physical aspect is your security. Reaching for other solutions/answers is moot because the simplest solution is *non-technical*!
Comment: Great answer and background. I think about an ill player swapping the junction box is a great point why passwords would be security theatre rather than real security
Comment: Thanks for the lengthy answer, I am a Shimano Bicycle tutor so I do know how to configure and build the bike.
Comment: My question is Can this firmware or setup be pass numbered/worded or not, a simple yes or no, then I can move on to How can it be done. You guys are so OTT.
Answer: Perhaps instead of password protecting it, you might want to think of ways you could detect that the device was tampered with. I'm not certain how often you would change settings or plug into it, but you may want to cover the port with security tape or something similar so that you are aware when somebody has been messing with the equipment. This may not be the best solution, but perhaps someone more familiar with the hardware could offer a solution to detect tampering with the hardware that would work better. Or perhaps you should just have your desired settings and firmware backed up and reload them before each ride or race.
Comment: A simple piece of steel could be made to cover the port and module, secured with a padlock - this would also prevent swapping out the module (until the lock was cut).  Obviously you'd need to protect the frame from the steel, and it's no replacement for physical security on the bike - if someone wanted to sabotage you there are many ways this could be done much more quickly (let air out of tyres, grit on chain, right up to grease on braking surfaces).
Comment: +1 for this: "Or perhaps you should just have your desired settings and firmware backed up and reload them before each ride or race."
Answer: If you have a bike with Shimano Di2, physical security should be paramount - I'm not sure why an unsavory person should even be physically near enough to the bike to be able to make  those changes. And they'd have to be carrying the right cable and everything.
It seems like a highly implausible situation to occur, and certainly which should not occur provided the bike is physically secured so someone can't connect the e-tube software to begin with.
That being said, the software is likely proprietary, so it isn't clear if that functionality could be added - you'd have to probably reverse engineer it and see if you could mod it to do that.
Answer: The edit from freiheit did change the question.  He removed the word firmware.
I am a software developer and did system support for many years.
Including highly secure systems.
In my world firmware and software are not the same.
Software is compiled - firmware is a raw set of instructions to specific hardware.
Yes it is possible to password protect firmware but it is not a common practice.
Not something you would simply add with a firmware update - there is typically hardware involved.
Firmware rarely has a password.
Even if firmware does have a password you can typically defeat it by just removing the battery.
Putting a password on a firmware is problematic at best.
Password is a point of failure.
This is device that is designed for reliability and weight.
I seriously doubt they have security / authority on the firmware.
Unless the product came with a default password that you had the option to reset the firmware does not have a password.
You must have physically access to attach the device.
Physical security does protect the firmware.
It is not something that can be changed without physical access.
If gold medals are at stake then I suggest physical security.
Really there are so many things on a bike you could sabotage.
If they got to the bike and you had a password on the firmware they would find something else to sabotage.
If someone wanted to sabotage the device the easiest hack would be to scramble the password.
If you are worried about tampering while the bike was out of your control then you should inspect all component including the e-tube.
A router is a great example of firmware and physical security.
(the answer from ewwite that firmware devices are relatively dumb is naive at best)
If you connect directly to the router you can set anything.
The assumption is that if you can touch the box you are trusted.
Gamers is the closest example to your use case.
You can password protect the BIOS (firmware) with a password.
In a money tournament the PCs will typically have BIOS passwords.
While you are on break you don't want someone to boot to a floppy and trash your system.
Comment: This is more a rant than an answer.
Comment: @whatsisname I seriously doubt they have security on the firmware is not an answer?
Comment: Thanks Blam , exactly what I wanted to know, and thanks to all other contributors.
Comment: firmware often has some form of security, it's just it's usually rubbish - not so much true security as anti tamper (one example might be before you can set write-enable you have to set magic values on a particular combination of input lines.
Comment: @CareyGregory They vote for pretty over accurate.  Question was posted by Shimano tutor and stated my answer was exactly what he wanted to know.  OP even stated the answer with the most points did not address the question.  How do you reconcile that?
Comment: @ChrisH And what does that have to do with the question or my answer?  I have never had to set a magic value.
Comment: @Blam what it has to do with your answer is the folowing quotes from you: "Yes it is possible to password protect firmware but it is not a common practice." & "Firmware rarely has a password.
Even if firmware does have a password you can typically defeat it by just removing the battery." I'm not disputing that you're right in some, even most fields but in others some form of password-like protection is common.  I've seen it on laser controllers for example - any write to the EEPROM is protected by some form of code, not even just firmware but config values (which apply to the question).
Comment: @ChrisH If you think it is a component to the question that I missed then post it as an answer.  I accepted the question as stated.
Comment: @bykfxa That set up that Martyn Ashton used for Road Bike Party used Di2.  So sorry he got hurt but that is a cool video.

Password protect Shimano Di2?


Could undiscovered smaller black holes within galaxies be an explanation for dark matter?

Question: From what I've read, given the speed of stars rotating within a galaxy and the known mass, the stars' speed is too fast to stay in orbit. Dark matter was proposed to explain this but is it possible that there are undiscovered smaller black holes with no orbiting stars?
Comment: Yes, this has been thought about a lot, the term is "machos". Well explained in the answer below.
Answer: MACHOs (massive compact halo objects) are thought to make up a portion of the dark mass and portion of these are thought to be black holes, but there are several very solid reasons why black holes not generally seen as a serious alternative explanation to non-baryonic dark matter:
1) Observed elemental abundances are not consistent with the amount of baryonic matter being produced in the early Universe to explain the dark mass
2) Microlensing searches for MACHOs of the size of black holes formed by stellar evolution rules them out as making a significant amount of dark matter in the Milky Way.
3) Black holes are observable through accretion. For black holes to make a significant amount of dark matter they would have to be in isolated locations within the galaxy so as not to be visible. However most dark matter must be distributed evenly throughout the Milk Way to explain the rotation curve.
Comment: Thanks for the detailed response! I have a couple follow up questions

2) How much of the milky way was observed for microlensing? I did a basic search for it https://en.wikipedia.org/wiki/Gravitational_microlensing and it seems like it's a very rare event because everything needs to line up properly
3) Would it be possible for there to be lots of black holes with nothing around it? Either the planets orbiting were blown away during the supernova event or most of the planets were orbiting very close during the super nova event
Comment: @AndrewPark You'd still see microlensings, and observations tell us that dark matter is everywhere.  Especially all around us and around and within this galaxy.  So it'd have to be an extraordinarly bizarre situation for the dark matter "here" to be meaningfully different from intergalactic dark matter.  Also, to rule out microscopic black holes, some astronomers showed that they would pass through stellar cores, and would induce supernovae in otherwise stable compact objects.  The more of dark matter they make up, the more obvious and detectable it becomes.  But it's neither, by observation.
Comment: I think point number 2 is the strongest evidence against MACHOs. We can statistically predict how often we should see microlensing events based on what the dark matter content must be if it is made of MACHOs and we just don't see what the math tells us we should see. So that leads us to believe MACHOs are not (a major part of) the answer.


How do I keep Clam juice

Question: I have about three gallons of clam juice, after steaming about 400 clams. How can I safely keep, can, or store this much juice for further use?
Comment: Do you have three gallons of space in your freezer?
Answer: I would suggest to reduce the juice as much es possible (to safe space later on in the freezer or shelf) and either

freeze it or
can it (see here and here for canning with a pressure cooker and here for canning with an oven)

Just putting the juice into the fridge is not sufficient. Neither just boiling the juice and filling it into a jar is sufficient because then you are not sterilizing the juice but only pasteurizing.
Comment: Canning it without a pressure canner is almost certainly unsafe - this is a low-acid food.
Comment: I was thinking of a pressure cooker, then we would also have canned clams, rather then frozen. :)
Comment: I thought canning with [weck-jars](https://en.wikipedia.org/wiki/Weck_jar) in an oven is safe since the lid is set with a rubber seal and steel tension clips which work as a valve - resulting single mini pressure cookers.
Comment: @ChingChong all canning jars are by definition airtight, or sterilization would be pointless. This doesn't turn them into pressure canners. Canning low acidity food in wecks is as unsafe as in any other jar.
Answer: I'm not much for bivalves, so I can't say that I've specifically dealt with clam juice before.  I would personally consider treating it like shrimp or crab stock ... which is basically the same as I would do for chicken stock:

Reduce it in a wide pot, to intensify the flavors and reduce the total volume to store.
Freeze it in assorted containers, based on how I'm likely to use it.

My understanding of clam juice is that it's generally has a more 'fresh' flavor to it, so it's possible that reducing it might be a problem.  If that's the case, freeze what you can fit in your freezer, then use the rest of it to make a soup, risotto, paella, or similar.
Canning might be possible, but being a meat both, it likely requires pressure canning, which most people don't have the equipment on hand for.
Comment: Thank You. A friend suggested freezing some of it in ice trays, and putting them into a bag.

How do I keep Clam juice


OCR for low resolution image of text in cursive font

Question: I have a very low resolution, almost pixelated images for processing. The characters can be recognized if zoomed in and a quick eye scan is performed with the aid of basic English grammar and vocabulary set. I have a tried many ICRs and OCRs, but none proved to be useful. Is/Are there any OCR/s that I might have possibly missed on?
P.S.The cursive font seems to be the problem.
Comment: And its color. First thing I'd try is converting it to b/w, increasing contrast, and "blowing it up" to 4+ times its size. The latter might sound strange, but for me increased recognition rate remarkably in several cases. As for the software question: What OS should it run on, and what is your price limit in case of paid products?
Comment: If you have access to a photocopier or image manipulation program, try reversing the image, e.g. make it negative (black to white and white to black). I sometimes scan in till receipts that have been printed on thermal paper which over time lose their clarity and this has helped to at least make them readable to the human eye. The font, as you say, might also be an issue
Answer: Tesseract 4.0 is probably your best bet for getting accurate results from images like that.
It's open source and is available for Linux (As well as binaries for Windows).
I suggest giving it a shot with the image resized to about 300DPI and in black and white, as per Izzy's Comment.
If the results aren't as accurate as you would like, you could always Train the Neural Network for that image so you can get a more accurate OCR for future images of that relative type.
Comment: How do I resize an image to 300 dpi?
Comment: Is there an ocr trainer that I can use?
Comment: @Dhruva To resize an image to 300DPI, just use your favorite image editor and there should be an option to scale or resize the image/canvas to a specified DPI (I use GIMP). For training the Neural Network, you'd have to look at the linked documentation and go from there (I can't help you much with that). I would only train for that specific typeface if you do not receive an accurate result from the OCR in the first place AND have more images with that same typeface that you will want to OCR later.