Need some help in fixing simple bash script below. What it does is to compare dates in epoch format using if else. The script does not work as I intended because it always goes to the first condition DEPLOY all the time.   Even if I set the deploymentDate variable to be greater than currentDate it still goes to the first condition.   Can anyone suggest on how to fix it?  #!/bin/bash  currentDate=$(date +s% )  deploymentDate=1513516201   if [ "$currentDate" &gt; "$deploymentDate" ]  then      XSL="DEPLOY"  else      XSL="DO NOT DEPLOY"  fi  echo $XSL    Output   DEPLOY
How can two dates be compared in a shell?  Here is an example of how I would like to use this, though it does not work as-is:  todate=2013-07-18 cond=2013-07-15  if [ $todate -ge $cond ]; then     break fi                              How can I achieve the desired result?
I was wondering if it is possible to get a link to a rigorous proof that  $$\displaystyle \lim_{n\to\infty} \left(1+\frac {x}{n}\right)^n=\exp x$$ Show that $3p^2=q^2$ implies $3|p$ and $3|q$ This is a problem from "" (specifically, exercise set 2 #9), which is one of my math texts. Please note that this isn't homework, but I would still appreciate hints rather than a complete answer.  The problem reads as follows:     If 3p2 = q2, where $p,q \in \mathbb{Z}$, show that 3 is a common divisor of p and q.   I am able to show that 3 divides q, simply by rearranging for p2 and showing that  $$p^2 \in \mathbb{Z} \Rightarrow q^2/3 \in \mathbb{Z} \Rightarrow 3|q$$  However, I'm not sure how to show that 3 divides p.    Edit:  Moron left a comment below in which I was prompted to apply the solution to this question as a proof of $\sqrt{3}$'s irrationality. Here's what I came up with...  [incorrect solution...]  ...is this correct?  Edit:  The correct solution is provided in the comments below by Bill Dubuque. Why didn't Snape keep or secure his copy of Advanced Potion-Making? Find the minimum value of $f(x,y,z)=\frac{x^2}{(x+y)(x+z)}+\frac{y^2}{(y+z)(y+x)}+\frac{z^2}{(z+x)(z+y)}$. Find the minimum value of $f(x,y,z)=\frac{x^2}{(x+y)(x+z)}+\frac{y^2}{(y+z)(y+x)}+\frac{z^2}{(z+x)(z+y)}$ for all notnegative value of $x,y,z$.  I think that minimum value is $\frac{3}{4}$ when $x=y=z$ but I have no prove. If $f:E\rightarrow S$ is an elliptic curve over a scheme $S$ (so $f$ is proper and smooth of relative dimension one with geometrically connected fibers of genus one, equipped with a section $0:S\rightarrow E$), then is the sheaf $\underline{\omega}_{E/S}:=f_*\Omega_{E/S}^1$ actually free of rank one? According to the statement of Grothendieck-Serre duality in Hida's book Geometric Modular Forms and Elliptic Curves, there should be a canonical isomorphism $\underline{\omega}_{E/S}\cong\mathcal{Hom}_{\mathscr{O}_S}(R^1f_*\mathscr{O}_E,\mathscr{O}_S)$, and the first result on elliptic curves in this book is that $R^1f_*\mathscr{O}_E\cong\mathscr{O}_S$. It's also not clear to me whether $S$ is being assumed (locally) Noetherian, but if that's necessary for Grothendieck-Serre duality to hold, then I'm fine with assuming it. I can't find another reference with a statement of Grothendieck-Serre duality in this generality which does not use the language of derived categories (which I unfortunately don't understand).  The reason I'm kind of skeptical about this is that in Hida's book, as well as in Katz-Mazur, it is said that $\underline{\omega}_{E/S}$ is invertible, so that an $\mathscr{O}_S$-basis $\omega$ for $\underline{\omega}_{E/S}$ can be found locally on $S$. If the invertible sheaf in question were really trivial then one would be able to choose a global $\mathscr{O}_S$-basis for $\underline{\omega}_{E/S}$, and there would be no reason to talk about doing so locally. Hida goes on to say that, choosing an $\mathscr{O}_S$-basis $\omega$ locally on $S$ allows one to regard $(\Omega_{E/S}^1,\omega)$ as a relative effective Cartier divisor in $E/S$, which also doesn't make complete sense to me because if we can only find $\omega$ locally, how are we getting a global section $\omega\in H^0(E,\Omega_{E/S}^1)=H^0(S,\underline{\omega}_{E/S})$ (unless $\underline{\omega}_{E/S}$ really is trivial)? I'm working in a C++ unmanaged project.  I need to know how can I take a string like this "some data to encrypt" and get a byte[] array which I'm gonna use as the source for Encrypt.  In C# I do    for (int i = 0; i &lt; text.Length; i++)     buffer[i] = (byte)text[i];   What I need to know is how to do the same but using unmanaged C++.  Thanks! java.lang.IllegalArgumentException: Invalid  in servlet mapping &lt;servlet&gt;     &lt;servlet-name&gt;myservlet&lt;/servlet-name&gt;     &lt;servlet-class&gt;workflow.WDispatcher&lt;/servlet-class&gt;     &lt;load-on-startup&gt;2&lt;/load-on-startup&gt; &lt;/servlet&gt;  &lt;servlet-mapping&gt;     &lt;servlet-name&gt;myservlet&lt;/servlet-name&gt;     &lt;url-pattern&gt;*NEXTEVENT*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt;   Above is the snippet from Tomcat's web.xml. The URL pattern *NEXTEVENT* on start up throws     java.lang.IllegalArgumentException: Invalid &lt;url-pattern> in servlet mapping   It will be greatly appreciated if someone can hint at the error. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ Reading order for Dragonlance? Are there cheap GPS or other navigator devices with downloadable maps for the whole world? I don't need a recommendation or a list but my knowledge of GPS and "navi"s and the differences between them is an utter mystery to me.  But often I'm lost in backstreets in random countries where access to something like a live Google Maps would be awesome. I absolutely cannot afford a smartphone with worldwide roaming though.  Can GPS's do what I want or am I barking up the wrong tree? If they can is it only high end ones than can? How to prove $\text{Rank}(AB)\leq \min(\text{Rank}(A), \text{Rank}(B))$? Is symmetric group on natural numbers countable? Proof that $\inf A = -\sup(-A)$ Does Wolfram Mathworld make a mistake describing a discrete probability distribution with a probability density function? Stop Edit/Rollback Wars: Limit Number Of Edits/Rollbacks Per User Per Post Per Day I came up with an idea for how to begin putting an end to the edit/rollback wars and then the ensuing comments battle...   What if you are only allowed to edit a post (not the author) once a day. What if you are also only allowed to rollback one edit to your post a day. There would not be a overall limit on the users ability to edit other posts other than the one edit per post per day. There would also not be a limit on the number of times a single post could be edited or rolledback (multiple users), but each edit/rollback would trigger the 24 hour wait... There is currently some threshold in place that allows a post to be edited after it is posted without calling it an edit.  This same threshold could apply to the edit in case a mistake is made (fat fingered, mis-tagged, etc.) which would allow the editor a window of time to correct a mistake before getting locked out.     If either the editor or rollerbacker feel that the current state of the post is not acceptable and they are out of mods for the day, then a moderator can get flagged through the current process. Is there an injective function $f :\mathbb{R}^2\rightarrow\mathbb{R}$?  I approached this problem from the perspective of $f^{-1}$, from which I showed there exists a surjective function $f^{-1}:\mathbb{R}\rightarrow\mathbb{R}^2$. Would this imply that there exists an injective function for the inverse mapping? By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant? Batch file to delete files older than N days Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?  As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and StartDate2 to EndDate2. Alternative to Photoshop or Paint.NET Why didn't the machine affect Bond in Spectre?