I just setup a cron to restart 'Thin' application server for my Ruby application every hour. I have tried every method but the cron is giving error saying command not found.  My script looks something like this  #!/bin/sh cd /var/www/myapp thin restart -C /etc/thin/myapp   (thinrunner is the name of the above bash script) crontab looks like this  0 * * * * /usr/local/bin/thinrunner   The error i get in email sent by crontab looks like this:  /usr/local/bin/thinrunner: 3: /usr/local/bin/thinrunner: thin: not found   I have also tried running it directly without creating a bash file but it says thin not found even then. I used the following to run directly  0 * * * * cd /var/www/myapp &amp;&amp; thin restart -C /etc/thin/myapp   I have already done chmod +x thinrunner and when i run the script directly, it works as expected. So what could i be doing wrong?   thanks
Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that:   wrong crontab notation permissions problem environment variables   This community wiki aims to aggregate the top reasons for crontab scripts not being executed as expected. Write each reason in a separate answer.  Please include one reason per answer - details about why it's not executed - and fix(es) for that one reason.  Please write only cron-specific issues, e.g. commands that execute as expected from the shell but execute erroneously by cron.
Bring all planes in mesh to same level I have added a plane in top view. I have then extruded the plane according to a floorplan in topview.  I don't know what happened, but when I switched my view, I could see that some parts of it are for some reason high up in the air.  I would like to ask how I can bring everything back down onto the grid / floor.  And if somebody could tell me how this might have happened, I would also be glad. Weighting features prior to SVM I'm building an object detector using HOG features and linear SVM. Some of the regions of the object are more "distinctive" so I would like to give more weight to the features extracted from those regions. (e.g. imagine we want to detect between mugs and glasses, then the most "distinctive" part is the mug's handle)  How could I do this? For sure there should be a more intelligent way than just replicating the features of those "distinctive" regions. If $f(x + y) = f(x) + f(y)$ showing that $f(cx) = cf(x)$ holds for rational $c$ For $f:\mathbb{R}^n \to \mathbb{R}^m$, if $f(x + y) = f(x) + f(y)$ for then for rational $c$, how would you show that $f(cx) = cf(x)$ holds?  I tried that for $c = \frac{a}{b}$, $a,b \in \mathbb{Z}$ clearly  $$ f\left(\frac{a}{b}x\right) = f\left(\frac{x}{b}+\dots+\frac{x}{b}\right) = af\left(\frac{x}{b}\right) $$ but I can't seem to finish it, any help? Quick edit not recorded as such blocking vote change A little background:  I do not know what the specifics are, but I've noticed that a quick edit after a post will often times not result in an edit being posted. It's as if there was no edit. Edit: According to Bart this amount of time is five minutes.  The problem:  A user made a really bad post (said that ~ in C# wrt integers was used for deconstruction). I down-voted said post. Post quickly disappeared (I guess poster realized they screwed up and took back the post). Later, I come back and see my down vote but the answer is now correct (that ~ is the bitwise complement operator). I try to get rid of my down vote because it is no longer appropriate. However, it has been about half an hour and there is no edit posted (presumably the poster made an edit within the non-posting edit window) so I can't take my vote back.  Suggested solution:  If post gets edited (even within the non-post edit window) mark all the votes as changeable. I would guess that this would either involve an update on a table of votes or adding a column for last edit time which is not bypassed by the grace period. I realize that this may be an entirely non-trivial change, but unless the non-posting of edits is somehow changed to make sure the edit was trivial it seems this is necessary. How to replace a string with a string containing slash with sed? I am looking for a way to replace a string in a file with a string that contains a slash by using sed.  connect="192.168.100.61/foo" srcText="foo.bar=XPLACEHOLDERX" echo $srcText | sed "s/XPLACEHOLDERX/$connect"   The result is:  sed: -e Expression #1, Character 32: Unknown option for `s' $f$ holomorphic on $D\setminus \{0\}$ and takes no values in $(-\infty,0],$ then $0$ removable If $f$ is holomorphic on $D\setminus \{0\}$ and takes no values in $(-\infty,0]$ then $0$ is a removable singularity.   I thought to prove this by elimination, but I can't really tell anything about the behavior of $f$ around $0$. How can one translate the information about the definition of $f$ in semi-open interval $(-\infty,0]$. Time travel film: character with male and female reproductive organs is taken back in time by a barman who turns out to be themselves I have had a friend give me a rough description of a film and I'm curious to find out what it actually is. I don't know very much. I understand this will be difficult, especially since every time my friend explains the tale it's different so this description is likely to contain some inaccuracies.  The film's plot begins with a recounting given by the main character, who had both male and female reproductive organs but had one set removed (not sure which, think male ones were removed). The main character is narrating this tale to the barman in a bar. The barman then takes the main character back in time, where they make love to themselves and produce a child.  The child, once born, is abandoned by the mother in the past - but the barman takes the child to the orphanage and leaves them there, ensuring their survival. Eventually it is revealed that the child was the main character themselves, and so was the barman.  In other words every major character introduced up to that point was the same person who had severely messed with their own timeline. Keyboard shortcut to minimize a window on Ubuntu 18.10 Probability distribution in the coupon collector's problem Can't run my hello world in C `find` with multiple `-name` and `-exec` executes only the last matches of `-name` If $xy + yz + zx = 1$, then show that      $$\dfrac{x}{1-x^2} + \dfrac{y}{1-y^2} + \dfrac{z}{1-z^2} = \dfrac{4xyz}{(1-x^2)(1-y^2)(1-z^2)}$$   I tried doing the sum algebraically, that is, by solving the LHS but, that method isn't really getting us anywhere.  Also, I found this sum in an a book on trigonometry. So how can I solve it with trigonometry? Prove directly from the definition of the Ito's integral I am trying to solve the exercises from the book Stochastic differential equations -An Introduction with applications by Bernt Oksendal and I am stuck on 1 question.  Prove directly from the definition of Ito's integral that   $$\int_0^t B_s^2 dB_s=\frac{1}{3}B_t^3-\int_0^t B_s ds$$  I have tried for a couple of hours but I simply cannot prove it . I would be grateful if somebody could help me out , even a hint would be very helpful php Replacing multiple spaces with a single space How do distributed transactions work (eg. MSDTC)? Using VHDL code to design a JK Flip Flop I'm using quartus II to design a JK Flip Flop. However, my results show unknown output. Why is it?  Intended design circuit:    VHDL code:  library IEEE;  use IEEE.STD_LOGIC_1164.ALL;  entity JKFlipFlopGate is     port(         J,K,Clk : in std_logic;             --JK Flip-Flop gate input 1 &amp; 2         Q,Qbar : out std_logic              --JK Flip-Flop gate output     ); end JKFlipFlopGate;  architecture result of JKFlipFlopGate is         signal out1,out2,out3,out4 : std_logic;  begin     out1    &lt;= NOT(J AND Clk AND out4);                      out2    &lt;= NOT(K AND Clk AND out3);      out3    &lt;= out1 NAND out4;     out4    &lt;= out2 NAND out3;      Q       &lt;= out3;     Qbar    &lt;= out4;     end result; Where can I find out about Stack Overflow history? I'd like to know how Stack Overflow and other sites started - which was first, who initiated it (OK, that's on the link below) and why, how the different sites evolved, how the rules evolved, etc.  Where can I find such information?  Of course, I know I can look at  for a brief overview but I'm wondering if there is info on this site, particularly more detailed.. Could someone explain to me what the collision of two photons would look like? Will they behave like,   Electromagnetic waves: they will interfere with each other and keep their wave nature Particles: they will bounce like classical balls   I assume that energy of that system is too small to make creation of pairs possible. Why does Perl's sprintf not round floating point numbers correctly? I'm trying to run the remove_doubles edit command on multiple selected objects. This is kinda what I got so far...  import bpy   class remDoubles(bpy.types.Operator):     """Remove Doubles on multiple objects"""     bl_label = "Remove Multiple Doubles"     bl_idname = "object.remove_doubles_multi"     bl_options = {'REGISTER', 'UNDO'}      @classmethod     def poll(cls, context):         return len(context.selected_objects) &gt; 0      def execute(self, context):          scene = bpy.context.scene         sel = context.selected_objects          for obj in sel:             scene.objects.active = obj              #do something here             print(obj.name)             bpy.ops.mesh.remove_doubles()          return {"FINISHED"}  myobject = remDoubles()  myobject.execute()   My knowledge about classes isn't too great, please help.  My code needs some work, it just errors out giving a  'TypeError: bpy_struct.new(type): expected a single argument'  But what i intend doing is run through each object applying the remove doubles command for each.