Let's say I have n elements to begin with, and over time more elements are added in.  What's the minimum amount of data I have to store in order to be able to continuously update the variance, and how would I do it (assuming I can get away with purely aggregate data such as number of elements, current mean, and current variance)?  Aggregate data would be preferable to individual element data, although if the latter is unavoidable then I guess I will not have a choice!
I'd like to know how I can recursively (edit: iteratively) compute variance, so that I may calculate the standard deviation of a very large dataset in javascript. The input is a sorted array of positive integers.
Who is blowing the horn to alert the Night's Watch? set only lower bound of a limit for ggplot Nuclear Binding energy The nuclear binding energy, is the energy that is needed to seperate the nucleons in a nucleus. And binding energy is also defined as the energy given out when a nucleus forms from nucleons.   Also the larger the nucleus is, the more energy is required to break it apart, so why doesn't that mean that larger nuclei are more stable? I mean Uranium has a lower binding energy per nucleon than Iron, but there are many many more nucleons in Uranium that Iron so the total binding energy is going to be much greater.   Basically I don't understand why whether an element gives out energy by fusion or fission (why the lighter element provide energy by fusion not fission and vice versa for heavy elements) depends on binding energy per nucleon and not "total" binding energy "That... be" construction bash: start multiple chained commands in background I'm trying to run some commands in paralel, in background, using bash. Here's what I'm trying to do:  forloop {   //this part is actually written in perl   //call command sequence   print `touch .file1.lock; cp bigfile1 /destination; rm .file1.lock;`; }   The part between backticks (``) spawns a new shell and executes the commands in succession. The thing is, control to the original program returns only after the last command has been executed. I would like to execute the whole statement in background (I'm not expecting any output/return values) and I would like the loop to continue running.  The calling program (the one that has the loop) would not end until all the spawned shells finish.  I could use threads in perl to spawn different threads which call different shells, but it seems an overkill...  Can I start a shell, give it a set of commands and tell it to go to the background? Where can I access OS X keyboard shortcuts, say for Dropbox sync? what does the ldapadd error: "additional info: objectClass: value #2invalid per syntax mean? Are global variables bad? How to retrieve all keys (or values) from a std::map and put them into a vector? This is one of the possible ways I come out:  struct RetrieveKey {     template &lt;typename T&gt;     typename T::first_type operator()(T keyValuePair) const     {         return keyValuePair.first;     } };  map&lt;int, int&gt; m; vector&lt;int&gt; keys;  // Retrieve all keys transform(m.begin(), m.end(), back_inserter(keys), RetrieveKey());  // Dump all keys copy(keys.begin(), keys.end(), ostream_iterator&lt;int&gt;(cout, "\n"));   Of course, we can also retrieve all values from the map by defining another functor RetrieveValues.  Is there any other way to achieve this easily? (I'm always wondering why std::map does not include a member function for us to do so.) How do I cd into a directory in the home folder? I can open Thunderbird but as soon as I click on any file thunderbird freezes. Went to tools can see first page of settings but thunderbird freezes.  Ran norton 360 &amp; rebooted too   Went to firefox website to download thunderbird Version 3.1.9 (3) program downloads and then freezes while norton checks for viruses....  Any suggestions? Can you explain Parzen window (kernel) density estimation in layman's terms? There are a number of times in Lord of the Rings where the "east" is mentioned -- the pirate ships, the slave-driven farms. And of course all of the peoples subservient to Sauron who come to fight Gondor and the West. Are there any maps of the East of Middle-earth, and what is out there? I created a test MVC sharepoint app succesfully in a solution. Now I need to integrate this into a main solution project.   But when I added a SharePoint MVC App into the solution and hit F5, I am getting following error:  Error occurred in deployment step 'Install app for SharePoint':  Failed to install app for SharePoint. Please see the output window for details.   Detailed stack trace:  CorrelationId: 50583239-71cb-4b07-8bcb-4bbc51a22631      ErrorDetail: There was a problem with activating the app web definition.      ErrorType: App      ErrorTypeName: App Related      ExceptionMessage: Microsoft.SharePoint.SPException: Exception from HRESULT: 0x81070964 ---&gt; System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x81070964 at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext) at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext) --- End of inner exception stack trace --- at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionModules(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, Int32 compatibilityLevel, String featureName, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(Guid featureId, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) at Microsoft.SharePoint.SPFeatureCollection.Add(Guid featureId, Boolean force, SPFeatureDefinitionScope featdefScope) at Microsoft.SharePoint.SPUserSolutionCollection.EnsureWebFeaturesActivated(SPUserSolution solution) at Microsoft.SharePoint.Packaging.SPUserCodeSolutionDeploymentGroup.ActivateSolution(SPWeb web, SPUserSolution solution) at Microsoft.SharePoint.Packaging.SPUserCodeSolutionDeploymentGroup.Deploy() at Microsoft.SharePoint.Administration.SPAppTask.DeployOperation() at Microsoft.SharePoint.Lifecycle.MonitoredTaskExecution.DoTask()      Source: AppWeb      SourceName: App Web Deployment   Can somebody shed a light on this issue? :) Is the Ohm's law violated here? And also why is electricity generated at 11,000 V in India? How can I transition height: 0; to height: auto; using CSS? Implicit Differentiation Help I have to use implicit differentiation to find $\frac{dy}{dx}$ given:  $$x^2 \cos(y) + \sin(2y) = xy$$  I don't even know where to begin, I missed the class where we went over implicit differentiation, and because of that, I am completely stuck.   Thank you everyone.  Edit: I don't know how to make the equation look all nice and whatnot, so sorry about that iOS 11-13 - unable to paste into comments I’m able to copy-paste from any application to any application. I’m able to copy from a comment or from a question or from an answer. I’m able to paste to a question or answer. However, if I attempt to paste into a comment, nothing happens. I am able to subsequently paste into another application, confirming that the text is actually on the clipboard.   However, copying SE links will paste them successfully, but all other text - including other links - still fails. This leads me to believe that it’s a SE issue and not an Apple one.   This has been an issue since 11.0 beta and persists through iOS 13 release. My wife was just issued a multiple entry visa by France, which is good for one year.  Our first trip will be to France, the issuing country.  My question is: after we leave the EU and return, must future trips also start in France? Or may we go directly to (say) Greece from the US on a later visit? New database server hardware and software inserts slower than old setup