In the following code (on a 32 bit machine), if I print out the sizeof the pair, should I get 12? In my compiler I got 16. Is this always the case or it is compiler specific?  pair&lt;int,string&gt; b = std::make_pair(1,"randomcrap"); string c= "randomcrap"; cout &lt;&lt; sizeof(c) &lt;&lt; endl; //got 8 which make sense cout &lt;&lt; sizeof(b) &lt;&lt; endl; //got 16
Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?
Is there a reason why we gain ghost reputation on the meta of an SE website? Is there any reason behind the ghost reputation we gain on the meta of a Stack Exchange site? This reputation doesn't add up to anything, but it still shows me I have gained some. Is this supposed to make any sense? How to run scripts every 5 seconds? I have a script that needs to be run every five seconds. I know that cron can do tasks by the minute, but is there a way to run something every second? How do I run specific sudo commands without a password? On one particular machine I often need to run sudo commands every now and then. I am fine with entering password on sudo in most of the cases.  However there are three sudo commands I want to run without entering password:   sudo reboot sudo shutdown -r now sudo shutdown -P now   How can I exclude these commands from password protection to sudo? Is it better to difference a series (assuming it needs it) before using an Arima OR better to use the d parameter within Arima?  I was surprised how different the fitted values are depending on which route is taken with the same model and data. Or am I doing something incorrectly?  install.packages("forecast") library(forecast)  wineindT&lt;-window(wineind, start=c(1987,1), end=c(1994,8)) wineindT_diff &lt;-diff(wineindT)  #coefficients and other measures are similar modA&lt;-Arima(wineindT,order=c(1,1,0)) summary(modA) modB&lt;-Arima(wineindT_diff,order=c(1,0,0)) summary(modB)  #fitted values from modA A&lt;-forecast.Arima(modA,1)$fitted  #fitted from modB, setting initial value to the first value in the original series B&lt;-diffinv(forecast.Arima(modB,1)$fitted,xi=wineindT[1])   plot(A, col="red") lines(B, col="blue")   ADD:  Please note I am differencing the series once and fitting arima (1,0,0) then I am fitting arima (1,1,0) to the original series. I am (I think) reversing the differencing on the fitted values for the arima(1,0,0) on the differenced file.   I am comparing the fitted values - not the predictions.  Here is the plot (red is arima(1,1,0) and blue is the arima (1,0,0) on the differenced series after changing back to the original scale)  :    Response to Dr. Hyndman's Answer:  1) Can you illustrate in R code what I would need to do in order to get the two fitted values (and presumably forecasts) to match (allowing for small difference due to your first point in your answer) between Arima (1,1,0) and Arima(1,0,0) on the manually differenced series? I assume this has to do with the mean not being included in modA, but I am not entirely sure how to proceed.  2) Regarding your #3. I know I am missing the obvious, but are not $\hat{X}_t = X_{t-1} + \phi(X_{t-1}-X_{t-2}) $ and $\hat{Y}_t = \phi (X_{t-1}-X_{t-2})$ the same when $\hat{Y}_t$ is defined as $\hat{X}_t - X_{t-1}$? Are you saying I am "undifferencing" incorrectly? I can't solve this problem:  Suppose $f$ is polynomial function of even degree $n$ with always $f\geq0$.  Prove that $f+f'+f''+\cdots+f^{(n)}\geq 0$. The formal solution of the time-dependent Schrödinger equation Consider the time-dependent  (or some equation in Schrödinger form) written down as $$ \tag 1 i \partial_{0} \Psi ~=~ \hat{ H}~ \Psi . $$ Usually, one likes to write that it has a formal solution of the form $$ \tag 2 \Psi (t) ~=~ \exp\left[-i \int \limits_{0}^{t} \hat{ H}(t^{\prime}) ~\mathrm dt^{\prime}\right]\Psi (0). $$ However, this form for the solution of $(1)$ is actually built by the method of successive approximations which actually returns a solution of the form $$ \tag 3 \Psi (t) ~=~ \hat{\mathrm T} \exp\left[-i \int \limits_{0}^{t} \hat{H}(t^{\prime})~\mathrm  dt^{\prime}\right]\Psi (0), \qquad t&gt;0, $$ where $\hat{\mathrm T}$ is the time-ordering operator.  It seems that $(3)$ doesn't coincide with $(2)$, but formally $(2)$ seems to be perfectly fine: it satisfies $(1)$ and the initial conditions. So where is the mistake? Prove F test is equal to T test squared I need to show that F test is equal to T test squared, when the T test is for 2 independent groups and assuming variances are equal.  I know that $F=\frac{MSB}{MSW}=\frac{SSB/k-1}{SSW/N-K}$ and I know that $T=\frac{X-Y}{S_p \sqrt{\frac{1}{n}+\frac{1}{m}}}$,   so $T^2=\frac{(X-Y)^2}{S_p^2 ({\frac{1}{n}+\frac{1}{m}})}$  I've seen this proof in Regression but here we're not using MSE and MSR, so i'm not sure how to connect between the two. Although work and heat do the same thing (increase or decrease the internal energy of the system), There is still a fundamental difference between them. For example, The way in which entropy is defined is a very good way to differentiate between work and heat. But, why is there such a distinction between the two things? Is it the limitation of Newtonian mechanics that it never accounted for something like heat which could also change the energy of the system? Is the word "Thermodynamical work" or "Hidden work" suitable for heat? Default currency symbol When we say something in specified operating system, which preposition should I use?  e.g.     I play games {in/on/under} Windows. On a systems level, I understand that as electrons are pushed into a wire, there is a net field and a net electron velocity.  And I've read that the net electron drift is slow.  But electricity travels through the wire, essentially at c, and I want to understand that mechanism.  My apologies if my question is poorly stated, I know bare bones undergraduate quantum theory circa 1990s but it doesn't explain the motion of electricity in detail.  Here's my conception, I'm hoping someone will fill in the holes, ha ha.  An electron moves into the wire.  It's got a kinetic energy.  After travelling a short distance, it spontaneously emits a photon, which hits another electron in a valence shell.  That electron then presumably does the same.  If this conception is simply wrong, please enlighten me.  The questions that arise:   Presumably at this level, electrons are acting more like waves and less like particles, but is there any classical component in the picture, ie are electrons coming in imparting other electrons with kinetic energy through repulsion, or does it not work that way? If electrons momentarily have energy, then pass it on by a photon, what determines when that photon is emitted, and what frequency it will be?  I assume that electrons in this cloud are not limited by any kind of exclusion principal, and that any frequencies are possible? Why should a photon emitted by an electron be in the direction of travel?  Conservation of momentum tells me that if an electron is moving, the photon should be emitted in that direction, slowing the electron, but could an electron emit a photon in the opposite direction?  If it did, I assume it would somehow have had to absorb energy from elsewhere? That sounds possible by analogy with quantum tunneling. What is the mechanism by which electrons propagating increase the temperature of the material?  Are they transmitting energy to the electrons in the valence shell, which tug at the nucleus, do some photons hit the nuclei directly, or is there some other way?  Presumably, electricity travels slower than light, because there is some time in each exchange, and some time when electrons are moving at sublight speeds before emitting a photon.  By how much is this slower than light, and what is the speed of each interaction? Why is AES unbreakable? How do I delete a board in Trello? It would help everyone if we provided a mechanism that people could use to flag their post if English is language they are not comfortably fluent in. A lot of non-English speakers have to go to English forums for tech support and find it embarrassing to ask questions in broken Englis.   Worse, people reading a post often cannot tell if a badly-worded post results from a poor English or just laziness and sloppiness on the part of a native English speaker. Personally, I will take the time to puzzle out a poorly-worded post if I know the author is struggling with English, but if I think they're just lazy and careless I won't bother.   A simple check box could flag the author as a non-English speaker and allow everyone to adjust accordingly.   Edit01:  Some answers below have accused me of being 'elitist'. I'm not sure where they got the idea that I was sneering down at anyone because their abilities at either English or coding. That was not my intent.   When I said I would not bother with post that appeared to incoherent owing to laziness or carelessness, I am not being elitist. I'm giving priority in my time budget to people who are respectful enough of my time to spend the their time writing as clear a question as their grasp of English and coding allows. Why should I spend time answering a careless and slapdash post when I could spend that time helping posters who took more of their time writing their questions?   I am perfectly willing to burn a lot of time helping someone struggling to write code in their non-native language. I have a hard enough time coding myself in English that I can't even imagine what a dog's breakfast I would make of it if I had to code in, say, Korean.    I have seen many instances in which questions have been downvoted when a quick glance at the poster's profile gives a strong hint they are not native English speakers. I would like a system that would spare those posters from being downvoted or ignored by using an interface element that clearly communicates in a standardized way whether the poster natively speaks English or not.   I don't see what's elitist about that.    Edit02:   (original unedited) I'm talking about:     Hy, I have a childe view that put it   self over other brother views. The   problem is that when i touch it the   brother also reacts at the touch   event. How can I disable touch   propagation on the underlieng brother   views?   I'm not even exactly sure what he is describing. I can guess that he has a sibling view that extends over its siblings but I'm not sure. If I edited it, I might not end up asking the same question the poster intended.   To answer the question, I will either have to (1) first ask for more detail and then keep checking back until I get it or (2) try to answer what I think the question is and possibly mangle it then have to come back and edit my answer all the while risking a downvote because I answered the wrong question.   I will take the time and the risk of down vote if the poster is not a native English speaker (or is a child) and the confusing question represents their honest best effort. If they're just being lazy, I have other people to help.   I would like a mechanism that would help me decide how to allocate my time and would protect the non-English speaking posters from unjust downvotes. What would you call someone who makes no lasting impression? $$\int x^3\sqrt{4-x^2}dx$$ I tried changing the expression like this: $$\int x^3\sqrt{2^2-x^2}dx=\int x^3\sqrt{(2-x)(2+x)}dx$$ And that's where I got stuck. I tried integration by parts but it doesn't simplify the expression. Left and right subscript / superscript I am trying to put two subscripts at the left and right of a character. For example, something like:  _{t} p_{x}  where p is in the middle. How do you do this? How many times can I repeat a keyword without looking spammy to Google? I have an eCommerce based on Opencart, but I have some doubts about how many times I can repeat the same word.  For example, the keyword is present in the title, description, h1, h2 and is repeated several times in the text:   Page Title: Shop Iphone other keyword Page description: Shop Iphone other keyword   (and they continue appearing below)   H1: Shop Iphone other keyword H2: Shop Iphone other keyword 10 more times in the text: Shop iPhone   I mean, if Googlebot sees the same WORD 30 times, can it be considered SPAM? Can I lose something or can I use keywords a lot?  In WOORANK I saw my review and I noticed that I need to improve my keywords, and a lot. I have some keywords like: payment, description, promotion, sales... keywords really "empty"  [ UPDATE ]  Can repeating keywords make them lose importance? Generalized mean value theorem I know and understand the mean value theorem. But at the moment I don't have the intuition to understand the generalized mean value theorem     If $f$ and $g$ are continuous on the closed interval $[a,b]$ and differentiable on the open interval $(a,b)$, then there exists a point $c\in(a,b)$ where$$[f(b)-f(a)]g'(c)=[g(b)-g(a)]f'(c).$$If $g'$ is never zero on $(a,b)$, then the conclusion can be stated as$$\frac{f'(c)}{g'(c)}=\frac{f(b)-f(a)}{g(b)-g(a)}.$$   What is the intuition? And how can you prove this (generally) ? View progress towards Announcer, Booster, and Publicist badges I shared a link to a question and now I am wondering whether I am almost going to get an announcer badge.  Can I somehow see which links I shared and how many clicks were on it for the last days?  Update:  Maybe this would be a nice feature. Next to any question you can see who has promoted it the most (number of fresh hits from a referer link) and also the amount of new ip's through search engine's and other referring sites.  Note the progress feature should include the Announcer, Booster, and Publicist badges.