Why does the USA use 110V and UK use 230-240V?

Question: Why does the USA use 110V and UK use 230-240V? What are the advantages? Explain me with calculation. Why do they use different frequencies like 50Hz, 60Hz? What is the reason?
Comment: USA uses 230-240 VAC, too. The only difference is that we ground it in the center, creating "split" phases, reducing the peak voltage relative to ground and making it easier to interface low-power loads. But high-power loads (stoves, water heaters, clothes dryers, etc.) operate across the full voltage, reducing the current required.
Comment: 230 V is used in whole Europe, but only 50 Hz and not 60 Hz.
Comment: @Raggles Car hits pole and there may be 7.2kV wire on the street. Tree falls on line and here we go - little disaster. Thats kind of dumb for me. Here where I live we have 15 or 30kV lines too, but in my town - there are just few lines like this, they are far from roads, trees etc.
Comment: Can mention that not only the UK, but most (all?) countries in Europe uses 220-240V/50-60Hz.
Comment: @DaveTweed Interesting. My kitchen hobs use two 220V phases (I guess that means 440V?). Does that mean that there's no equivalent in the US market?
Comment: @WhyNotHugo: Since the phases are shifted 120°, it's actually 380V or 400V. Bringing in all three phases seems to be relatively common for heavy loads: https://en.wikipedia.org/wiki/IEC_60309
Answer: You should not be surprised that they use different voltages and frequencies, you should be surprised that there are only two big voltage/frequency standards.
When electricity was first introduced each producer provided a different voltage and frequency (or even DC instead of AC). Gradually producers merged, governments set standards, and market pressure demanded that appliances could be used everywhere. This lead to the current situation, where the pressure for a world standard is counterbalanced by the invested interests.
For the same amount of energy 110V requires more current, hence thicker wires. 230V requires better isolation. In some rare situations 220V might be more dangerous to touch.
I don't think 50 or 60 Hz makes any significant difference. (An iron core for a transformer might be a little smaller at 60 Hz. But iron cores are soooo last century...)
Comment: In some circumstances it might. In other circumstances it might mean the difference between death and death.
Comment: About safety I once did a little math and it seemed that 110V versus 230V is the difference between life and death.
Comment: @BaardKopperud - "an important concideration with old-style light-bulbs and such" - Exactly backwards, unless you consider fluorescents "old-style". A more reasonable view of "old-style" (at least as far as line frequency selection is concerned) is incandescents, and those puppies have enough thermal inertia in the filaments that there is no perceptable flicker at 50 Hz, or even at 30 Hz.
Comment: 50Hz is just above the limit of when the eye will detect flicker, an important concideration with old-style light-bulbs and such.  Can mention that for a while in some industiral towns (at least in Norway), frequence was decided by what was best for the industry - eg. melting aluminium.  So some places they used 25Hz, and you could see the lights flicker - and the required size of the transformers... (lower freq., more iron).
Comment: Yeah of course if you bite a 50V wire while your feet are deep in the water you have no chance, but if I recall it right making some "real life, common" assumptions lead to what I said.
Comment: @VladimirCravero In some situations 48V vs 110V might be the difference between life and death - if that was all it boiled down to, then we should be using 48V.
Comment: Whaat? Iron cores are last century? High power transformers in power grid are not iron core now?
Comment: The choice between 50 and 60 Hz is not nearly as simple as folks think. http://www.sos.siena.edu/~aweatherwax/electronics/60-Hz.pdf goes into more detail on the history than you might think possible. The various decisions which produced the current standards dealt with all sorts of considerations..
Comment: The old ODDA hydro station (very large) was 25 Hz. Using polewheel generators
Comment: @VladimirCravero High voltage doesn't generally kill. High amperage does.
Answer: The 110V issue is simply that once Tesla and Westinghouse proved long distance AC transmission feasible, the #1 issue driving the proliferation of electrification was lighting in houses, replacing the gas and oil lighting that was a major fire hazard of the day. Edison's lamps were 100V, but a lamp does not care if it gets AC or DC. So our AC distribution system, AT THE RESIDENTIAL LEVEL, was designed to take advantage of the existing installed base and inventory availability of Edison's lamps. Then as personal appliances began proliferating, they were designed to take advantage of the 110VAC lighting circuits already used in houses and the concept cemented itself into our culture to where there was no going back.
The 50/60Hz issue is different and is not "metric" at all (what's metric about the number 50?). Despite Westinghouse/Tesla having championed it, AC only really took off here once Edison gave in to the inevitability. Edison, despite having investing in AEG as Europe began electrifying, was reluctant to allow a system in which Europeans could enter our market by selling electrical products here. So after also experimenting with different frequencies (40Hz was the first major industrial installation, at the Folsom Power House in California), Edison and Steinmetz settled on 60Hz, partly because of the flicker issue, then also because it would make European equipment incompatible. He wanted it all to himself... which is the same motivation behind his initial push to discredit AC distribution in the first place. He wanted DC because he owned the US patent rights to his DC dynamo (even though he actually bought his first one, for proof of concept, from Werner von Siemens. Yes, THAT Siemens... Siemens had not patented it in the US). So if DC had won, we would have had Edison DC dynamos every 5 miles or so. Only the rich would be able to afford it, and they would all be paying Edison for the privilege. Tesla's egalitarianism ruined his vision.
Answer: It's hard to be definitive. But before AC power distribution was widely adopted, there was a bitter battle in the United States between Edison and Westinghouse about DC versus AC power distribution.
Edison's DC system used +110V, 0V and -110V . There was a campaign by Edison to portray AC as dangerous, even going so far as to introduce an electric chair powered by AC electricity as an execution device, thereby demonstrating the "danger of AC". Once AC was widely accepted as being superior to DC for power distribution, 110V became the standard for AC distribution presumably because it used the "safer" Voltage level of the DC system.
After metal filament lamps became feasible, 220V became common in Europe because of the lower distribution costs.
As for 50Hz versus 60Hz.. well that's just the Metric system.
Comment: 50 vs. 60Hz is actually not a metric system issue, but a choice to be able to easily multiply/divide the mains frequency into or out of clocks. 60Hz divides much easier mechanically as it has many divisors.
Comment: Could be one reason but quoting from http://www.school-for-champions.com/science/ac_world_volt_freq.htm#.U5rc3BDYPxw   "With the backing of the Westinghouse Company, Tesla's AC system became the standard in the United States. Meanwhile, the German company AEG started generating electricity and became a virtual monopoly in Europe. They decided to use 50Hz instead of 60Hz to better fit their metric standards"
Comment: Actually, the original Edison incandescent lamps were nominally 100 volts. 110 was chosen as the distribution voltage to allow for line drops (a major problem with early DC power systems such as Edison built.)
Comment: Side note: "AC was [...] superior to DC for power distribution" *at the time*, when power stations served smaller areas, copper was cheap, and you didn't have high-power electronics that could convert DC to AC and back whenever you needed to step down the voltage. (An AC transformer can sit in a cabin or on a utility pole for years with little to no maintenance; a DC motor-generator cannot.) These days, [HVDC](https://en.wikipedia.org/wiki/High-voltage_direct_current) lines are in fact deployed in some places.
Comment: Amazing how the metric system affects every little thing, from the mains frequency to the [name of hamburgers](https://www.youtube.com/watch?v=uYSt8K8VP6k).
Comment: @dim nope UK here we use Quater and Half Pounder, however, we don't get a pig and a cow confused
Comment: Your link says the same thing that you do, but what's metric about 50 Hz?  I mean, it's half of 100 Hz, but does that make it "more metric"?  (It seems kind of irrelevant unless one performs frequency doubling anyway.  Does that happen?)
Answer: The same reason we still pave roads that go around buildings that were knocked down half a century ago.
Historically someone, or some group, picked a number in each country, others followed suit, and it became "a standard". Now we are stuck with them.
Each has it's advantages and disadvantages. You can argue them forever.
Comment: There is an even more wonderful example of how such things stick and then it's too expensive to change. Eastern Japan uses a 50 Hz grid (historically built by German companies), while western Japan uses 60 Hz (American). There's no way to consolidate them now. https://www.npr.org/2011/03/24/134828205/a-country-divided-japans-electric-bottleneck
Answer: This was extensively covered in The Simpsons:

You know, Europe's no place for a six-year-old. He can handle 110 volt, but 220 would kill him.

Jokes aside, once you pick a value and produce a substantial amount of compatible devices, the price of switching to a different value becomes prohibitively high.
Answer: In the UK wiring was available nationwide in the late 1950's. The rest of europe followed shortly after the US. Because it took the UK a bit of time to catch up, they had time to learn an important thing about the previous experience with household electricity - wiring houses was expensive! They had to use a lot of wire and by doubling the voltage they reduced the current to half thus reducing the wire gauge needed.
The AC freq. is a bit better known story... Up until 1890 there was no standard for the mains freq. (obviously) AEG who had a monopoly on electricity production in Europe set the standard at 40Hz, however a bit later on they had noticed lamps flicker at that freq. so they increased it to 50Hz which was fine. Westinghouse learned about this becoming a standard but they figured the lights still flicker a bit so they increased the freq. to 60Hz. In the following years they started wiring the entire US and motors and other devices were designed for that freq. so it was not easy to change it any longer.
Comment: This is all pretty vague and unsupported. I've read that [two-thirds of UK rural dwellings were connected by 1938](http://events.history.ac.uk/event/show/6939). Some of it doesn't even make sense. For example, if the rest of Europe 'followed shortly after the US' why did they go for 220V?
Comment: @user207421 Can't say anything about Western Europe, but the Russian Empire originally used 110V in the 1880s; the Soviet Union variously used 120 or 127V ( = 220V / √3) and ultimately switched to 220V ( = 380V / √3) over several decades starting in the 1930s (presumably for efficiency reasons). That was further tweaked to 230V ( = 400V / √3) in Russia in the 2000s, although given line loss in the apartment wiring in practice you get anywhere from 225V normally to 215V on a particularly bad day.
Answer: We learnt that it was about resources. Europe had abundant iron and was short of copper, hence 50Hz. Whereas (mistakenly) America and particularly Pennsylvania, had a surplus of copper, hence 60Hz. 110v, 60Hz has 4 times distribution loss compared with 220V (power loss = I squared R) That is why American wire is so much thicker and the overhead (not underground) distribution puts on such a spectacular display when a pole mounted transformer goes up.
Also, lights flicker at twice the AC frequency, one flash on the positive half cycle and one flash on the negative half cycle, not at the supply frequency
Comment: I understand the correlation between current and losses. But the link between raw material resources and frequency choice needs more explanation.
Comment: What does it mean to mistakenly have a surplus of copper?  Do you mean that it was mistakenly *believed* that there was a surplus of copper?
Comment: Whatever voltage the home user needs, 110 or 220, shouldn't really impact the design of transmission lines beyond what actually connects the final transformer to the consumer.


Can Olive Oil REPLACE oxygenating wort

Question: Apparently, New Belgium is doing this.  Also, for a typical five gallon homebrew batch, it is said that if you DIPPED A PIN in olive oil, shook it off, it would still contain hundreds of times the necessary amounts of the compounds that yeast need during the aerobic stage of fermentation.  Does anyone have an answer of whether this works?
Comment: Can you share a link with more information about this? I'm skeptical, but I'd like to read more.
Comment: Wow. Interesting. Aeration is the most annoying part of brew day for me, so this looks like a great alternative. Thanks!
Answer: It seems that it was used at New Belgium primarily for yeast storage between brews, not fermentation.  AFAIK, New Belgium stopped doing it after a short trial (one batch of Fat Tire) when they found it led to premature staling and off flavors.  I know of only one controlled test of it on the homebrew level and the tasters in a blind triangle tasting preferred the beer made with O2 instead of OO.  The results are here..
Comment: Whitelabs recently did some experimenting at homebrew scale, theres no data on the article but, they say fermentation finished about the same. Here's the link: http://yeastbuddy.wordpress.com/2012/07/26/olive-oil-vs-aeration-experiement/
Comment: In case anyone is still reading this, I recently spoke to Grady Hull about this for inclusion in a book I'm working on.  In a nutshell, he said that it was used for yeast storage, not propagation or fermentation.  They found it produced off flavors and did not lengthen the shelf life of the beer.  They have styopped using the method.
Comment: +1 I don't care who ya are, that's a good answer right there.
Comment: you da man denny!  Also, thanks for the WL link.  If there is one person I trust for yeast, it is Chris White.
Comment: The test you link to is interesting as a starting point, but hardly conclusive. It was a very small sample size (n=12) and not super well controlled or blinded (only one batch used, colored cups were used without randomizing contents, etc.). I'd love to see an experiment like this carried out on a larger scale though!
Answer: People have used olive oil with some success, see some conversations here or here. The general consensus is that it works, but most seem to agree that there isn't much point of doing it on the pico scale unless you like to experiment.
Comment: For Jordan: http://www.haandbrygforum.dk/gallery/albums/userpics/10002/Olive-oil-thesis.pdf
Comment: I've just run out of O2, so I think an experiment is coming...

Can Olive Oil REPLACE oxygenating wort


PDOException: Incorrect decimal value for a field which is legitimately null

Question: I am creating a new composite field type that represents financial debt information. Each field consists of several sub-fields for values such as Amount owed, Interest rate, Repayment amount etc. This field is added to a content type as a multiple-instance field and users can add an unlimited number of these items.
I have built the settings forms, widgets, validators and formatters and it all works great when I fill out all the fields and submit the node. The data is written into the custom field table OK and the values persist when the node is edited again. The multi-instance field creation works as it should.
The problem is that some of the sub-fields are optional, but if they are left empty then I get a PDO error when the node is submitted:

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect decimal value: '' for column 'field_cc_repayment_amount'

repayment_amount is an optional numeric sub-field. It is declared in the .install file like this:
    'repayment_amount' => array(
       'type' => 'numeric',
       'precision' => 11,
       'scale' => 2,
       'not null' => FALSE,
    ),

When I look at the database schema in my SQL editor I can see that field_cc_repayment_amount is declared as type DECIMAL with length 11,2, the Allow Null checkbox is checked and the Default value is set to NULL.
I can run a manual SQL insert with the optional fields explicitly set to NULL and that works fine. So it doesn't seem to be an issue with the database table itself.
I can set the optional fields to have a default value of 0 which works but is really not ideal. First, I would prefer an unused value to be NULL rather than 0 since 0 is not a valid value for some of these fields - if they have a value it has to be between a preset minimum and maximum which I'm validating against, and if the value is 0 it fails validation. But if the value is NULL then it passes validation on the grounds that it is not being used at all.
Second, using 0 affects the UI for adding a new instance of the field - if all the sub-fields are blank then Drupal does not attempt to create a new field when the node is submitted. But if a default value is used then it assumes the user is submitting a new field instance and it triggers validation on all the other sub-fields making it impossible for a user to edit the node without creating a new field entry each time.
So the question seems to be: How do I allow Drupal to accept NULL values when NULL values are a valid option?
UPDATE 2011-11-28 in response to testinni
I believe the field system is handling the actual saving of the data for me. The form for the field elements is defined in hook_field_widget_form() and include definitions like this:
$element['repayment_amount'] = array(
   '#type' => 'textfield',
   '#title' => 'Repayment amount',
   '#default_value' => $values['repayment_amount'],
   '#size' => 12,
   '#maxlength' => 10,
   '#number_type' => 'integer',
   '#min' => 1,
   '#max' => 10000,
   '#field_prefix' => '$',
   '#element_validate' => array('number_field_widget_validate', 'combofield_range_validate'),
   '#weight' => 35,
) + $element_base;

where $element_base is the prepopulated $element array that gets passed into hook_field_widget_form() which has field properties like #field_name, #description, #title, and #required filled in, and is used as a base for all sub-fields.
#default_value takes on any previously set value for a saved field, and will naturally default to NULL if it doesn't exist. I have also tried making an explicit check here and supplying NULL or '' as a fallback.
The #element_validate functions work, and once these have passed there is only one more hook before Drupal saves the field: hook_field_presave(). I'm using this to round the decimal value of the main value field. I copied this (along with much of the settings and widget forms) from number.module which provides the standard Drupal numerical input field types.
So for the sake of completeness, here are hook_field_presave and hook_field_is_empty:
function combofield_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
  if ($field['type'] == 'combofield_expense' || $field['type'] == 'combofield_debt') {
    // Let PHP round the value to ensure consistent behavior across storage backends.
    foreach ($items as $delta => $item) {
      if (isset($item['value']) && isset($field['settings']['scale'])) {
        $items[$delta]['value'] = round($item['value'], $field['settings']['scale']);
      }
    }
  }
}

function combofield_field_is_empty($item, $field) {
  switch ($field['type']) {
    case 'combofield_expense':
      $empty_check = array('name', 'value');
    break;
    case 'combofield_debt':
      $empty_check = array('value', 'interest_rate');
    break;
    case 'combofield_goal':
      $empty_check = array('name', 'date');
    break;
  }

  if ($empty_check) {
    foreach ($empty_check as $subfield) {
      if (!empty($item[$subfield])) return FALSE;
    }
    return TRUE;
  }
  return FALSE;
}

I wonder if I have to catch the submitted results in hook_field_presave and convert any empty strings to NULLs? I'll give that a go and report back.
Answer: Can you post the code you use to fill-out the values of your columns ?
I suspect you're passing '' (empty string) which, for MySQL, is different from NULL and is incompatible with the numeric format you set up for your column.
Comment: I've updated my post above due to the limitations of comment sizes.
Comment: Yep, that was it. I had to loop over all the values in `hook_field_presave()` and convert all the empty strings to NULLs. Odd that the Field API doesn't do that as a matter of course.
Comment: Great, I'm pretty sure Field API doesn't change this because it's a database option to have empty strings in your columns.
Comment: Sorry, I know this is rather old now, but are you saying there is another database option I should be using other than 'not null' => FALSE to allow a column to be empty? All saved form values are strings by nature - how can you submit an empty or null value other than the empty string?
Answer: I had to loop over all the values in hook_field_presave() and convert all the empty strings to NULLs.
Odd that the Field API doesn't do that as a matter of course.
@Scott
Answer: I had to loop over all the values in hook_field_presave() and convert all the empty strings to NULLs.
Odd that the Field API doesn't do that as a matter of course.


Removing External site content from search index in SP2013

Question: I have crawled external site https://some.com in sharepoint 2013. Now how to delete or remove this external site content from the index.
Can we do it using crawl rules ?
Comment: Please clarify that how you have crawled the content. Did you create as separate content source?? If yes you can delete the content source.. Or you can create crawl rule to exclude the contents and start full crawl.
Answer: Here is the process to remove an item from Search index.
If you dont want that site in search then remove the url from the content source.
Remove an item from the search index

Verify that the user account that is performing this procedure is an
administrator for the Search service application.
On the SharePoint Central Administration home page, in the
Application Management section, click Manage service applications.
On the Manage Search Applications page, click the Search service
application.
On the Search Administration page, in the Diagnostics section, click
Crawl Log.
On the Crawl Log page, click URL View.
Do one of the following:

If you know the URL of the item that you want to remove, type the URL in the box.
If you do not know the URL of the item that you want to remove, search for it by using the filters Content Source, Status or Message.

Click Search.
Find and point to the URL of the item that you want to remove, click
the arrow and then click Remove the item from the Index.
In the confirmation dialog that appears, click OK to confirm that you
want to remove the item from the index.
Verification: the text Removed from the search index by Admin appears
under the URL in the crawl log.
Comment: It's not about individual URL, they can exclude from crawl rule or delete the entire content source.


Is $H^1(M) \subset L^2(M) \subset H^{-1}(M)$ a Hilbert triple for $M$ a manifold with boundary?

Question: Is $H^1(M) \subset L^2(M)  \subset H^{-1}(M)$ a Hilbert triple for $M$ a manifold with boundary? What smoothness is required of the boundary? I would be grateful for some references to this.
Answer: I think a sufficient condition is that (it is highly probable this is not necessary): Whenever the smoothness of $\partial M$ supports a Poincaré type inequality:
$$
\|u\|_{L^2(M)}\leq c\|\nabla u\|_{L^2(M)},
$$
then the Hilbert triple
$$
H^1(M)/\mathbb{R}\subset L^2(M) \subset H^{-1}(M),\quad \text{ or }\quad H^1_0(M)\subset L^2_0(M) \subset H^{-1}(M)
$$
holds.
The first inclusion is dense due to the fact that $C^{\infty}$ is dense in $L^2$.
Second inclusion holds if Poincaré inequality on this manifold holds for $H^1(M)$: for $\phi\in L^2(M)$
$$
L_{\phi}(u) := \int_M \phi u \leq \|\phi\|_{L^2(M)}\|u\|_{L^2(M)} \leq c\|\phi\|_{L^2(M)}\|\nabla u\|_{L^2(M)},
$$
thus $\phi\in H^{-1}(M)$.
I checked Evans's PDE book, the proof of Poincaré inequality relies on Rellich–Kondrachov compact embedding theorem, which normally assumes the boundary is Lipschitz. In Sobolev met Poincaré, the assumption is weakened to twisted cone condition for a domain (see 9.2), I am guessing this condition should be able to be extended to a compact manifold.
Comment: Thanks for the answer. Is the first inclusion really trivial? Is it obvious that the inclusion is dense?
Comment: @maximumtag $C^{\infty}$ is dense in $L^p$. :)
Comment: I know that's true for the standard open bounded set case but was unsure in the hypersurface case. I guess I should not worry too much :P
Comment: @maximumtag The density result definitely holds for smooth and compact manifold with a boundary, for it looks like $\mathbb{R}^n$ locally. But it is not trivial though, roughly the proof should be: $u = \sum_{i} \phi_i u$, where $\{\phi_i\}$ are a partition of unity, also $\phi_i$ has support within an open neighborhood so that we can fix a chart on this, then we can initiate the standard density in $\mathbb{R}^n$. The existence of this partition of unity relies on compactness I believe.
Comment: Thank you.  Presumably smoothness of the manifold can be weakened.  Any idea where to find a proof of this result? I guess one is expected to just patch it together like you said.
Comment: @maximumtag I believe Hebey's notes Sobolev Spaces on Riemannian Manifolds should have addressed the density problem, I will check the library tomorrow.


How can the MSE of predictions be greater than the variance of the response variable?

Question: I saw an example on a blog where a k nearest neighbors algorithm was run to predict responses on a test data set.The MSE(mean squared error) of the predictions was larger than the variance of the response variable in the test set. Shouldn't the MSE always be less than the variance of the response variable as SSTO(total sum of squares) = RSS(model sum of squares) + SSE(error sum of squares).
Comment: Your question is full of acronyms, please state what's MSE, SSTO, RSS, and SSE, so everyone can understand it, and perhaps it might increase its visibility.
Comment: In linear regression this makes sense on training data only.
Comment: To the question, I don't even see the reason why *test* mean-squared-error would have to be lesser than *training* data response variance.
Comment: Okay, but it doesn't change anything. I still can't grasp the premise of this question, why would test MSE have to be smaller than variance?
Comment: @Firebug I am comparing the test mean square error with test data response variance
Answer: Case 1:
SST (total) = RSS (model) + SSE (error)
This is only true in general if the model includes an intercept (and, in relation to case 3, if the mean of the errors is 0).
(more precisely, you do not need an explicit intercept, for instance for linear regression it is sufficient that the intercept is in the column space of the regressors)
See for instance the following y=bx fit:

Clearly the error is much larger than the total variance in the data.

Case 2:
Other issues may be when you are comparing training vs test, but it is unclear whether this is the case in this question. (there is an explicit 'in the test set' mentioned, but is this the same for all terms?)
(see for instance https://stats.stackexchange.com/a/299523/164061 and the four other links in that post)
Case 3:
In the test set a similar effect may occur as with the lack of the intercept. If the model (which you fitted to the training set, and not to the test set) is not a good fit for the test set, then you may get a larger error than the total variance. (this is what Firebug meant with, 'makes sense to the training data only)
This bad fitting, for which the SSE becomes larger than the SST, is especially likely when you are over-fitting.
Case 4:
If you are fitting a Bayesian model, or some model that has bias (e.g. regularisation) then there is no guarantee that SST (total) > RSS (model).
Answer: The MSE is defined as $MSE = N^{-1} \sum_{i=1}^N (y_i - \hat{y}_i)^2$, where $\hat{y}_i$ is the fitted, or predicted, value.
The variance is $V = N^{-1} \sum_{i=1}^N (y_i - \bar{y})^2$, where $
\bar{y} = \sum_{i=1}^N y_i$.
It is true that in most cases, MSE will tend to be smaller than $V$, but it depends inherently on how the model fits the values $\hat{y}_i$ to the data. Given that there is some noise and some signal in the data, it will often be the case that the MSE is smaller, but not always.
Comment: I understand that the MSR and MSE and be different but since the MSR + MSE = MST shouldn't the variance always be larger?
Comment: I totally see where the confusion is coming form and I agree with you. But what are MSR and MST? I guess that one of those must be a definition term (the remainder), which must therefore be what can become negative. Perhaps your intuition comes from the linear regression case?
Comment: @Superproner. Yes my intuition comes from linear regression. Please see this link: https://onlinecourses.science.psu.edu/stat501/node/266. MSR is "regression mean square (MSR)" and MST is the mean total sum of squares. Isn't this applicable for any model. Total variance = explained variance + unexplained variance so unexplained variance cannot be greater than total variance
Comment: I believe that for the linear regression, it is a result (as you say). But for other models, it need not hold.
Comment: Is there an intuitive explanation for this?
Comment: As I understand it, you are decomposing the variance in $y$, which is essentially $d(y,\bar{y}) = || y - \bar{y}||$, into a distance between $y$ and $\hat{y}$ and a distance between $\hat{y}$ and $\bar{y}$. By the triangle inequality, we know that the difference between two vectors is not greater than the distance where we insert a third point. So $d(y,\bar{y}) \le d(y,\hat{y}) + d(\hat{y},\bar{y})$. And sometimes we have equality here (as for OLS) but not always.


Choosing Restore Date in Carbon Copy Cloner

Question: Using CCC, how do I restore my El Capitan OS system to a date of several days ago.  I installed a flakey app. and I want to essentially backdate my system to before I installed it.  Everything I can find re restoring with CCC seems to restore to the last backup.  I don't want that; I want to restore to an earlier date.  Thanks.
Answer: There actually are no earlier dates. CCC creates snapshots/clone images of your hard drive, it doesn't create versions.
Comment: Marc: Interesting info, but no help.  How do I restore my Mac to its configuration other than the last backup done by CCC?
Comment: In order to restore to an earlier date, you have to have an earlier backup.  If you do not have one, you can reinstall the OS from OS X Recovery.  See https://support.apple.com/en-us/HT201314


How do packets flow in a Fortigate HA cluster during fail-over?

Question: How does a Fortigate unit in HA cluster prevent a switch from sending packets to the failed unit ?
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: The new primary unit interfaces have different physical connections than the failed primary unit. Both the failed and the new primary unit interfaces are connected to the same switches, but the new primary unit interfaces are connected to different ports on these switches. To make sure that the switches send packets to the new primary unit, the new primary unit interfaces send gratuitous ARP packets to the connected switches. These gratuitous ARP packets notify the switches that the primary unit MAC and IP addresses are on different switch ports and cause the switches to send packets to the ports connected to the new primary unit. In this way, the new primary unit continues to receive packets that would otherwise have been sent to the failed primary unit.


Why isn't there an article before "train" in "And you know I hate train rides the most?"?

Question:
And you know I hate train rides the most?

I see that "train" is a noun. Why isn't there an article before it, as in:

And you know I hate the/a train rides the most?"
Answer: The complete noun phrase is "train rides." So your question is ultimately about the use of articles with rides.

We do not use "a" with a plural noun.

We do not use "the" with the first mention of a plural noun.

If a noun refers to a plurality of things that can be understood from context, then you may use "the." Example:

Climate change threatens the oceans.

"The oceans" is commonly understood to mean "all of the oceans." But that is not the case in your sentence. You are referring to an unspecified, abstract group of train rides.
The following creates a context in which "the train rides" is appropriate:

When I was in Europe, I sometimes travelled by bus and other times by train. The train rides were terrible.

Having already referred to my travels by train, when I mention my train rides again, I may use "the." The context has specified which train rides I mean.
Answer: "Train" is a noun, but it's not the noun.
We're talking about rides on trains -- and "trains" is plural in that phrasing.   The reason that it isn't plural in the phrase "train rides" is that it is attributive.   It's job in that phrase is a role that's more typically filled by adjectives.
In other languages, adjectives have declensions.   They have forms that mark number and case.   This isn't true in English.   Nouns have forms that mark number (and a case, if we count the genitive 's) but adjectives can only mark grammatical number denotatively.   It's part of the adjective's definition and meaning, or it's just not part of the adjective at all.
An attributive noun, like the "train" in "train rides", is enough like an adjective that it doesn't mark number or case, either.   We use the singular form even when it represents a plural idea.   Choice of article (including the choice of a null article) depends on grammatical number, so such a choice doesn't exist here.
"Rides" is the noun.
For this noun phrase in this context, the null article is the correct choice.   The noun is plural, and it's meaning in context is much closer to "any train rides" than it is to "the distinctly specified train rides".   The indefinite article is not appropriate because the noun is not countably singular.   The definite article is not appropriate because the reference itself is indefinite.
In the phrase "train rides", no article for "train" is even in question, and the article for "rides" is the indefinite plural null article.   "Train rides" is a complete and coherent noun phrase.


Pasteurize egg yolks?

Question: I want to make a cake filling consisting of sweetened condensed milk and lemon juice so I thought of adding egg yolks to make it more dense, but the condensed milk and lemon juice doesn't need cooking then should I cook them over a double boiler? if so, up to what temperature? Or there is other way in my case?
Answer: I would look for a lemon custard recipe as that's pretty much what you want to do...

Pasteurize egg yolks?


What does "featured event" mean?

Question: I read this phrase "featured event" in the websites of some universities. I know the word "feature", but I cannot figure out the meaning of the juxtaposition. Could you please give me some synonyms for "featured event"?
Comment: In case you might forget, *feature* can be used as either a noun and a verb.
Comment: So "featured event" means simply "event made emphasized"?
Comment: You can understand it that way. A more straightforward way is "an/the event that is featured".
Comment: Ah much appreciated~
Answer: "Featured" is the modifying the Event. Namly it is the Main event and is telling the reader this will be the primary event to see or attend.

What does "featured event" mean?


Applications of non-Hausdorff spaces

Question: Mostly the topological spaces are considered Hausdorff while working in topology and geometry. I came to know about the uses of non-Hausdorff spaces in algebraic geometry (However I don't know How!). Can someone give me some idea of applications of non-Hausdorff spaces?
Comment: The spectrum of a ring, given the Zariski topology, is almost never Hausdorff, and these spectra are of great importance in (modern) algebraic geometry.
Comment: What do you mean by applications. If you don't mind could please give some examples of applications of Hausdorff spaces!
Comment: I've been assured that finite topological spaces have many applications, and any finite topological space that is not discrete is not Hausdorff (it is not even $T_1$).
Comment: @Alex can you please tell me about some applications of finite non-hausdorff topological spaces?
Answer: A very natural class of examples are the orbit spaces of any non-free continuous group actions. These spaces are good to study, because they show the underlying structure of the action.
For example, look at the height function on $S^1$, and the gradient flow $\phi$. Put an equivalence relation on $S^1$, $x\cong y$ if there exists $t\in \mathbb{R}$ such that $\phi_t(x)=y$ (that is, you can reach one point by the other following the flow). The space $S^1/\cong$ consists of $4$ points, two points corresponding to the equilibria, and two points corresponding to the connecting orbits. The topology on this space is non-Hausdorff. It is a good idea to work out all the open sets in this example by hand. If you need help with this, please don't hesitate to ask.
Answer: An example of something useful that very rarely is Hausdorff is the espace étalé in sheaf theory. Sheaf theory has applications to algebraic geometry, algebraic topology and even engineering!

Applications of non-Hausdorff spaces


Can't copy from hfs+ external

Question: I've spent days and days trying to figure this out, but still can't. I think I've read every article on this and tried all there is to try, and I still can't copy any file from my mac-formatted hfs+ external drive. Sorry if there's still an article I've missed..
I have disabled journaling and tried all the hfsprogs commands I could find, but still
whenever I click on a folder on the external and try to copy it to my home directory, I get this: "The folder xxx cannot be handled because you don't have permission to read its content."  I then found an article about inoring this by copying files through the Terminal. When trying to run the sudo cp -r command in the Terminal with my external drive path, I always get 'no such file or directory'..
Does anyone have another suggestion for me?
Thanks in advance!
Answer: I had come across a similar issue when an old imac ppc g5 logic board went on me. I had alot of data on that hard drive that I had lost access to so I pulled the hard drive out and hooked it up to a hdd external case. When I tried to copy files from it to my Ubuntu box I got a permissions error. I tried alot of different things to rectify but to no avail. Alas..   The following should get you out of the woods.
open up terminal and type:
sudo nautilus

Using the GUI window that opens. Navigate to the directory where your files are located and copy the files you want then using the same nautilus GUI window navigate to the directory they are to be copied to and paste to that directory. Rinse & repeat.
Answer: bindfs is the answer. It will take an already mounted file system and provide a view of it with whichever uid you'd like:
sudo apt-get install bindfs
mkdir ~/myUIDdiskFoo
sudo bindfs -u $(id -u) -g $(id -g) /media/diskFoo ~/myUIDdiskFoo

Comment: This Didn't work
Answer: I know that several months passed since you asked this, but I just accomplish did it successfully and I'll post here for others. Besides turn off journaling first at all, it is capital equalize the UID and GUI; in MacOs your user is 501/20 and on Ubuntu 1001/99 or higher.
Be careful, because you must let Ubuntu show user ID < 1000 - explained below - or in your next boot your user will not appear!
The complete guide are in this 2 links:
Multiplataform guide, including MacOs, Linux and Windows
By default, the first user in OS X has a UID of 501, but you can double check this by going into System Preferences in OS X, right-clicking on your user, and hitting Advanced Options. If your User ID is something different from 501, replace 501 with your other UID in the terminal commands below.
Boot into Linux (we're using Ubuntu in this example) and fire up the Terminal. First, we're going to add a temporary user, since we don't want to edit a user that we're currently logged into. So, run the following commands in the Terminal, hitting Enter after each one:
sudo useradd -d /home/tempuser -m -s /bin/bash -G admin tempuser

sudo passwd tempuser

Type in a new password for the temporary user when prompted. Reboot and log in as tempuser. Then, open up the Terminal and type in the following commands, once again hitting enter after each one (and replacing yourusername with your Linux user's username):
sudo usermod --uid 501 yourusername

sudo chown -R 501:yourusername /home/yourusername

This will change your Linux user's UID to 501 and fix your home folder permissions so that you still own them. Now, you should be able to read and write to both your Mac and Linux user's home folder, no matter what OS you're logged into.
You may also want to fix your login screen, since by default Ubuntu won't list users with a UID of less than 1000. To do this, just open a Terminal and run
    gksudo gedit /etc/login.defs
and search for UID_MIN in the text file. Change that value from 1000 to 501, and when you reboot your user will be listed in the login screen.
Go to the post from the user Frobber
To access OSX partitions from the Linux side, the UID and GID must match the OSX UID and GID. During OSX install, the first user and OSX administrator is assigned UID 501 and GID 20. When a Linux system is installed, the user IDs start at 1000.
We can change our user IDs to match the IDs for the MacOS from the Linux side.
To verify our UID and GID on the Mac side, login, open a terminal and Type – id. The response will display the required information.
The UID and GID cannot be changed for a user that is logged in.
With Ubuntu we need to create a 'Temp' user with administrative privileges, and perform the procedure while logged in as the 'Temp'. The 'Temp' user will use sudo -i to change to root user.
The following procedure is written for a system that has 'Root' user capabilities, and nano is the editor..
Note: All we are doing is changing the ID numbers and nothing else.
1.At the login screen, Key – control+alt+F1. Observe that we have entered console mode.
2.Log in as root, or the Temp user.
Edit the file /etc/login.defs. Type:
nano /etc/login.defs

Find the value UID_MIN. Change it from 1000 to 501.
Find the value GID_MIN and change it to 501.
Save the file and exit.
Key – control+x. Key – y. Press – return.
Edit the file /etc/group. Type –
nano /etc/group

Find the line that displays dialout:20username); change the value 20 to be 99.
Find the line that displays (username):1000: and change it to (username):20:
Save the file and exit.
Key – ctrl-x to exit nano. Key – y. Press – return.
Edit the file /etc/passwd. Type:
nano /etc/passwd

Find the line that displays (username):1000:1000real name),,,,/home/(username):/bin/bash and change it to be (username):501:20real name),,,,/home/(username):/bin/bash
Save the file and exit.
Key – control+x to exit nano. Key – y. Press – return.
Change file permissions of the home folder. Type:
cd /home
chown -R 501:20 (username)

Exit console mode.
Key – control+alt+F7
Reboot.
If this did not work and you received a message stating that one of the files could not be changed, it is likely that you are still logged in as (username) somewhere on the system. Try rebooting and logging as temp at the Login Screen.
Comment: Ideally you should include the relevant parts from the links you provided in the answer and cite the links as your source. Thank you!
Comment: Ok. I thought that copy the text even if source is cited were a not good practice.
Comment: OK. I'll do it.

Can't copy from hfs+ external


When is the right time to do a scholar-only run?

Question: I've seen people win In The Year Of The Dragon by ignoring the disasters, taking the losses, and simply taking as many scholars as possible to build victory points almost exclusively via the scholar action. How successful is this strategy? Does the layout of disasters matter for this? Are there any other related strategies, such as almost-all-scholars-plus-something-else?
Answer: You can't stand all disaster you need to at least protect your scholars.So you always need other people that you sacrifice for the disaster effect.
But if a lot of disaster are in the beginning of the year this can be possible. Also you need to play against beginner player as experienced players will block you or do more point than you , by having more room than you.
Getting the geisha soon is also a plus for this strategy.
I've already see someone win by this strategy but more often they will fail. In my opinion you need to mix other source point to achieve victory.
Comment: The only disasters you really need to prepare for are famine and plague; all other disasters will only make you dismiss one person. (The Tribute "disaster" can make you dismiss 4 people, but since you can always get up to 3 coins, it's really just going to make you miss one action to get the coin.)


E-reader that syncs progress across Linux and Android?

Question: I've found some e-readers that support Linux and Android such as FBReader, but are there any that can sync progress across the two?
Comment: I would find it hard to imagine that any two reading systems would be capable of sharing syncs. That sounds like something which is done within  the same app across platforms. There would need to be a separate framework independent of apps to do this, and I don't see this happening anytime soon (linux or no linux).
Answer: There's a way, but it's kinda tricky.
There's a bunch of android apps which sync the progress across the devices (like Moon+ Reader). So, if you can set up an Android emulator on your Linux machine, that should do the trick.
Answer: FBReader supports this feature. They call it "book network".
It synchronizes reading progress and ebook files via Google Drive.

On the Android device, go to Settings -> Synchronization and enable it.
On Linux, install fresh FBReader (version 2.0.3 from sudo snap install fbreader worked for me but not the old one from the apt repo). Press the cloud icon, and everything seems to work afterwards.

Official tutorials: https://books.fbreader.org/tutorials.html.
FBReader is also available for iOS, MacOS, and Windows. While it was previously open source, now the snap packages a proprietary new version.


Multiple fight triggers on one creature

Question: So with Tolsimir, Friend to Wolves forcing entering wolves to fight, if I make 4 2/2 wolf tokens and send all at an 8/8 I know they won't all fight it at once. But would the 8/8 still die? Was wanting to use him as my commander but I might have to switch for the other version for my token tribal.
Answer: Yes, if 4 2/2 creatures fight a single 8/8 creature, they will all die.
The "fight" keyword is defined in rule 701.12a:

A spell or ability may instruct a creature to fight another creature or it may instruct two creatures to fight each other. Each of those creatures deals damage equal to its power to the other creature.

So, in this situation, here's what happens:

4 2/2 wolf creature tokens are created. Tolsimir's ability triggers 4 times.
The first triggered ability resolves, and one wolf fights the 8/8. The wolf deals 2 damage to the 8/8 and the 8/8 deals 8 damage to the wolf. The 8/8 now has 2 damage marked on it, and the wolf dies.
The second triggered ability resolves, and there is another fight. The 8/8 now has 4 damage marked on it, and another wolf dies.
The third triggered ability resolves, and there is another fight. The 8/8 now has 6 damage marked on it, and another wolf dies.
The fourth triggered ability resolves, and there is another fight. The 8/8 now has 8 damage marked on it, so it dies, and the last wolf also dies.
Comment: Note that the 8/8 is doing the full 8 damage each time - if it had lifelink they would gain 32 life.  You say this, but I wanted to repeat it
Comment: @ArcanistLupus "In response to your fourth fight trigger being put onto the stack I cast Blessed Defiance. Thanks for the 40 life and the 1/1 spirit token."
Comment: @nick012000 Mortal's Ardor might be better, only gain 36 life, but 8/8 survives.
Answer: Damage stays on a creature; you don't need to deal damage all at once for a creature to die. That probably is the main question you're asking, so the answer to your question is "yes, the 8/8 dies", with the rest of my answer just being details/special cases.
Each time one of the 2/2 fights the 8/8, the 2/2 has 2 damage to apply. So unless the damage is prevented, that's 8 damage, and unless the 8/8 has Indestructible, having damage equal or greater than its toughness would cause it to die. AFAIK, the only way to remove damage is the cleanup step at the end of turn, Regeneration, and a permanent leaving the battlefield. Also, while you can't mark damage on a non-creature permanent[1], if you deal damage to a permanent while it's a creature, and it later turns into a non-creature, the damage will remain marked, and if it turns back into a creature with damage greater than or equal to its toughness, it dies.
There is the further complication that players gain priority between the resolution of each trigger, so if the controller of the 8/8 has some way of removing damage, countering abilities, and/or increasing its toughness at instant speed, they can keep it from dying. Also, if they flicker the creature, then when it enters the battlefield, it will do so as a new object, so all the remaining triggers will fizzle.
For the most part, any response your opponent can do between the triggers they could also do before any of them resolve (for instance, if you were targeting a creature with a toughness of only 2, they could put four regeneration shields on it before any of the triggers resolve, and the creature would survive), but there are edge cases, such as things triggering off of creature deaths, where it matters. For instance, if your opponent has Inheritance, then when the first token dies, they can pay 3 and draw a card, and then they can cast that card before the second fight trigger resolves (assuming the card is an instant, has flash, etc.).
[1]You can deal damage to a planeswalker, but unless that planeswalker is also a creature, this will cause the planeswalker to lose loyalty counters, but won't cause damage to be marked on it.
Comment: While it's true that damage marked on a creature remains if it stops being a creature, the damage on a noncreature permanent will still be removed at cleanup.

Multiple fight triggers on one creature


How to derive a function to approximate $\sqrt{3}$?

Question: The problem is to used fixed-point iteration method to find an approximation to $\sqrt{3}$. The equation from the book is $f(x) = \dfrac{1}{2}\left(x + \dfrac{3}{x}\right)$. It make senses to me however I realize there are other equations can be used to approximate $\sqrt{3}$ as well, for example $f(x) = 2x - \sqrt{3}$.
What I don't understand is based on what condition they came up with that equation? Is there a general approach to find a function to approximate a constant? Thank you.
Answer: The reason that the iteration $x\leftarrow \tfrac{1}{2}(x+3/x)$ converges so rapidly to $\sqrt{3}$ is because it is derived from Newton's method. Newton's method says that to find a root of a function $f(x)$, we pick a starting point and repeat the iteration
$$x \leftarrow x - \frac{f(x)}{f'(x)}$$
until we have achieved our desired accuracy. As long as certain conditions on $f$ are satisfied (its derivative doesn't vanish, for example) and our initial guess is close enough to the root, this will always converge to the correct answer, and moreover it exhibits quadratic convergence, which means that you approximately double the number of decimal places of accuracy after each step of the iteration.
To approximate the square root of a number $c$, we need a function whose root is the square root of $c$. A simple choice is
$$f(x) = x^2 - c$$
The Newton iteration which finds the root of this equation is
$$x \leftarrow x - \frac{x^2 - c}{2x}$$
which you can rearrange to give
$$x \leftarrow \frac{1}{2} \left( x + \frac{c}{x}\right)$$
which, if you take $c=3$, is exactly the iteration you asked about in your question.
Answer: Your suggestion to rely on the iteration of the function $f$ defined by $f(x)=2x-\sqrt3$ to compute $\sqrt3$ is not used in practice for at least two reasons. First it presupposes one is able to compute $\sqrt3$, in which case the approximation procedure is useless. Second, $\sqrt3$ is not an attractive point of $f$. This means that for every $x_0\ne\sqrt3$, the sequence $(x_n)$ defined recursively by $x_{n+1}=f(x_n)$ will not converge to $\sqrt3$, and in fact, in the present case $x_n\to+\infty$ or $x_n\to-\infty$ depending on whether $x_0>\sqrt3$ or $x_0<\sqrt3$.
By contrast, using $f(x)=\frac12\left(x+\frac3x\right)$ and starting, for example, from a positive rational $x_0$ produces a sequence $(x_n)$ of rational numbers whose computation does not require to know the value of $\sqrt3$ and which converges to $\sqrt3$. Additionally $(x_n)$ converges to $\sqrt3$ extremely fast since after a while, one step of the algorithm replaces the error by roughly its square, thus the rate of convergence is quadratic, in the sense that $x_{n+1}-\sqrt3$ is of the order of $(x_n-\sqrt3)^2$.
If you try to simulate the 20 first terms for $x_0=1$, for example, you will observe this spectacular speed of convergence which roughly says that each new iteration doubles up the number of significant digits of the approximant.
Comment: Many thanks. I understand it now. In fact I tried to use my function and it did not converge like you said! Another thing I want to ask you, is there a method to check if the given function is converge? Something like your above reasoning.
Comment: Yes: stability of an interval by $f$ and $|f'|\leqslant k$ with $k<1$. This is what the theorem in [your other question](http://math.stackexchange.com/q/69472/6179) says.
Comment: "one step of the algorithm replaces the error by roughly its square, thus the rate of convergence is super-exponential." - you probably intended to say "the rate of convergence is *[quadratic](http://en.wikipedia.org/wiki/Rate_of_convergence#Basic_definition)*"...
Comment: Another reason for using $\frac{1}{2}(x + 3/x)$ is that, it is so that the absolute minima of the function is exactly at $\sqrt{3}$.\\ This again makes iteration converge very rappidly (actually the number of accurate digits double for each iteration)
Comment: @N3buchadnezzar: "Another"?
Answer:
Is there a general approach to find a function to approximate a constant?

For the square root case, sure. Bahman Kalantari has found a "basic family" of iteration functions for finding $\sqrt c$. They take the form
$$x_{k+1}=x_k-(x^2-c)\frac{\Delta_{m-2}(x_k)}{\Delta_{m-1}(x_k)}$$
where
$$\Delta_m(x)=\begin{vmatrix}2x&1&&\\x^2-c&\ddots&\ddots&\\&\ddots&&1\\&&x^2-c&2x\end{vmatrix}$$
is an $m\times m$ tridiagonal Toeplitz determinant, and $\Delta_0(x)=1$. $m$ here is the order of convergence of the iteration formula. $m=2$ for instance is the usual Newton-Raphson iteration (quadratic convergence), and $m=3$ is the Halley iteration (cubic convergence).
(Allow me two asides. First, one can evaluate $\Delta_m$ through a three-term recursion relation. Second, through a special property of Toeplitz determinants, it turns out that $\Delta_m(x)$ admits a (not too practical in this case) closed form: $\Delta_m(x)=(x^2-c)^{m/2}U_m\left(\dfrac{x}{\sqrt{x^2-c}}\right)$, where $U_m(x)$ is the Chebyshev polynomial of the second kind.)
Here are the first few members of the "basic family":
$$\begin{array}{c|l}m&\\\hline 2&x-\frac{x^2-c}{2x}\\3&x-(x^2-c)\frac{2x}{3x^2+c}\\4&x-(x^2-c)\frac{(3x^2+c)}{4x(x^2+c)}\\5&x-(x^2-c)\frac{4x(x^2+c)}{5x^4+10cx^2+c^2}\end{array}$$
See Kalantari's paper for the general formula when the function $x^2-c$ is replaced by some other function $f(x)$ whose root is sought.

This looks all rather theoretical and unwieldy, you might say. I'll put in a few Mathematica demonstrations for the first few members of the "basic family".
Here's the definition for $\Delta_n(x)$ (here called d[n]):
d[0] = 1;
d[1] = 2 x;
d[n_Integer] := Det[SparseArray[{Band[{2, 1}] -> x^2 - c,
  Band[{1, 1}] -> 2x, Band[{1, 2}] -> 1}, {n, n}]]

Generate the first few members of the "basic family":
Table[x - (x^2 - c) Simplify[d[n]/d[n + 1]], {n, 0, 4}]

{x - (-c + x^2)/(2*x), x - (2*x*(-c + x^2))/(c + 3*x^2),
 x - ((-c + x^2)*(c + 3*x^2))/(4*c*x + 4*x^3),
 x - (4*x*(-c + x^2)*(c + x^2))/(c^2 + 10*c*x^2 + 5*x^4),
 x - ((-c + x^2)*(c^2 + 10*c*x^2 + 5*x^4))/(6*c^2*x + 20*c*x^3 + 6*x^5)}

Here's a demonstration of the Newton-Raphson iteration for approximating $\sqrt{10}$:
With[{c = 10}, FixedPointList[Function[x, x - (-c + x^2)/(2*x)],
     N[5, 100]] - Sqrt[c]];

N[#2/#1 & @@@ Partition[Log[%], 2, 1], 20]

{-1.7838671038748854863, 3.7925879490759233441, 2.4492570735611599421,
 2.1829174906843319475, 2.0837943631820556414, 2.0402123955504591656,
 2.01970990649706825, Indeterminate, Indeterminate}

Note that successive ratios of the logarithms of the error approach the value $2$, demonstrating the quadratic convergence. (The Indeterminates in the last two slots come up because the error was effectively zero at that point.)
For comparison, here is the iteration with quartic (fourth-order) convergence:
With[{c = 10}, FixedPointList[Function[x, x - ((-c + x^2)*
     (c + 3*x^2))/(4*c*x + 4*x^3)], N[5, 1000]] - Sqrt[10]];

N[#2/#1 & @@@ Partition[Log[%], 2, 1], 20]

{-6.7654728809088590549, 5.3465261050589774854, 4.2513830895422052676,
 4.0591297194912047384, 4.0145670928443785744, Indeterminate,
 Indeterminate}

Here the convergence was a bit too fast, but the approach to the value $4$ can still be seen.
Answer: As others have already said, your first equation is derived from Newton's method. The idea of it is very simple, and it answers your last question. Basically, to approximate the location of a root of a function, we approximate the function locally by its tangent, find the tangents root instead, and that value is a decent approximation for the location of the desired root. It is a good exercise too use the idea to derive the formula for Newton's method.
However, we can view the equation produced for square roots in a more elementary light. If $x_n>0$ is a decent approximation for $\sqrt{n}$, then $$ \frac{ x_n + n/x_n }{2} $$ will be even better. Why? If $x_n $ is an approximation for $\sqrt{n}$ slightly too small (big), then $ n/x_n$ is an approximation for $\sqrt{n}$ slightly too big (small) - and then we average them to get somewhere closer in between. I still remember from all the calculations I used to do with this that $19601/13860$ is a good approximation for $\sqrt{2}$.
Comment: It can also be thought as approximating the geometric mean by the arithmetic one. Say I want to compute $X=\sqrt{300}$ and my current approximation is $A=20$; by computing $B=X/A=15$ we know, not only that our approximation is not exact, but that the solution must be between $A$ and $B$. Actually we know it's the geometric mean $\sqrt{A B} = \sqrt{X}$; we compute instead the arithmetic mean, hoping it's the best we can do, with only the four elemental operations.
Comment: It is much older than Newton's method: http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
Answer: There are many general approaches. One of the simplest and best is Newton's Method, which you will find in any calculus text, or by searching the web.
By the way, I think your first formula should be $f(x)=(1/2)(x+(3/x))$, no?
Answer: Somewhat off-topic, but...
When I was a kid, we didn't have calculators yet, so we learned to compute sqrts on paper using the digit-at-a-time method. This cannot compete with Newton-Raphson, of course, but is simple enough to explain to a child.  Here's a Python program that uses this method and gives $\sqrt{3}$ to 10,000 places:
import sys

i,j,k,q,d = 3,1,1,1,0

while True:
  sys.stdout.write(str(q))
  d,i,k,q = d+1, (i-k*q)*100, 20*j, 0

  for x in range(10):
    q += 1
    if (k+q)*q > i:
      q -= 1
      break

  j, k = j*10+q, k+q
  if d >= 10000:
    break

Answer: The link below shows to some extent the rationale behind the formula you have provided as well as others - See in particular the "Babylonian method"
Approximating square roots


Where can I find a database with edible plants?

Question: I'm building an web-application where users can add plants they want to grow in a list!
So my user would type, for example Oregano, and using that keyword i should be able to collect info regarding that specific plant!
What I'm looking for is a database where I can collect information regarding edible plants such as:

Temperature needed
Humidity needed
Water consumption
Light needed
Soil required
Habitat needed (i.e. African continent)
...

PS: I'm not sure if this is the right forum, I don't know what tags to use for this question. I would prefer if the data was in JSON format! Please be nice.

UPDATE:
I wrote a javascript application to get wiki data for the keyword OREGANO, and this is what I get back. I obviously can't work with this because each page would result differently. I only need parameters, such as Low_Temperature: 20,  High_Temperature: 34, Light: Partial Shade or something similar!
{{Short description|Perennial herb}}
{{Other uses}}
{{Use dmy dates|date=May 2012}}
{{Speciesbox
|image = Origanum vulgare - harilik pune.jpg
|image_caption = Flowering oregano
|genus = Origanum
|species = vulgare
|authority = [[Carl Linnaeus|L.]]
}}

'''Oregano''' ({{IPAc-en|US|ɔː|ˈ|r|ɛ|g|ə|n|oʊ|,_|ə|-}},<ref name="Collins">{{cite web|url=http://www.CollinsDictionary.com/dictionary/american/oregano?showCookiePolicy=true|title=American: Oregano|access-date=25 September 2014|publisher=Collins Dictionary|date=n.d.}}</ref> {{IPAc-en|UK|ˌ|ɒr|ɪ|ˈ|ɡ|ɑː|n|əʊ}};<ref name="Collins2">{{cite web|url=http://www.CollinsDictionary.com/dictionary/english/oregano?showCookiePolicy=true|title=British: Oregano|access-date=25 September 2014|publisher=Collins Dictionary}}</ref> '''''Origanum vulgare''''') is a [[flowering plant]] in the [[mint family]] (Lamiaceae). It is native to [[temperate]] Western and Southwestern [[Eurasia]] and the [[Mediterranean]] region.

Oregano is a [[Perennial plant|perennial]] [[herb]], growing from {{convert|20|–|80|cm|in|0|abbr=on}} tall, with [[opposite leaves]] {{convert|1|–|4|cm|in|frac=4|abbr=on}} long. The [[flower]]s are purple, {{convert|3|–|4|mm|in|frac=16|abbr=on}} long, produced in erect spikes. It is sometimes called '''wild marjoram''', and its close relative, ''[[Origanum majorana|O. majorana]]'', is known as '''sweet marjoram'''.

==Etymology==
Used since the middle [[18th century]], ''oregano'' is derived from the [[Spanish (language)|Spanish]] ''orégano'' and [[Latin]] ''orīganum'' from the [[Classical Greek]] {{lang|grc|ὀρίγανον}} (''orī́ganon'').<ref name="oed">{{cite web|url=http://www.etymonline.com/index.php?term=oregano|title=Oregano|publisher=Online Etymology Dictionary, Douglas Harper, Inc. |access-date=6 October 2016}}</ref> This is a compound Greek term that consists of {{lang|grc|ὄρος}} (''óros'') meaning "mountain", and {{lang|grc|γάνος}} (''gános'') meaning "brightness", thus, "brightness of the mountain".<ref name=oed/>

==Description and biology==
Oregano is related to the herb [[marjoram]], sometimes being referred to as wild marjoram. It has purple flowers and spade-shaped, olive-green leaves. It is a perennial,<ref name="W21">{{cite web|url=http://plants.usda.gov/java/profile?symbol=ORVU|title=Origanum vulgare L. oregano|publisher=Plants Database, United States Department of Agriculture|access-date=30 January 2011}}</ref><ref name="W1">{{cite web|url=http://www.omafra.gov.on.ca/english/crops/facts/02-049.htm|title=Growing Culinary Herbs In Ontario|publisher=Ontario Ministry of Agriculture, Food & Rural Affairs|access-date=30 January 2011|archive-url=https://web.archive.org/web/20100719222438/http://www.omafra.gov.on.ca/english/crops/facts/02-049.htm|archive-date=19 July 2010|url-status=dead}}</ref> although it is grown as an annual in colder climates, as it often does not survive the winter.<ref name="B266">{{cite book|last=Peter|first=K. V.|title=Handbook of herbs and spices|chapter-url =https://books.google.com/books?id=jITovbFEuO8C&pg=PA215|access-date =30 January 2011|volume=2|year=2004|publisher=Woodhead Publishing Limited|location=Abington Hall, Abington|isbn=1-85573-721-3|page=219|chapter =14.3.1 Growth habit of wild oregano populations}}</ref><ref name="aW1">{{cite web|url=http://www.agriculture.gov.sk.ca/Default.aspx?DN=b1d5ac77-718e-45d1-9aec-ccc6d293e4a1|title=Herbs|date=September 2009|publisher=Government of Saskatchewan|access-date=30 January 2011|archive-url=https://web.archive.org/web/20111003060853/http://www.agriculture.gov.sk.ca/Default.aspx?DN=b1d5ac77-718e-45d1-9aec-ccc6d293e4a1|archive-date=3 October 2011|url-status=dead}}</ref>
Oregano is planted in early spring, the plants being spaced {{convert|12|in|cm|order=flip|abbr=on|sigfig=1}} apart in fairly dry soil, with full sun. It will grow in a pH range between 6.0 (mildly acidic) and 9.0 (strongly alkaline), with a preferred range between 6.0 and 8.0. It prefers a hot, relatively dry climate, but does well in other environments.<ref>{{Cite web|url=http://www.omafra.gov.on.ca/CropOp/en/herbs/culinary/orega.html|title=Oregano and Marjoram|publisher=Ontario Ministry of Agriculture, Food and Rural Affairs, Guelph, Canada|date=17 October 2012|access-date=31 January 2017}}</ref>

==Taxonomy==
[[File:Majorana syriaca - za'atar.jpg|thumb|right|[[Syrian oregano]] (''Origanum syriacum'')]]
[[File:Bombus lucorum - Origanum vulgare - Keila.jpg|thumbnail|Pollination with [[white-tailed bumblebee]]]]
[[File:S oregano.png|thumb|Oregano leaves]]
[[File:Origanum vulgare young plant 2.JPG|thumb|right|Young plant]]
Many subspecies and strains of oregano have been developed by humans over centuries for their unique flavours or other characteristics. Tastes range from spicy or astringent to more complicated and sweet. Simple oregano sold in garden stores as ''Origanum vulgare'' may have a bland taste and larger, less-dense leaves, and is not considered the best for culinary use, with a taste less remarkable and pungent. It can pollinate other more sophisticated strains, but the offspring are rarely better in quality.

The related species, ''[[Origanum onites]]'' (Greece, Turkey) and ''O. syriacum'' (West Asia), have similar flavours. A closely related plant is marjoram from Turkey, which differs significantly in taste though, because [[natural phenol|phenolic compounds]] are missing from its essential oil. Some varieties show a flavour intermediate between oregano and marjoram.

===Subspecies===
Accepted subspecies:<ref>{{cite web|url=http://apps.kew.org/wcsp/namedetail.do?name_id=143954|title=Oregano, ''Origanum vulgare'' L.|publisher=Kew World Checklist of Selected Plant Families, Royal Botanic Gardens, Kew, Richmond, Surrey, UK|date=2017}}</ref>
# ''O. v.'' subsp. ''glandulosum'' (Desf.) Ietsw. – Tunisia, Algeria
# ''O. v.'' subsp. ''gracile''  (K.Koch) Ietsw. (= ''O. tyttanthum'')  has glossy green leaves and pink flowers. It grows well in pots or containers, and is more often grown for added ornamental value than other oregano. The flavor is pungent and spicy.<ref name=drugs/> – Central Asia, Iran, India, Turkey, Afghanistan, Pakistan.
# ''O. v.'' subsp. ''hirtum''  (Link) Ietsw. – (Italian oregano, Greek oregano) is a common source of cultivars with a different aroma<ref name=drugs/> from those of ''O. v. gracile''. Growth is vigorous and very hardy, with darker green, slightly hairy foliage. Generally, it is considered the best all-purpose culinary subspecies. – Greece, Balkans, Turkey, Cyprus
# ''O. v.'' subsp. ''virens'' (Hoffmanns. & Link) Ietsw. – Morocco, Spain, Portugal, Balearic Islands, Canary Islands, Azores, Madeira
# ''O. v.'' subsp. ''viridulum'' (Martrin-Donos) Nyman – widespread from Corsica to Nepal
# ''O. v.'' subsp. ''vulgare'' – widespread across Europe + Asia from Ireland to China; naturalized in North America + Venezuela

===Cultivars===
Example [[cultivars]] of oregano include:
* 'Aureum' – golden foliage (greener if grown in shade), mild taste: It has gained the [[Royal Horticultural Society]]'s [[Award of Garden Merit]]<ref>{{cite web|title=RHS Plant Selector – ''Origanum vulgare'' 'Aureum'|url=https://www.rhs.org.uk/Plants/89773/Origanum-vulgare-Aureum/Details | access-date = 16 January 2021}}</ref>
* 'Greek Kaliteri' – ''O. v.'' subsp. ''hirtum'' strains/[[landrace]]s, small, hardy, dark, compact, thick, silvery-haired leaves, usually with purple undersides, excellent reputation for flavor and pungency, as well as medicinal uses, strong, archetypal oregano flavor ([[Greek (language)|Greek]] ''kaliteri'': the best)
* 'Hot & Spicy' – ''O. v.'' subsp. ''hirtum'' strain
* 'Nana' – dwarf cultivar
Cultivars traded as Italian, Sicilian, etc. are usually hardy sweet marjoram ([[Origanum ×majoricum|''O.'' ×''majoricum'']]), a [[hybrid (biology)|hybrid]] between the southern [[Adriatic]] ''O. v.'' subsp. ''hirtum'' and sweet marjoram (''O. majorana''). They have a reputation for sweet and spicy tones, with little bitterness, and are prized for their flavor and compatibility with various recipes and sauces.

==Uses==
{{more citations needed section|date=November 2017}}

===Culinary===
[[File:Oregano (অরেগানো).JPG|thumb|Dried Oregano Leaves]]

Oregano is a culinary herb, used for the flavor of its leaves, which can be more flavorful when dried than fresh. It has an [[aroma]]tic, warm, and slightly [[Bitter (taste)|bitter]] taste, which can vary in intensity. Good-quality oregano may be strong enough almost to numb the tongue, but cultivars adapted to colder climates may have a lesser flavor. Factors such as climate, season, and soil composition may affect the aromatic oils present, and this effect may be greater than the differences between the various species of plants. Among the chemical compounds contributing to the flavour are [[carvacrol]], thymol, [[limonene]], [[pinene]], [[ocimene]], and [[caryophyllene]].<ref>{{cite journal |doi=10.1016/S0031-9422(00)00474-X |pmid=11336262 |title=The essential oil of Origanum vulgare L. Ssp. Vulgare growing wild in Vilnius district (Lithuania) |journal=Phytochemistry |volume=57 |issue=1 |pages=65–9 |year=2001 |last1=Mockute |first1=Danute |last2=Bernotiene |first2=Genovaite |last3=Judzentiene |first3=Asta }}</ref>

Oregano's most prominent modern use is as the staple herb of [[Italian cuisine]]. Its popularity in the U.S. began when soldiers returning from [[World War II]] brought back with them a taste for the "pizza herb", which had probably been eaten in southern Italy for centuries.<ref>{{cite news |last=Martyris |first=Nina |date=May 9, 2015 |title=GIs Helped Bring Freedom To Europe, And A Taste For Oregano To America |url=https://www.npr.org/sections/thesalt/2015/05/09/405302961/gis-helped-bring-freedom-to-europe-and-a-taste-for-oregano-to-america |publisher=[[NPR]] |access-date=May 28, 2018}}</ref> There, it is most frequently used with roasted, fried, or grilled vegetables, meat, and fish. Oregano combines well with spicy foods popular in southern Italy. It is less commonly used in the north of the country, as marjoram generally is preferred.

The herb is widely used in [[cuisine]]s of the [[Mediterranean Basin]] and [[Latin American cuisine|Latin America]], especially in [[Argentine cuisine]].

In Turkish cuisine, oregano is mostly used for flavoring meat, especially for [[mutton]] and lamb. In barbecue and [[kebab]] restaurants,{{Clarify|reason=does this refer to a restaurant in Turkey that serves various kebab dishes, or a [[kebab shop]] that sells fast-food [[Doner kebab]]?|date=May 2016}} it can be usually found as a [[condiment]], together with [[paprika]], salt, and pepper.

During the summer, generous amounts of dried oregano are often added as the aromatic and flavorful topping to a tomato and cucumber salad in [[Portugal]], but it can be used to season meat and fish dishes as well.

The dried and ground leaves are most often used in Greece to add flavor to [[Greek salad]], and is usually added to the lemon-olive oil sauce that accompanies fish or meat grills and [[casserole]]s.

===Oregano oil===
[[File:OreganoEssentialOil.png|thumb|Oregano essential oil in a clear glass vial]]

Oregano oil has been used in [[Traditional medicine|folk medicine]] over centuries.<ref name="drugs">{{cite web | url=https://www.drugs.com/npp/oregano.html | title=Oregano | publisher=Drugs.com | date=2016 | access-date=7 October 2016}}</ref> Oregano essential oil is extracted from the leaves of the oregano plant. Although oregano or its oil may be used as a [[dietary supplement]], there is no clinical evidence to indicate that either has any effect on human health.<ref name=drugs/><ref name="mp">{{cite web | url=https://medlineplus.gov/druginfo/natural/644.html | title=Oregano | publisher=MedlinePlus, US National Library of Medicine | date=2016 | access-date=7 October 2016}}</ref>

In 2014, the US [[Food and Drug Administration]] (FDA) warned a [[Utah]] company, [[Young Living]], that its herbal products, including oregano [[essential oil]], were being promoted to have numerous unproven anti-disease effects, and so were being sold as unauthorized misbranded [[prescription drug|drugs]] subject to seizure and federal penalties.<ref name="fda">{{cite web|url=https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/young-living-09222014|title=Warning Letter: Young Living|author=LaTonya M. Mitchell|publisher= Inspections, Compliance, Enforcement, and Criminal Investigations, US Food and Drug Administration|date=22 September 2014|access-date=7 October 2016}}</ref> Similar FDA [[FDA warning letter|warning letters]] for false advertising and unproven [[health claim]]s about oregano essential oil products were published in 2017 and 2018.<ref name="fda2">{{cite web|url=https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/absonutrix-508557-07252017|title=Warning Letter: Absonutrix|author=Ingrid A. Zambrana|publisher= Inspections, Compliance, Enforcement, and Criminal Investigations, US Food and Drug Administration|date=25 July 2017|access-date=18 May 2019}}</ref><ref name="fda3">{{cite web|url=https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/long-life-unlimited-533282-01312018|title=Warning Letter: Long Life Unlimited|author=Kimberly L. McMillan|publisher= Inspections, Compliance, Enforcement, and Criminal Investigations, US Food and Drug Administration|date=31 January 2018|access-date=18 May 2019}}</ref>

==Chemical components==
Oregano contains [[polyphenol]]s, including numerous [[flavone]]s.<ref name="Dragland2003">{{cite journal|url=http://jn.nutrition.org/cgi/pmidlookup?view=long&pmid=12730411|last1=Dragland|first1=Steinar|last2=Senoo|first2=Haruki |last3=Wake|first3=Kenjiro|last4=Holte|first4=Kari|last5=Blomhoff|first5=Rune|title=Several culinary and medicinal herbs are important sources of dietary antioxidants|journal=Journal of Nutrition|volume=133|issue=5|pages=1286–90|date=1 May 2003|doi=10.1093/jn/133.5.1286|issn=0022-3166|pmid=12730411|doi-access=free}}</ref><ref>{{cite journal|doi=10.1080/14786419.2014.896011|pmid=24635145|title=Origanum species native to the island of Crete: in vitro antioxidant characteristics and liquid chromatography–mass spectrometry identification of major polyphenolic components|journal=[[Natural Product Research]]|volume=28|issue=16|pages=1284–7|year=2014|last1=Tair|first1=Asma|last2=Weiss|first2=Erika-Krisztina|last3=Palade|first3=Laurentiu Mihai|last4=Loupassaki|first4=Sofia|last5=Makris|first5=Dimitris P.|last6=Ioannou|first6=Efstathia|last7=Roussis|first7=Vassilios|last8=Kefalas|first8=Panagiotis|s2cid=42500633}}</ref>

The essential oil of oregano is composed primarily of [[monoterpenoid]]s and [[monoterpenes]], with the relative concentration of each compound varying widely across geographic origin and other factors. Over 60 different compounds have been identified, with the primary ones being carvacrol and [[thymol]] ranging to over 80%, while lesser abundant compounds include [[p-cymene|''p''-cymene]], [[γ-terpinene]], caryophyllene, [[spathulenol]], [[germacrene D]], [[β-fenchyl alcohol]] and [[δ-terpineol]].<ref>{{cite journal|doi=10.1002/jsfa.6089|pmid=23553824|title=Chemical composition and bioactivity of different oregano (''Origanum vulgare'') extracts and essential oil|journal=[[Journal of the Science of Food and Agriculture]]|volume=93|issue=11|pages=2707–14|year=2013|last1=Teixeira |first1=Bárbara|last2=Marques|first2=António|last3=Ramos|first3=Cristina|last4=Serrano|first4=Carmo|last5=Matos|first5=Olívia |last6=Neng|first6=Nuno R|last7=Nogueira|first7=José M F|last8=Saraiva|first8=Jorge Alexandre|last9=Nunes|first9=Maria Leonor}}</ref>

Drying of the plant material affects both quantity and distribution of volatile compounds, with methods using higher heat and longer drying times having greater negative impact. A sample of fresh whole plant material found to contain 33 g/kg dry weight (3.1 g/kg wet) decreased to below a third after warm-air convection drying. Much higher concentrations of volatile compounds are achieved towards the end of the growing season.<ref>{{cite journal|doi=10.1016/j.jfoodeng.2010.01.002|title=Composition of oregano essential oil (Origanum vulgare) as affected by drying method|journal=[[Journal of Food Engineering]]|volume=98|issue=2|pages=240–7|year=2010|last1=Figiel |first1=Adam|last2=Szumny|first2=Antoni|last3=Gutiérrez-Ortíz|first3=Antonio|last4=Carbonell-Barrachina|first4=Ángel A.}}</ref>

==Other plants called "oregano"==

* ''[[Coleus amboinicus]]'', known as Cuban oregano, {{lang|es|orégano poleo}} ('[[Hedeoma|pennyroyal]] oregano'), {{lang|fr|orégano francés}} ('French oregano'), Mexican mint, Mexican thyme, and many other names, is also of the mint family (Lamiaceae).  It has large and somewhat [[succulent]] leaves.  Common throughout the tropics, including Latin America, Africa, and Southeast Asia, it is probably of eastern-hemisphere origin.
* ''[[Lippia graveolens]]'', Mexican oregano, known in Spanish as {{lang|es|orégano cimarrón}} ('wild oregano'), is not in the mint family, but in the related [[vervain family]] (Verbenaceae). The flavor of Mexican oregano has a stronger savory component instead of the piney hint of rosemary-like flavor in true oregano, and its citrus accent might be more aromatic than in oregano. It is becoming more commonly sold outside of Mexico, especially in the southeastern United States. It is sometimes used as a substitute for [[epazote]] leaves.
* ''[[Hedeoma patens]]'', known in Spanish as {{lang|es|orégano chiquito}} ('small oregano'), is also among the Lamiaceae.  It is used as an herb in the Mexican states of [[Chihuahua (state)|Chihuahua]] and [[Coahuila]].

==See also==
* ''[[Thymus vulgaris]]'', thyme

==References==
{{Reflist|30em}}

==External links==
{{Commons|Origanum vulgare}}
{{Wikiquote}}
* [http://rbg-web2.rbge.org.uk/cgi-bin/nph-readbtree.pl/feout?FAMILY_XREF=&GENUS_XREF=Origanum+&SPECIES_XREF=vulgare&TAXON_NAME_XREF=&RANK= Flora Europaea: ''Origanum vulgare'']
* [https://www.ars-grin.gov/cgi-bin/npgs/html/taxon.pl?25913 Germplasm Resources Information Network: ''Origanum vulgare'']

{{Herbs & spices}}
{{Medicinal herbs & fungi}}
{{Transient receptor potential channel modulators}}
{{Taxonbar|from=Q134283}}
{{Authority control}}

[[Category:Flora of Asia]]
[[Category:Flora of Europe]]
[[Category:Herbs]]
[[Category:Medicinal plants]]
[[Category:Origanum]]
[[Category:New Mexican cuisine]]
[[Category:Plants described in 1753]]

Answer: Wikidata has a category "Edible plants"

https://m.wikidata.org/wiki/Q7224176

This would be the data behind this list, but most languages will also be linked.

https://en.wikipedia.org/wiki/Category:Edible_plants

You can use the Sparql front-end to build a query:

https://query.wikidata.org
https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service

And request either on this site, or

https://www.wikidata.org/wiki/Wikidata:Request_a_query for help with a query.
Comment: Not exactly what I was looking for. For example I looked for Broccoli and Cauliflower to see what similarities are there. Broccoli has no information regarding the soil needed to plant them, and for cauliflower there is minimal information about the soil. Also none of them mention water consumption needed for that specific plant. I can imagine there would be plants with no information at all about such cases....
Comment: Also regarding networking: when you look for a brocolli etc on wikipedia, what happens is that you send a POST request to the wiki server using that specific keyword. When the server analyse that request it sends back a GET request with a bunch of text using jquery. that is no helpful to me. I would spend a lifetime getting this to work, and who knows maybe more. Also a simple change in how wiki handles these requests would ruin my program. Although it is interesting, are there any alternatives?
Answer: https://garden.org/plants/search/advanced/ might be a starting point.
You can select plants with edible fruits (for example), but you don't get all the results because there are too many.
There also doesn't appear to be an easy way to download their database, though you could use a site scraper or similar.
Detail pages like https://garden.org/plants/view/78036/Pink-Evening-Primrose-Oenothera-speciosa/ seem to provide much of the information you seek.
Comment: It's too complected and it will required a lot of processing power to do all that. Besides, a single change in their website will ruin the web-scrapping technique! Thanks for your reply though! :D
Comment: @LoizosVasileiou I actually meant scrape the whole website one time, not scrape it every time you need a new entry. I don't think it would be that difficult. If you google "plant database" or "edible plant database" (both without quotes) there are other sources, but none of them have the details you want re what environment the plant grows best in.


How do you get to the fourth island without great slides in tiny wings?

Question: I have the x24 multiplier nest.  The next nest has an objective that requires you get to island 4 without any great slides.  This has turned out to be much harder than I anticipated and I'm wondering if I'm missing something simple.  I am trying to time my landings to hit the top of the hill before the dip, thus removing the chance of a great slide.  Is there an easier way?
Answer: Always prevent a slide out of a valley by holding your finger down at the lowest part of the dip. But let your finger off after coming out of the valley to get some height and speed. When you hit the ground, again hold your finger down to prevent a slide. Repeat.
Basically, you're letting your finger off at the very last moment of leaving a valley and holding it down on the way in to prevent a slide.
Comment: This is pretty much the strategy that worked for me. Additionally, try to hit blue coins whenever possible - those little boosts can make a big difference.
Comment: @sjohnston absolutely.
Comment: Brilliant, thanks.  I was trying to time the landing, but it always killed my momentum.  Doing it your way I could keep the speed up and I did it on my second try with no issues.
Answer: Hm, since it's Island 4, I don't think you need to go high at all. I believe what I did was abuse the fact that if you don't leave the ground by any significant distance, you won't end up with any great slides. So basically, just keep very close to the ground by keeping your finger glued to the screen. Since it's just island 4, you should be able to reach it this way.
Hope this helps!
Comment: I must be doing this wrong. Nighttime comes far too quickly when I try doing it this way.
Answer: What I did was when I pressed down on the hill and went flying before I landed I would drop my bird and keep doing that and it worked it depends on how good you are with the jumps to see if your timing is just right good luck!
Answer: Video Tutorial www.youtube.com/orangeanoying (I will have them posted soon=) )
It is actually really hard I gave up on. If you iPod is jailbroken You can use this
1st-Have SBSettings (Not Required but recommended) and ifile (Required)
2ed-Go Into SBSettings and Select MORE
3rd-Scroll down to App Folders and look for Tiny Wings
4th-Click it and remember The Path it shold say something like...
 /private/var/mobile/Applications/B695... (Just remember the first 4 Num/Leters
5th- Get Out of SBSettings and Go to Ifile then Click in this order
 /var/mobile/Applications
6th- You will see a bunch of numbered files look at the 4 Numbers or letters you had and open the folder
7th-Open Library and then Preferences There should only be 1 File in there so Click it and then Click Property List Viewer
8th- Change your achevements and other things Just not the long list of codes


How to understand this phrase: a native son of Negro descent?

Question: I came across this phrase in a paper on African American literature, and it made me wonder whether the phrase "a native son of Negro descent" could be used to describe a child who has an American father and an African mother. Does the word "native" mean that the child must be purely black or he/she can also be mixed-blood?
Comment: [This dictionary entry](https://www.dictionary.com/browse/native-son) should help.
Answer: The phrase come from a review by Montgomery Gregory of Jean Toomer's Cane.
Here native son was probably intended to mean American born and bred, while Negro descent meant Black.
Gregory's intention was to identify Toomer's novel as authentic African-American literature and as a genuine expression of Southern Black experience. This was an issue as Toomer (the son of a mixed-race former slave and of a free woman of color) was sometimes described as being "racially indeterminate" and could and did at times pass as White or Black, personally trying to avoid labelling himself beyond American.
Comment: Thanks for your answer! You're right, I'm working on Jean Toomer's Cane and sometimes it makes me feel perplexed when I come across words or phrases concerning race. Your answer is very helpful.
Answer: Taken without additional context, no, the word "native" does not necessarily mean either of the following:

the child is purely black;
he/she is mixed-blood.

Native son means

a person born in a particular place: The delegation from Iowa
nominated a native son.

For example, a recent Guardian UK article title is Scranton stands by native son Biden but even here enthusiasm is elusive. U.S. President Joe Biden was born and raised in Scranton, Pennsylvania. He is a "native son" of Scranton. Joe Biden is white.
In the specific context of contemporary African American literature, "a native son of Negro descent" would most likely mean a male child who was born in the United States, and whose family heritage includes dark-skinned ancestors.
The eponymous novel Native Son by African American author, Richard Wright, was published in 1940. This 1992 book review by The New Yorker makes it clear that the native son was a black man with a black mother and black father. You can read a little more about the native son, whose name was Bigger Thomas, here.
Note: I wrote dark-skinned because "Negro" can refer to people who were citizens of Haiti, which gained its independence from France in the 1700s. Alternatively, Negro could refer to African Americans whose ancestors may (or might not) have been born in Africa and brought to the Americas as slaves.
Comment: Thanks for your explanation! I must have used the word "native" in a wrong way before. I'm very grateful for your help.
Comment: You @YuhangMa are most welcome! Thank *you* for selecting my answer. Please feel free to give my answer an upvote as well, if you are able to do so as a new user. And of course, welcome to English Language & Usage (known as EL&U) StackExchange!
Answer:
"a native son of Negro descent"

native - born (or originating) in a given area.

OED
III.9.a. Of a country, region, etc.: that is the place of a person's birth and early life; that is the place of origin of a plant or
animal.
1995 He has promoted Portuguese literature in his native country by,
among other things, translating Fernando Pessoa..into Italian.
Guardian 20 October (Friday Review section) 25/1

"a native son of Negro descent" -> "of Negro descent and born in the area stated"
It says nothing about the child's skin colour.
Comment: Now I get it, seems like "native" is related mainly to a person's birthplace, not his skin color. Thank you very much!
Comment: It would help if you accepted the answer...


Sort Wrappers In JSON?

Question: public with sharing class TableData {

    public String Id { get; set; } // hash modified
    public Decimal duration { get; set; }
    public String description { get; set; }
    public String name { get; set; }
    public String owner { get; set; }
    public String type { get; set; }
    public Decimal timeAllocated { get; set; }
    public String dueDate { get; set; }
    public String status { get; set; }

        public TableData(String id, Decimal duration, String description, String name, String owner, String type,
                            Decimal timeAllocated, String dueDate, String status) {

            this.id = id; // hash modified
            this.duration = duration;
            this.description = description;
            this.name = name;
            this.owner = owner;
            this.type = type;
            this.timeAllocated = timeAllocated;
            this.dueDate = dueDate;
            this.status = status;

        }

}

Comment: https://salesforce.stackexchange.com/questions/54683/json-getting-sorted-when-serialize-the-wrapper-class-object - What are you trying to sort by? Are you trying to sort the JSON or the wrapper. Please included details in the question and not in comments
Answer: You would sort them before serialization. That is the raison d'être for the Comparable interface. If, for instance, you wanted to sort by dueDate it would look something like:
class MyWrapper implements Comparable
{
    public Date dueDate { get; private set; }
    // other properties
    public MyWrapper(...)
    {
        // constructor
    }
    public Integer compareTo(Object instance)
    {
        MyWrapper that = (MyWrapper)instance;

        // nulls last
        if (that.dueDate == null) return 1;
        if (this.dueDate == null) return -1;

        // descending
        return (this.dueDate > that.dueDate) ? -1 : 1;
    }

    public static String serializeSorted(List<MyWrapper> input)
    {
        // you could add a convenience method which combines steps
        input.sort();
        return JSON.serialize(input);
    }
}

Comment: I figured out what i was trying to say lol. The properties within the wrapper are sorted automatically and cannot be ordered with serialize. The order of the  objects themselves is retained if the collection is an ordered collection
Comment: @Eric Ah, right, they're serialized in the order they're declared?
Comment: I do not believe so. They are sorted by the JSON in Alpha  (reverse) order. At least in the few quick anon examples I just did. By no means concrete though. I wonder if that is what the OP was asking about given the words "json key" in the comments (since deleted)

Sort Wrappers In JSON?


Service doesn't work by shortcut for single selected folder in Mac OS X

Question: I've created a service using Automator in Mac OS X 10.9 (and earlier in 10.8) to copy full path names of selected files and folders in Finder. Also I've assigned shortcut for this service in system preferences. But shortcut doesn't work when I select single folder. Shortcut works for many selected folders and files. Also it works for single selected file. But for single selected folder it works only when I run service from Services menu without using assigned shortcut. I've tried different key combinations for shortcut but behaviour for all was the same: selection box for single selected folder changes its color from blue to gray and no action to run service.
Answer: I have noticed a few bugs since at least 10.7:

Services that receive files and folders or only folders as input are never shown in the services menu when a single folder is selected in column view. It only applies to column view and not to list view or icon view.
Sometimes the shortcuts for services don't work until you hover over the services menu from the menu bar, or for example run a service from the services menu once. It seems to apply to all applications and also to services that receive no input.

Are you sure it's not a case of the second bug, or does the shortcut actually start working after you run the service once from the services menu?
Could you maybe assign a shortcut to an AppleScript instead of creating a service? I have used FastScripts to assign a shortcut to this script:
<code>tell application "Finder" to set s to selection as alias list
if s is {} then return
set out to {}
repeat with f in s
    set end of out to POSIX path of f
end repeat
set text item delimiters to linefeed
set the clipboard to (out as text)
</code>
Comment: Thank you for detailed answer! I tested your suggestions, so in my OS following behaviour: my service is always available under Services menu in any finder view, but keyboard shortcut doesn't work in column view - this view mode I use very often so the bug is critical for me. I will try your suggestion with AppleScript or FastScript, thank you.
Comment: I hovered over the services menu from the menu bar, and it started working, thanks!


Preserving create_time when loading a mysqldump file

Question: I want to make a copy of a MySQL database but preserve the information_schema.create_time for each of the tables. I haven't been able to find an option to do that with mysqldump.
Answer: There's a response for this here: MySQL - mysqldump. preserve update_time and modify_time
As @RolandoMySQLDBA said:

There is no way to reload the INFORMATION_SCHEMA manually. All the tables are dynamic entities.


Are Machine Learning models probabilistic models?

Question: In terms of Machine Learning models, as far as I know, there are two kinds of models in Machine Learning. One kind are discriminative models and the other kind are generative models. But I wonder if those two kinds of Machine Learning models are probabilistic models.
Comment: It seems like the answer to this question must depend on which machine learning model in particular we are considering and how you define a probabilistic model. This question reminds me of the discussion around https://stats.stackexchange.com/questions/127042/why-isnt-logistic-regression-called-logistic-classification/127044#127044
Answer: Some, but not all, of the machine learning models, are probabilistic models. There are machine learning models that are probabilistic by design, such as Naive Bayes. There are also ones that are not probabilistic, like SVM, random forest, or $k$-NN, because they were not designed in terms of thinking of random variables and probability distributions.
On another hand, many models that are not defined in probabilistic terms per se, can be interpreted as probabilistic models. Minimizing a loss function is equivalent to maximizing some likelihood, for example minimizing squared loss is equivalent to maximizing Gaussian likelihood, and logistic loss to Bernoulli likelihood. Also regularization can be thought as setting priors for the parameters, so it is relatively easy to translate something like neural network, to Bayesian neural network. However, as you can learn from this thread, in some cases you can run into problems with it.
Being a probabilistic model is a "nice to have" feature for machine learning model, because it makes easier for us to evaluate the uncertainties related to the predictions returned by the model. It is not "obligatory", because in machine learning we usually worry only about making accurate predictions (rather then inference), and in many cases the well established tools for assessing their performance, like cross-validation, are enough for this task. For example, $k$-NN classifies cases based on their similarities to other samples in the training data, and this both works and is intuitively appealing way of making classifications, there is no need to defining it in probabilistic terms.
Comment: @ChangheeKang this seems to be a separate question. Have you checked https://stats.stackexchange.com/questions/21434/why-are-discriminative-models-called-discriminative or https://stats.stackexchange.com/questions/12421/generative-vs-discriminative threads? If they don't help, you can ask it as a separate question.
Comment: Generative models must be probabilistic models by nature. But I am really confused about what discriminative models mean. All I know is that they use conditional probabilities to build boundaries and they directly build posterior distributions. How do they build direct posterior from conditional probabilities? and I don't think I really understand the phrase.