Undo last commit, but leave repository unchanged
How do I undo the most recent local commits in Git?
Dealing with multiple private DNS servers In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don't have name collision? For example:   foo.c:                         bar.c: static int foo = 1;            static int foo = 10; void fooTest() {               void barTest() {   static int bar = 2;            static int bar = 20;   foo++;                         foo++;   bar++;                         bar++;   printf("%d,%d", foo, bar);     printf("%d, %d", foo, bar); }                              }   If I compile both files and link it to a main that calls fooTest() and barTest repeatedly, the printf statements increment independently.  Makes sense since the foo and bar variables are local to the translation unit.  But where is the storage allocated?  To be clear, the assumption is that you have a toolchain that would output a file in ELF format.  Thus, I believe that there has to be some space reserved in the executable file for those static variables. For discussion purposes, lets assume we use the GCC toolchain. Proving the countability of algebraic numbers I am trying to prove that algebraic numbers are countably infinite, and I have a hint to use: after fixing the degree of the polynomial, consider summing the absolute values of its integer coefficients, and setting the sum less than or equal to $m$, for each $m \in \mathbb{N}$. I am also allowed to use the fact that every polynomial has a finite number of roots. I am not sure where to begin... Perhaps after fixing the degree of the polynomials, I could try enumerating them, and after proving countability of the set that contains the roots of all polynomials of a certain degree, I could state that the union of infinitely many ($\bigcup_{n=1}^{\infty}$, $n \in \mathbb{N}$) countably infinite sets is countable, and thus the algebraic numbers are countably infinite, too, but I am not sure if this is a good approach/how to enumerate the polynomials. Thanks! I am fairly sure that I understand the how Monte Carlo integration works but I am not understanding the formulation of how it is used to estimate Pi.  I am going by the procedure outlined in the 5th slide of this presentation   I understand the preliminary steps.  Pi is equal to 4 times the area of a quarter of the unit circle.  And the area of the top-right quarter of the unit circle centered at (0,0) is equivalent to the integral of the curve that is the top-right quarter of the unit circle in $0&lt;x&lt;1$ and $0&lt;y&lt;1$.    What I don't understand is how this integral is  $\iint I((x^2+y^2)&lt;1)P(x,y)dxdy$  where $P(x,y)$ is uniformly distributed in the unit square around the quarter circle (i.e. it is always equal to 1 if $0&lt;x&lt;1$ and $0&lt;y&lt;1$ and 0 otherwise).  So this would mean that  $I((x^2+y^2)&lt;1)P(x,y)$ is the function that is the top-right quadrant of the unit circle at $0&lt;x&lt;1$ and $0&lt;y&lt;1$ but I do not understand how this is true since the indicator function can only be 1 or 0.  I understand that it is probably written in this way to make Monte Carlo sampling easy (i.e. it is an expectation so just sample from $P(x,y)$ and get the average of the samples applied to $I((x^2+y^2)&lt;1)$) but it just does not make intuitive sense to me why that integral represents the area under that curve.  Could someone provide an intuitive explanation of this.  Maybe show how that integral was derived in a step-by-step way?  EDIT:  I was able to gain a better understanding by relating the expectation to an area.  I will explain it here in case it helps anyone.  First start with relating Pi to the area of the top-right quadrant of the unit circle  $\pi=4\times A_{tr}$  Then we place the top-right quadrant into the unit square.  And under a uniform distribution over the unit square, the area of the circle quadrant is proportional to the probability of obtaining a sample from it.  It follows that the following equality holds  $P(x^2+y^2&lt;1)=\frac{A_{tr}}{A_{square}}$  and $A_{square}=1$ so  $P(x^2+y^2&lt;1)=A_{tr}$  And substituting into the original equation  $\pi=4\times P(x^2+y^2&lt;1)$  and it is also true that $P(x^2+y^2&lt;1)=E[I(x^2+y^2&lt;1)]$ which is equal to the original double integral.  So I understood it by relating the area to a probability then relating that probability to an expectation that is equivalent to the integral.  Let me know if I have made any mistakes. JTable won't show column headers Embed vimeo video into the body field How to access a variable from another script in Unity c# If you shine a light away from the center of a Schwarzchild black hole, will it stay still? $$ A $$  Light is travelling away from the absolute center of the Schwarzchild black hole (i.e. none of that spinning/stretching field) at $\ C $, and so shouldn't $\ \Delta C$ need to be greater than $\ C $ in order for the light to collapse into the black hole, therefore violating the relativistic limit of $\ C $?    It seems like light would just 'hover' right in the center of a black hole then. Because if it goes away from it, the event horizon pulls it back, and if it goes into it, the velocity change must be greater than $\ C $ which violates general relativity; so technically there's no way for the light to move away, and so it would just be still.  The thing is that the light must move at the speed of light or general relativity doesn't work. It's massless... But in the center of a black hole, if the above is true (it can't move or escape), then it is not travelling at the speed of light. So it cannot be still.  It cannot be spinning in a constant orbit either, because that would require velocity in an outward angle. And it cannot move in an outwardly fashion, only in an inwardly one.  Is it spinning in an infinitely decaying spiral towards the center?  If so what happens to it if and when it reaches the direct and complete center, i.e. The case of it being 'shot' from the center.    $$ B $$  If you shot light at an angle towards a black hole, but not directly to the center of it  then that light from the outside will eventually become the same as the light that I said was shot from the center to the outside; because in both cases, they end up in an infinitely decaying spiral.    If so it would end up exactly like the light in the above paragraph, so then we need to figure out what happens to that light to figure this one out, or vice versa.    $$ C $$  If you shot light directly towards the center of a black hole it would have no spiral to decay into, so therefore it must stop at some point in the center of a black hole. If it stops though, it loses it's momentum and violates general relativity again because it's energy "disappears".    If so then it violates conservation laws. So I'm assuming this simply is not true.    Is the light travelling into a black hole somehow still travelling at the speed of light, in every direction possible where that direction keeps it facing towards the center?  If so, why is there not a point at which the only thing left for the light to do is stay still, since all other paths would increase the distance between it and the black hole's center, and therefore become Case A. And if there isn't, what would happen if there was?  Also, if it's a time and observation answer where it supposedly takes and infinite amount of time for C to hit the center, wouldn't it be the case that the black hole is 'eating' all of the available light in the universe and keeping it in stasis?  Also, what happens in a Kerr black hole then? Does it just rip the field of time/gravity at an angle such that the light would never get closer than the center? If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs? Any idea why the piece of code below does not add the script element to the DOM?  var code = "&lt;script&gt;&lt;/script&gt;"; $("#someElement").append(code); Try to do something vs. Try doing something Is there any differences between      Try to do   And     Try doing   Thank you in advence. In Python, how do I determine if an object is iterable? I sometimes browse erotic media files but I would like to avoid having them appear in files &amp; folders / recent. How can I do that?  The old "making .recently-used.xbel a folder" trick from 10.10 and older doesn't work any more.   Plus I'd prefer to turn off tracking only temporarily.  I also prefer not to use a separate user for this, as switching users sometimes isn't fast enough. Solution  Full solution for producing PDF/X compliant document can be found in MWE and answer to this question:   Adapted MWE and compilation method are taken from Leonid's answer to this question.  Please note that solution requires compilation with TeXLive 2015 (or later).  Original question  I am trying to compile my source with XeLaTeX to produce PDF/X-1a:2001 compliant document. Getting PDF/X-1a:2001 is possible with pdfx package (while using up-to-date TeX distribution), but only when document is compiled with pdflatex.  Since I am using OTF and TTF fonts in my document, I have to use XeLaTeX to compile it. This is MWE:  \documentclass{book} \usepackage[x-1a1]{pdfx} \begin{document} Some text \end{document}   When I try to compile this document with MiKTeX's 2.9 xelatex I get following error and compilation halts:  ! Undefined control sequence. l.111 \pdfminorversion                       =4 %  assumed for PDF/A ;  options may change this for...  ?    Is there any way to compile PDF/X-1a:2001 with XeLaTeX, either using pdfx or different package?  Ps. I used MiKTeX 2.9, because I don't want to update my TeX Live 2013/Debian distribution I normally use. With MiKTeX I get most recent version of pdfx package.  EDIT: Since it isn't obvious from Leonid's answer and is mentioned only in comments, please note that you need TeXLive 2015 in order for Leonid's answer to work fully. TeXLive 2013 (installed by your system's package manager) or MiKTeX 2.9 won't do the trick (this is true as of March 2016; it might change by the time you read this).    I also tried to compile this MWE with LuaLaTeX to see if this works. It didn't. I get following error:  ! Undefined control sequence. \pdfx@findUUID ... \pdfx@tmpstring {\pdfmdfivesum                                                    {#1}} \expandafter \pdfx@e... l.360 \pdfx@findUUID{\jobname.pdf}  ?   In the event version of LuaLaTeX matters: lualatex --version outputs  This is LuaTeX, Version beta-0.76.0-2013062821  (MiKTeX 2.9 64-bit) (rev 4627) Method defined as testMethod do not support web service callouts, test skipped I have been struggling with this error for a few days now. I get this error every time I try to run a test for a method that has an httpCallout. I followed the architecture from  , but to no avail. I thought it could be something I was messing up in my code, so I copied all three of the classes from the documentation, and I am still getting the error when I try to run the test. All of the classes are on Salesforce API 29. Has anyone run into this before? My employer didn't send me W-2 for December 2015. In fact, he told me that I wasn't on payroll for the two months(Dec/Jan) I worked for them so I am not sure whether he will be able to generate W-2 for me or not. I am wondering should I call IRS and inform them about the same, and probably they will call the employer? Or should I report my December 2015 earnings as Miscellaneous and report to IRS while filing taxes? Or what other options do I have? I am a non resident alien on F-1 Visa. My employer also has not paid me full salary as promised, which I am discussing with him.  Also, I got paid by check in January month for my December payment, so I am wondering does this apply for 2015 tax filing as I got paid in January 2016? Lightsabers are not made of light, nor have they anything to do with lasers (even if there are people who mistakenly refer to them as "laser swords").   Blaster bolts are also not lasers. They travel significantly slower than light, they travel even slower than ordinary bullets fired by gunpowder. (called slug throwers on the Star Wars universe)  Was there any use of lasers ever presented in the Star Wars universe, either as we use them today, or as weapons?  By laser I mean something which behaves like laser does, even if it's not called by that name in a movie or book. If something is called a laser (in the script or by fans) but clearly doesn't work like a laser (for example, it travels slowly, and in visible blocks) it doesn't count. this circuit is a occupancy light circuit i want to know the working of the transistor regarding base,collector and emitter in the transitor When are infinities okay? I'm a little confused about how to handle infinities in physics. On the one hand, I always here things like infinities are not physically tenable answers. GR can't answer anything about the origin of the universe because of singularities. Throw away the radial solution that gives an infinite potential when solving the Laplace equation in spherical coordinates. But then there are other times that the infinities are okay. For instance, it is usually okay to set the reference point for your potential at infinity. There are certain times in David Tong's quantum field theory lecture notes where he seems to almost to hand wave away infinities. So, philosophically, physically, and mathematically when are infinities okay, and when are they not okay? How to make DNS server propagate faster if you are a site owner?