How shall I grep a multi-line pattern in a pdf file and in a text file?
How can I get the page numbers only of a pattern in a pdf file, regardless if the pattern is multiline?
Recursively delete empty directories in Windows How do we control web page caching, across all browsers? Where can I find delay/cancelation statistics for a given airline route? My flight got canceled yesterday and I am currently waiting for the delayed next flight.   Is there any website that keeps records of airlines being delayed/canceled? I would like to know my chances. I did find some sites through google (flightaware, flightstats), but they focus on us flights only and I am currently in the azores. Why can't I press the Install button when installing applications from unknown sources? I'm trying to sideload an application, as seen in the picture below.    I have allowed the installation of applications from unknown applied actions in settings, but I can't seem to press the install button. The cancel button works correctly and installing applications via adb install works correctly. What's the problem?  EDIT: For those who have this problem, using ChainFire's  will correct it because the app uses hardware compositing, and Android doesn't notice a "layer" on top of the current screen. Add chat rooms for Android app Being able to join chat rooms from the Android app would be a plus! It would truly make us connected on the go, instead of having to sit down at our desks and open a browser window. This will allow more users to fully utilize the chat system and join events no matter where they are. New tab in chromium is empty Image with axis Finding $ \int^1_0 \frac{\ln(1+x)}{x}dx$ I've discovered a new pattern.  Is this pattern well known or what is the opinion about it?  Basically, I have a hard time scrubbing up and down source files to figure out what module imports are available and so forth, so now, instead of  import foo from bar.baz import quux  def myFunction():     foo.this.that(quux)   I move all my imports into the function where they're actually used., like this:  def myFunction():     import foo     from bar.baz import quux      foo.this.that(quux)   This does a few things.  First, I rarely accidentally pollute my modules with the contents of other modules.  I could set the __all__ variable for the module, but then I'd have to update it as the module evolves, and that doesn't help the namespace pollution for code that actually lives in the module.  Second, I rarely end up with a litany of imports at the top of my modules, half or more of which I no longer need because I've refactored it.  Finally, I find this pattern MUCH easier to read, since every referenced name is right there in the function body. How to reverse PCA and reconstruct original variables from several principal components? Principal component analysis (PCA) can be used for dimensionality reduction. After such dimensionality reduction is performed, how can one approximately reconstruct the original variables/features from a small number of principal components?  Alternatively, how can one remove or discard several principal components from the data?  In other words, how to reverse PCA?    Given that PCA is closely related to singular value decomposition (SVD), the same question can be asked as follows: how to reverse SVD? In a semiconductor memory chip, each bit of binary data is stored in a tiny circuit called a memory cell consisting of one to several transistors. Volatile type.   Suppose an application stored its data in a particular segment on the computers RAM.  How would the CPU know what data to extract and how would it sort through the other data to get to it. If everything in its core level is 0 or 1 its hard to distinguish what purpose 'x' memory has. Evaluating $\zeta(0)$ using the functional equation of Riemann-Zeta function. $$\zeta(it)=2it\pi it−1\sin(i\pi t/2)\Gamma(1−it)\zeta(1−it).$$ Everything on the RHS is never zero,  Does that means LHS has no zeros, since $\sin(s)$ has a simple zero at $s=0$ while $\zeta(1−s)$ has a simple pole at $s=0$  (the Laurent expansion), so the product $\sin(i\pi t/2)\zeta(1−it)$ is finite and nonzero at $t=0$.  My question is that from functional equation one can't get direct answer $\zeta(0)=−1/2$ unless using alternate infinite series ! Does $\sum_{k=1}^\infty\frac1{k^n}$ converge for $\Re(n)=1,\Im(n)\ne0$?  The ratio test is inconclusive.  It passes the term test for $\Re(n)=1$, but this is not sufficient to prove convergence.  Since we are dealing with so many complex numbers, I do not know of any convergence tests for this.  I know that if it is convergent, it is conditionally convergent. Is there any hint of of the first Wizarding War being an international event? Why does chmod succeed on a file when the user does not have write permission on parent directory? I am trying to understand file/dir permissions in Linux.  A user can list the files in a directory using   cd test ls -l    Even if the user issuing above commands does not have read, write or execute permission on any of the files inside the test directory, still he can list them because he/she has read permissions on the test directory.   Then why in the following scenario user B can change permissions of a file he owns but does not have write permissions of the parent directory?  User A, makes a test directory and gives other users ability to write in it:  mkdir test chmod o+w test   User B, creates a file in test folder.  cd test touch b.txt   User A removes write permission of others from the directory  chmod o-w test   User B, can successfully change permissions, even though permissions are part of directory and this user does not have write permission on the parent directory of the file he owns  chmod g-r b.txt   why does chmod not fail since the user cannot modify the directory which has the file information - permissions etc? What is the proper way to explain the twin paradox? The paradox in the  is that the situation appears symmetrical so each twin should think the other has aged less, which is of course impossible.  There are a thousand explanations out there for why this doesn't happen, but they all end up saying something vague like it's because one twin is accelerating or you need general relativity to understand it.  Please will someone give a simple and definitive explanation for why both twins agree on which twin is younger when they meet for the second time? In the Wikipedia article , it says     After Newtonian gravitation was found to be inconsistent with special relativity, . . .   I don't see how Newtonian gravitation itself is inconsistent with special relativity.  After all, Newton's Universal Law of Gravitation is completley analogous to Coulomb's Law, so it would seem that, if there were an analogous "gravitational magnetic field", one could formulate a theory of gravitation in exact analogy with Maxwell's Theory of Electromagnetism, and of course, this would automatically be consistent with Special Relativity.  What about this approach to gravitation does not work?  The only problem I could see with this is the lack of evidence for a "gravitational magnetic field".  That being said, gravity is "weak" as it is, and my guess is that it would be extremely difficult to set up an experiment in which a massive body were moving fast enough for this "magnetic field effect" to be obsevable.  EDIT:  As has been pointed out to me in the answers, Newton itself is inconsistent with SR.  Similarly, however, so is Coulomb's Law, yet, electromagnetism is still consistent with SR.  Thus, how do we know that it is not the case that Newton's Law is the special "static" case of a more general gravitomagnetic theory exactly analogous to Maxwell's Theory:  Let $\mathbf{G}$ be the gravitation field, let $\rho$ be the mass density, and $\mathbf{J}$ be the mass current density, let $\gamma _0$ be defined so that $\frac{1}{4\pi \gamma _0}=G$, the Universal Gravitation Constant, let $\nu _0$ be defined so that $\frac{1}{\sqrt{\gamma _0\nu _0}}=c$, and suppose there exists a field $\mathbf{M}$, the gravitomagnetic field, so that the following equations hold: $$ \vec{\nabla}\cdot \mathbf{G}=-\frac{\rho}{\gamma _0} $$ $$ \vec{\nabla}\cdot \mathbf{M}=0 $$ $$ \vec{\nabla}\times \mathbf{G}=-\frac{\partial \mathbf{M}}{\partial t} $$ $$ \vec{\nabla}\times \mathbf{M}=\nu _0\mathbf{J}+\gamma _0\nu _0\frac{\partial \mathbf{G}}{\partial t} $$ where theses fields would produce on a mass $m$ moving with velocity $\mathbf{v}$ in our inertial frame the Lorentz force $\mathbf{F}=m\left( \mathbf{G}+\mathbf{v}\times \mathbf{M}\right)$.  This theory would automatically be consistent with SR and would reduce to Newton's Law of Gravitation for the case of gravitostatics:  $\frac{\partial \mathbf{G}}{\partial t}=\frac{\partial \mathbf{M}}{\partial t}=\mathbf{J}=0$.  (To be clear, you can't just set the time derivatives equal to $\mathbf{0}$ as it seems I have done.  Upon doing so, you obtain the corresponding static theory, which is technically incorrect (as you can easily see because it won't be relativistically invariant), but is nevertheless often a useful approximation.)  My question can thus be phrased as:  without appealing directly to GR, what is wrong with this theory? Minimum value of $ f(x,y,z)=\left(x+\frac{1}{y}\right)^2+\left(y+\frac{1}{z}\right)^2+\left(z+\frac{1}{x}\right)^2. $ If $x&gt;0$, $y&gt;0$, $z&gt;0$ and $x+y+z=6$ then find the minimum value of    $$ f(x,y,z)=\left(x+\frac{1}{y}\right)^2+\left(y+\frac{1}{z}\right)^2+\left(z+\frac{1}{x}\right)^2. $$   Thanks in advance. 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? Exists a dedicated non-O(n²) Algorithm for avoiding to have overlapping elements? I am generating positions in a random fashion.  In the game world, instantiated elements have a radius, and shouldn't overlap.  The problem is that they will overlap because I use a usual random number generator combined with other fanciness. I can't use other random number generation algorithms where I can guarantee that the elements will never overlap.  A way to solve this is to use a spatial data structure and search for the nearest neighbors in that tree. When I insert an element into that tree, I update it accordingly.  This solution would do the work and it would be fast but my question is:  Is there a dedicated algorithm without that Tree implementation complexity which is faster than O(n²)?