How can I figure out what questions will be on topic for a particular Stack Exchange site?
Is there a description of Stack Exchange/Stack Overflow sites?
Linear regression best polynomial (or better approach to use)? Any ideas on other polynomials I could successfully use for applying regression? My goal is a solution that has fit error strictly based on the noise. Is this possible since it is a bell-like curve? The tails can be long, short or non-existent. Am I looking for the impossible? Please note it has been a while since I have plunged this far into linear regression.   Anyway, my data points do not fit the $ax+bx^2+c$ polynomial well enough. I would like a replacement for this polynomial to apply regression (or different approach). In the following example, each point misses the fit curve by $20\%$ of the $Y$ range on average (of the data points). I looked at splines, but I do not know how to apply the regression since they look piece-wise.   Example $Y$ values (evenly spaced in $X$). It looks kind of like a bell curve. I would be applying 5 to 50 data points to determine the polynomial coefficients. Ultimately, I am interested in the best $X$ location for the peak based on the data points.     X      Y -40    -21142.1111111111 -30    -21330.1111111111 -20    -12036.1111111111 -10      7255.3888888889   0     32474.8888888889  10     32474.8888888889  20      9060.8888888889  30    -11628.1111111111  40    -15129.6111111111 I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's another story).  The best I can do so far is to add a layer file to the current map, using the following ("addLayer" is a layer file object):  def AddLayerFromLayerFile(addLayer):  import arcpy  mxd = arcpy.mapping.MapDocument("CURRENT")  df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]  arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE")  arcpy.RefreshActiveView()  arcpy.RefreshTOC()  del mxd, df, addLayer   However, my raw data is always going be shapefiles, so I need to be able to open them. (Equivalently: convert a shapefile to a layer file without opening it, but I'd prefer not to do that). How to subtract a day from a date? I have a Python  object. What is the best way to subtract one day? Why can't I press the Install button when installing applications from unknown sources? Is a general GRE score of X sufficient for entry to postgraduate degree Y? Question: I got general GRE scores of VR (verbal reasoning), QR (quantitative reasoning), and AW (analytical writing).  Is this a good score to apply for entry to postgraduate degree in field X?  How will this score look to the selection committee?    Note: This is an intentionally generic GRE question (with unspecified scores and field of study) which is intended as a template for a large number of questions asked on this forum regarding evaluating the scores on the general GRE test (e.g., , , , , , , , and ).  This question seeks answers that are applicable for an applicant for graduate-level programs in any field, based on any scores in the GRE general test.  The goal of this question is to provide a general reference to avoid the need for specific questions with particular scores/field of study. Serial protocol delimiting/synchronization techniques As asynchronous serial communication is widely spread among electronic devices even nowadays, I believe many of us have encountered such a question from time to time. Consider an electronic device D and a computer PC connected with serial line (RS-232 or similar) and required to exchange information continuously. I.e. PC is sending a command frame each X ms, and D is replying with status report/telemetry frame each Y ms (The report can be sent as response to requests or independently - doesn't really matter here). The communication frames can contain any arbitrary binary data. Assuming the communication frames are fixed-length packets. The problem: As the protocol is continuous, the receiving side might loose the synchronization or just &quot;join&quot; in the middle of an ongoing sent frame, so it just won't know where the start of frame (SOF) is. A the data has different meaning based on its position relatively to the SOF, the received data will become corrupted, potentially forever. The required solution Reliable delimiting/synchronization scheme to detect the SOF with short recovery time (i.e. it shouldn't take more than, say 1 frame to resynchronize). The existing techniques I am aware (and using some) of: 1) Header / checksum - SOF as predefined byte value. Checksum in the end of frame.  Pros: Simple. Cons: Not reliable. Unknown recovery time.  2) Byte stuffing:  Pros: Reliable, fast recovery, can be used with any hardware Cons: Not that suitable for fixed-size frame-based communication  3) 9th bit marking - prepend each byte with additional bit, while SOF marked with 1 and the data bytes are marked with 0:  Pros: Reliable, fast recovery Cons: Requires hardware support. Not directly supported by most of PC hardware and software.  4) 8th bit marking - kind of emulation of the above, while using the 8th bit instead of 9th, which is leaving only 7bits for each data word.  Pros: Reliable, fast recovery, can be used with any hardware. Cons: Requires an encoding/decoding scheme from/to the conventional 8-bit representation to/from 7-bit representation. Somewhat wasteful.  5) Timeout based - assume the SOF as the first byte coming after some defined idle time.  Pros: No data overhead, simple. Cons: Not that reliable. Won't work well with poor timing systems like, say, Windows PC. Potential throughput overhead.  Question: What are the other possible techniques/solutions exist to address the problem? Can you point to the cons in the above list which can be easily worked around, thus removing them? How do you (or would you) design your systems protocol? After finishing The Cayo Perico Heist, how long will it be set in hard mode? After I finished The Cayo Perico Heist, I tried setting up another heist in the Kosatka, and got this message :  The setup cost for The Cayo Perico Heist is $25000. Setting up now will set the heist to Hard Mode. Do you wish to proceed?  It seems that there is a cooldown period before the heist reverts to normal mode from hard mode. How long will it take before it reverts to normal mode? Also, does the cooldown timer run even if you're logged out of GTA Online? E.g., if I quit GTA Online just after finishing the heist, the next time I log back in, will I have to wait for the cooldown period to finish before it reverts to normal mode? Can't access global variable inside function Wikipedia onebox is dropping random text Random text is getting dropped from Wikipedia oneboxes. See . Screenshot:  This occurs regardless of HTTP/HTTPS and of whether a redirect URL is entered into chat. I initially thought the bug is triggered by &lt;span&gt;s or other HTML formatting elements, but in the Burj Khalifa article's HTML source code, there is no formatting around one of the deleted words. Possibly related to , but this is not specific to numbers. Then what is the probability that out of $n$ men $A_1,A_2,....,A_n$ each aged $x$ years,$A_1$ will die and will be the first to die Let $p$ be the probability that a man aged $x$ years will die in a year time.Then what is the probability that out of $n$ men $A_1,A_2,....,A_n$ each aged $x$ years,$A_1$ will die and will be the first to die?  The probability that a man aged $x$ years will die in a year time$=p$  The probability that a man aged $x$ years will not die in a year time$=1-p$  But from here on,i got stuck.Some hints and suggestions are welcome. Impact of changing instances' passwords As part of a security policy, the company I work for has given me the task of changing the sa's and SQL Server Agent service accounts' passwords for several instances.  What's the possible impact of doing this? Is there anything in particular I should watch out for? Is there any whitepaper, guide or even blog post about this kind of task? What kind of 'backup' plan should I have in place in case anything goes wrong?  Any guidance is appreciated. Question list on profile page not vertically aligned Detecting device for debugging (ADB) does not work What are routed events and how it's different from normal events How do I integrate the Poisson equation to determine the electric potential along a particular direction (e.g., $z$)? This question is a sequel of sorts to my  about .  In the paper, the authors performed molecular dynamics (MD) simulations of parallel-plate supercapacitors, in which liquid resides between the parallel-plate electrodes.  The system has a "slab" geometry, so the authors are only interested in variations of the liquid structure along the $z$ direction.  In my previous question, I asked about how particle number density is computed.  In this question, I would like to ask about how the electric potential is computed, given the charge density distribution.  Recall that in CGS (Gaussian) units, the Poisson equation is   $$\nabla^2 \Phi = -4\pi \rho$$  where $\Phi$ is the electric potential and $\rho$ is the charge density.  So the charge density $\rho$ is proportional to the Laplacian of the potential.  Now suppose I want to find the potential $\Phi(z)$ along $z$, by integrating the Poisson equation.  How can I do this?  In the paper, on page 254, the authors write down the average charge density $\bar{\rho}_{\alpha}(z)$ at $z$:  $$\bar{\rho}_{\alpha}(z) = A_0^{-1} \int_{-x_0}^{x_0} \int_{-y_0}^{y_0} dx^{\prime} \; dy^{\prime} \; \rho_{\alpha}(x^{\prime}, y^{\prime}, z)$$  where $\rho_{\alpha}(x, y, z)$ is the local charge density arising from the atomic charge distribution of ionic species $\alpha$, $\bar{\rho}_{\alpha}(z)$ is the average charge density at $z$ obtained by averaging $\rho_{\alpha}(x, y, z)$ over $x$ and $y$, and $\sum_{\alpha}$ denotes sum over ionic species.  The authors then integrate the Poisson equation to obtain $\Phi(z)$:  $$\Phi(z) = -4\pi \sum_{\alpha} \int_{-z_0}^z (z - z^{\prime}) \bar{\rho}_{\alpha}(z^{\prime}) \; dz^{\prime} \; \; \; \; \textbf{(eq. 2)}$$  My question is, how do I "integrate the Poisson equation" to obtain equation (2)?  How do I go from  $\nabla^2 \Phi = -4\pi \rho$ to equation (2)?  In paricular, where does the $(z - z^{\prime})$ factor come from?   Thanks for your time. Why are p-values uniformly distributed under the null hypothesis? Dynamically creating keys in a JavaScript associative array All the documentation I've found so far is to update keys that are already created:  arr['key'] = val;  I have a string like this: &quot; name =  oscar &quot;  And I want to end up with something like this: { name: 'whatever' }  That is, split the string and get the first element, and then put that in a dictionary. Code var text = ' name = oscar ' var dict = new Array(); var keyValuePair = text.split(' = '); dict[ keyValuePair[0] ] = 'whatever'; alert( dict ); // Prints nothing. I'm trying to use grep to show only lines containing either of the two words, if only one of them appears in the line, but not if they are in the same line.  So far I've tried  grep pattern1 | grep pattern2 | ... but didn't get the result I expected. Resolve the error "An illegal choice has been detected..." MySQL Insert query doesn't work with WHERE clause