What is the simplest way to have one PHP script execute a different PHP script and assign the value it returns to a variable?
Read echo'ed output from another PHP file
Page number position I am working on a long document in LaTeX with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right now on 1st pages of chapters, the page number is bottom-centered, on all other pages it's top-right).  I control the position of the page number with fancyhdr:  \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{\thepage} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0pt}   Also, I don't know if the problem is related but my chapters do not start from the top of the page. There is a white area, then comes chapter X, then a newline with the chapter line. What I also want is the chapter to start from the top of the page.  The main question here is how I can get the page number to always appear in the upper right corner, I mention the thing with the chapter title position only in case that might be related. How to add context menu item for files in general, in Windows? in order to add context menu for directories and explorer background, one can follow instructions .   To add context menu for specific file extensions, one can follow instructions   but I can't seem to find a way to add context menu items for all files? Why can I see the output of background processes? For example, when I type ping 8.8.8.8 &amp;, why can we see ping process working? And when I type find / -name '*test*' &amp; , it's also seen on monitor.  Why is that? Is it not really in background? My 3 years old doesn't tell me when he needs to use the bathroom My son is 3 years old and doesn't tell me when he needs to use the bathroom. It has been 5 months now that I took his diaper off him. I just do not know what I should do.  Should I put a diaper on him again?  I mean, is this normal? Please help. I get frustrated sometimes.  He doesn't want to potty at all! I did train him before but now that he understands, he doesn't want to go to potty. I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter. Switching baselayers as user zooms in to map in OpenLayers? Euler-Lagrange equation in curved spacetime: how to calculate $\partial \mathcal{L}/\partial(\nabla_\nu A_\mu)$? My problem is mostly with notation. When we apply the Euler-Lagrange equation to the Lagrangian scalar $$\mathcal{L}= -\frac{1}{4}F^{\mu\nu}F_{\mu\nu}$$ Where $$F_{\mu\nu} = \partial_\mu A_\nu -\partial_\nu A_\mu= \nabla_\mu A_\nu -\nabla_\nu A_\mu$$ and I start with $$\frac{\partial\mathcal{L}}{\partial A_\mu}=\nabla_\nu\left(\frac{\partial \mathcal{L}}{\partial(\nabla_\nu A_\mu)}\right).$$   Now I rewrite the lagrangian as $\mathcal{L} = -\frac{1}{4}g^{\mu\alpha}g^{ \nu\beta}(\nabla_\mu A_\nu-\nabla_\nu A_\mu)(\nabla_\alpha A_\beta-\nabla_\beta A_\alpha)$ $$\mathcal{L}= -\frac{1}{4}g^{\mu\alpha}g^{\nu\beta}\left[(\nabla_\mu A_\nu)(\nabla_\alpha A_\beta)-(\nabla_\mu A_\nu)(\nabla_\beta A_\alpha)-(\nabla_\nu A_\mu)(\nabla_\alpha A_\beta)+(\nabla_\nu A_\mu)(\nabla_\beta A_\alpha) \right]$$ My problem is calculating $\frac{\partial \mathcal{L}}{\partial(\nabla_\nu A_\mu)}$, how are the rules of partial derivatives generalised to covariant ones? Also, is $\frac{\partial\mathcal{L}}{\partial A_\mu}=0$, is that correct ? Most common C# bitwise operations on enums For the life of me, I can't remember how to set, delete, toggle or test a bit in a bitfield. Either I'm unsure or I mix them up because I rarely need these. So a "bit-cheat-sheet" would be nice to have.  For example:   flags = flags | FlagsEnum.Bit4;  // Set bit 4.   or  if ((flags &amp; FlagsEnum.Bit4)) == FlagsEnum.Bit4) // Is there a less verbose way?   Can you give examples of all the other common operations, preferably in C# syntax using a [Flags] enum? Prevent specific sites from being overrepresented in the hot questions list Some sites appear far more often in the hot questions list than other sites. I don't have any hard data on that, as that kind of data is just not publicly available, but I'm pretty sure my subjective impression on that is reasonably accurate.  Those sites don't appear more often because they are inherently more interesting, but because they have certain voting and answering patterns that favor them in the hot questions algorithm. I would argue that the goal of the hot questions list is to present questions from a large variety of SE sites to the whole network, and to show possibly interesting questions to users that would not have found them otherwise.   To achieve this goal, the spots in the hot questions list should be distributed among all SE sites. The algorithm should try to get a good sampling of all sites, and it should try to normalize the results for varying voting behaviour. At the moment, sites that intrinsically get more votes and more answers per question seem favored in the algorithm.  So I think one part of the algorithm should try to identify questions that get an unusally high amount of votes and views for that site, and give the smaller sites a chance this way.  I'm not sure on how exactly this weighting should be done, as a complete normalization would likely not work across the huge difference in scale for all the SE sites.  As a specific example that the current algorithm is broken I'll present . I don't think any site should occupy a third of the whole list.   Here's another instance where one site is overrepresented at the top of the list: The  spell says time stops for other creatures.  What all is affected by the spell? Is gravity affected? Air movement?  I know that the spell only does what it says, and nothing else, but just wondering.   In addition, is it saying that the other creatures are not affected by environmental effects and the like while time is stopped?  For instance, if a wind blew really hard at one of the creatures you're fighting, would it affect that foe while time stop is active? If you were to place a bear trap behind the person, and a hard wind blew enough to tip them, would they then fall over onto the bear trap and be damaged without the spell ending?  This is a very curious spell... How does a wizard or bard learn new spells? How can I automatically download lyrics in iTunes? Is there a way to automatically download lyrics in iTunes? The use of "exact same" I went for B1 U.S. Visa at the U.S. Embassy in Delhi.   Interviewer: *Good Morning*. Me: *Good Morning* Interviewer: *What is your designation?* Me: *I am a Software Engineer.* Interviewer: *What is the name of your company?* Me: *It is XXX (I replied).* Interviewer: *What is the name of your client?* Me: *It is YYY (I replied).* Interviewer: *Have you ever been to U.S. before?* Me: *NO* Interviewer: *Have you ever been abroad before?* Me: *NO*   At this point he rejected my Visa with letter mentioning 214 (b) as the reason. I don't know why he actually rejected it.  But, I have decent 2+ years of experience with my company. And, I was going on a business meeting with the client. I would have come back after 2 weeks.  I don't know if re applying will help. To be clear on this, I know what is the definition of an inner product space and some properties and theorems about them. What I am asking for is an intuition for this definition in the complex case. In the real case, the intuition (or at least one of them) is  geometric: The inner product of two vectors is the length of the projection of the first to the second scaled by the norms of both vectors so that it is symmetric (modulo some details). In particular I (and everybody else) think of "inner product zero" as geometric orthogonality and of orthonormal bases as, well, orthonormal bases and so on. The question is, what should I think about when working with complex (or should I say hermitian?) inner product spaces? what is the "meaning" of the complex number associated to two vectors called their inner product?  I will be happy to hear all kinds of answers. For example, what physical phenomena does it model or in what mathematical situations does in "naturally" appear. Answers that stress the "nice structure" resulting are also welcome, yet I feel that by itself  it is a bit unsatisfying. $ \lim_{x\to o} \frac{(1+x)^{\frac1x}-e+\frac{ex}{2}}{ex^2} $ $$ \lim_{x\to o} \frac{(1+x)^{\frac1x}-e+\frac{ex}{2}}{ex^2} $$   (can this be duplicate? I think not) I tried it using many methods  $1.$ Solve this conventionally taking $1^\infty$ form in no luck  $2.$ Did this, expand $ {(1+x)^{\frac1x}}$ using binomial theorem got $\frac13$ then grouped coefficients of $x^0$ and it cancelled with $e$ then took coefficient of $x$ cancelled with $\frac{ex}{2}$ and so on   very messy right ? at last I got $\frac13$ but that's not the expected answer!  I must have went wrong somewhere can anyone help me with this. Do I need a firewall for my desktop? I don't have a  router, but I mostly use my desktop for online shopping and torrenting. So, do I have to enable the firewall? I hope not, because I'm really dumb and I don't think I will be able to configure the firewall. How to determine a matching color code from a physical sample? I need to make a restaurant menu design that matches restaurant wallpapers. For some reason my client cannot get color codes used in wallpaper, but he provided me with a sample. (see below)    How can I get the correct color codes from the wallpaper? (someone mentioned that there are scanners for this purpose, but I could not find any information regarding that)  Let me know if this question should be in another site. Is 225.225.225.128 a valid subnet mask? Probability Math Question...? Bag A contains 3 white and 2 red balls. Bag B contains 6 white and 3 red balls. One of the two bags will be chosen at random, and then two balls will be drawn from that bag at random without replacement. What is the probability that the two balls drawn will the be the same color? Express your answer as a common fraction.