Read data separated with two colons in R
How to read a text file into GNU R with a multiple-byte separator?
Difference between a Structure and a Union Gradient borders What are some important applications of the Erdős-Szekeres Theorem? I'm far from being a physics expert and figured this would be a good place to ask a beginner question that has been confusing me for some time.  According to Galileo, two bodies of different masses, dropped from the same height, will touch the floor at the same time in the absence of air resistance.  BUT Newton's second law states that $a = F/m$, with $a$ the acceleration of a particle, $m$ its mass and $F$ the sum of forces applied to it.  I understand that acceleration represents a variation of velocity and velocity represents a variation of position. I don't comprehend why the mass, which is seemingly affecting the acceleration, does not affect the "time of impact".  Can someone explain this to me? I feel pretty dumb right now :) My questions is very simple. How can I set security setting for a PDF file created with PDFLatex?  I should set some password or print permissions, etc. I usually disconnect my cellphone from the charger some time after it's fully charged because I'm afraid the battery could lose capacity over time if I don't. However, I believe modern electronics should be able to handle this kind of scenario and automatically stop charging the battery once it's full. Does this apply to modern Android phones? Or do I need to continue disconnecting it all the time? Two spacecraft pilots travel at light speed, meet back on Earth in different era due to time dilation I've been looking for the name of a sci-fi romance book about space travel but haven't been successful so far. I came across it a few years ago, read the plot on its back cover but didn't read the book. It is about two spacecraft pilots, a man and a woman, who travelled at light speed (or maybe FTL, I can't remember) in separate ships. Every time they return to Earth, centuries have passed on Earth because of time dilation. They meet each other for a few times on Earth in different eras, but don't know when, if ever, they will meet again. I don't know how it ends.   If anyone knows which book I'm talking about, could you please tell me the name? Thanks a lot! Preface: Every couple of days there comes a question of this type, which is easy to solve with sed, but takes time to explain. I'm writing this question and answer, so I can later refer to this generic solution and only explain the adaption for the specific case. Feel free to contribute.  I have files with variable definitions. Variables consist of uppercase letters or underscore _ and their values follow after the :=. The values can contain other variables. This is Gnom.def:  NAME:=Gnom FULL_NAME:=$FIRST_NAME $NAME FIRST_NAME:=Sman STREET:=Mainstreet 42 TOWN:=Nowhere BIRTHDAY:=May 1st, 1999   Then there is another file form.txt with a template form:  $NAME Full name: $FULL_NAME Address: $STREET in $TOWN Birthday: $BIRTHDAY Don't be confused by $NAMES   Now I want a script which replaces the variables (marked with $ and the identifier) in the form by the definitions in the other file, recursively, if necessary, so I get this text back:  Gnom Full name: Sman Gnom Address: Mainstreet 42 in Nowhere Birthday: May 1st, 1999 Don't be confused by $NAMES   The last line is to ensure that no substrings of variables get replaced accidentally. Surjective morphism of affine varieties and dimension I'm trying to do the following exercise from the book An Invitation to Algebraic Geometry:     Show that if $X \to Y$ is a surjective morphism of affine algebraic varieties, then the dimension of $X$ is at least as large as the dimension of $Y$.   Could anyone give me a hint? I'm looking for a proof that avoids commutative algebra since it is not mentionned in the book at this point. Photoshop resize circularly Is there a way to do this circular resize of a pattern in photoshop (flat image) ? (I only want to resize the green disk, without changing the size of the interior white disk and without losing details of the green disk, just flatting them) Here's the very dumb way:  def divisorGenerator(n):     for i in xrange(1,n/2+1):         if n%i == 0: yield i     yield n   The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb :-)  I can find prime factors and their multiplicity fast enough.  I've an generator that generates factor in this way:  (factor1, multiplicity1) (factor2, multiplicity2) (factor3, multiplicity3) and so on...  i.e. the output of   for i in factorGenerator(100):     print i   is:  (2, 2) (5, 2)   I don't know how much is this useful for what I want to do (I coded it for other problems), anyway I'd like a smarter way to make  for i in divisorGen(100):     print i   output this:  1 2 4 5 10 20 25 50 100     UPDATE: Many thanks to Greg Hewgill and his "smart way" :) Calculating all divisors of 100000000 took 0.01s with his way against the 39s that the dumb way took on my machine, very cool :D  UPDATE 2: Stop saying this is a duplicate of  post. Calculating the number of divisor of a given number doesn't need to calculate all the divisors. It's a different problem, if you think it's not then look for "Divisor function" on wikipedia. Read the questions and the answer before posting, if you do not understand what is the topic just don't add not useful and already given answers. Error 404 : While using flag How do I check the Database type in a Rails Migration? What kind of substitution should I use to obtain the following integrals? $$\begin{align} \int_0^1 \ln \ln \left(\frac{1}{x}\right)\,dx &amp;=\int_0^\infty e^{-x} \ln x\,dx\tag1\\ &amp;=\int_0^\infty \left(\frac{1}{xe^x} - \frac{1}{e^x-1} \right)\,dx\tag2\\ &amp;=-\int_0^1 \left(\frac{1}{1-x} + \frac{1}{\ln x} \right)\,dx\tag3\\ &amp;=\int_0^\infty \left( e^{-x} - \frac{1}{1+x^k} \right)\,\frac{dx}{x},\qquad k&gt;0\tag4\\ \end{align}$$  This is not homework problems and I know that the above integrals equal to negative of the Euler–Mascheroni constant. I got these integrals while reading this Wikipedia page: . According to Wikipedia, the Euler–Mascheroni constant is defined as the limiting difference between the harmonic series and the natural logarithm: $$\gamma=\lim_{N\to\infty} \left(\sum_{k=1}^N \frac{1}{k} - \ln N\right)$$ but I don't know why can this definition be associated to the above integrals?  I can obtain the equation $(1)$ using substitution $t=\ln \left(\frac{1}{x}\right)\rightarrow x=e^{-t} \rightarrow dx=-e^{-t}\,dt$ and I know that $$\int_0^\infty e^{-x} \ln x\,dx=\Gamma'(1)=\Gamma(1)\psi(1)=-\gamma$$ but I can't obtain the rest. Any idea? Any help would be appreciated. Thanks in advance. Remove last character from line Influence of the scale factor on the projection I tried to use sudo cd name_of_dir but am getting the error message:   sudo: cd: command not found   Is there any other way to enter a directory owned by another user which has 700 permission? This might seem a stupid question but why do Ethernet cables have 8 wires? Cat5 cables were just using 4 of the 8 wires, so only 4 are actualy 'needed'. Why not 12 or 16 wires? If I would show someone a yellow object and ask them, "is this object yellow?" That person would say "yes".  But I could never know if my perception of the color yellow is the same as that other person's. Because he or she could actually be seeing, what I know to be the color green. But then tells me that its the color yellow because that has been taught to him or her from young age.  So how can you test if people are really seeing the same color?  Question closed and can now be found @ Scoping in assigning a derivative