While reading through a bash style guide I found the following guideline:  Math / Integer Manipulation Use ((...)) and $((...)).  a=5 b=4  # wrong if [[ $a -gt $b ]]; then     ... fi  # right if ((a &gt; b)); then     ... fi  When I inquired about the reasoning I was told that the [[ test could potentially choke trying to compare numbers with leading zeros.  In my testing I have not been able to recreate this issue. My Question  Is there actually a functional difference between ((a &gt; b)) and [[ &quot;$a&quot; -gt &quot;$b&quot; ]]?
In Bash, two integers can be compared using conditional expression     arg1 OP arg2      OP is one of -eq, -ne, -lt, -le, -gt, or -ge. These   arithmetic binary operators return true if arg1 is equal to, not equal   to, less than, less than or equal to, greater than, or greater than or   equal to arg2, respectively. Arg1 and arg2 may be positive or negative   integers.   or arithmetic expression:     &lt;= &gt;= &lt; &gt; comparison      == != equality and inequality   Why do we have two different ways for comparing two integers? When to use which?  For example, [[ 3 -lt 2 ]] uses conditional expression, and (( 3 &lt; 2 )) uses arithmetic expression. Both returns 0 when the comparison is true  When comparing two integers, can these two methods always be used interchangeably? If yes, why does Bash have two methods rather than one?
Which X-Men movies should I watch before Deadpool? I want to watch Deadpool, but I have heard the character has appeared in X-Men series too. My question is, if I watch X-Men before Deadpool, will it enhance my interest in the Deadpool character? Tracking down where disk space has gone on Linux? Evaluate $\lim_{n\to\infty} [{1\over kn}+{1\over k(n+1)}+{1\over k(n+2)}+\cdots+{1\over k(n+p-k)}]$ where $k<p$ There are four options. Which of them is correct?- (a)${p\over k}$ (b)${k\over p}$ (c)$\log({p\over k})$ (d)${\log p\over k}$ I somehow want to use the rule for evaluating this kind of sum using integration, i.e. $\int_{0}^{1} f(x) \ dx=\lim_{n\to\infty} {1\over n}\sum_{r=1}^{n}f({r\over n})$  But the given expression $\lim_{n\to\infty} [{1\over kn}+{1\over k(n+1)}+{1\over k(n+2)}+\cdots+{1\over k(n+p-k)}]={1\over k}\lim_{n\to\infty}{1\over n}\sum_{r=0}^{p-k}\frac{1}{1+{r\over n}}$, sum running from $0$ to $p-k$ instead of $n$. So, how to evaluate this limit? Thanks for assistance in advance. Integral ${\frac{1}{\pi^2}} \int_{0}^{\infty}\frac{{(\ln{x}})^2}{\sqrt{x}{(1-x)^2}} \mathrm d x$ Some issues with timezones in PHP have been in the back of my mind for a while now, and I was wondering if there are better ways to handle it than what I'm currently doing.  All of the issues revolve around reformating database stored dates:  When dealing with a site that has to support multiple timezones (for users), to normalize the timezone offest of stored timestamps I always store it with the server timezone using the CURRENT_TIMESTAMP attribute or the NOW() function.   This way I don't have to consider what timezone was set for PHP when the timestamp was entered (since PHP time functions are timezone aware). For each user, according to his preference I set the timezone somewhere in my bootstrap file using:  date_default_timezone_set($timezone);   When I'm looking to format dates with the php date() function, some form of conversion has to take place since MySQL currently stores timestamp in the format Y-m-d H:i:s. With no regard to timezone, you could simply run:  $date = date($format,strtotime($dbTimestamp));   The problem with this is that date() and strtotime() are both timezone aware functions, meaning that if the PHP timezone is set differently from the server timezone, the timezone offset will apply twice (instead of once as we would like).  To deal with this, I usually retrieve MySQL timestamps using the UNIX_TIMESTAMP() function which is not timezone aware, allowing my to apply date() directly on it - thereby applying the timezone offset only once.  I don't really like this 'hack' as I can no longer retrieve those columns as I normally would, or use * to fetch all columns (sometimes it simplifies queries greatly). Also, sometimes it's simply not an option to use UNIX_TIMESTAMP() (especially when using with open-source packages without much abstraction for query composition).  Another issue is when storing the timestamp, when usage of CURRENT_TIMESTAMP or NOW() is not an option - storing a PHP generated timestamp will store it with the timezone offset which I would like to avoid.  I'm probably missing something really basic here, but so far I haven't been able to come up with a generic solution to handle those issues so I'm forced to treat them case-by-case. Your thoughts are very welcome What does a binomial coefficient with commas mean? I'm reading through  paper (on Dyck Paths). Near the middle of the second page, the author states the following:     Remark For the set $h_n$ there are ${k\choose t_1, t_2, ... , t_m }$ $n + k \choose{k}$ $=$ $ n + k\choose {n, t_1, t_2, ..., t_m}$ different Dyck paths.   What does ${k\choose t_1, t_2, ... , t_m }$ mean? I know what the binomial coefficient is, but I'm not sure how to interpret it when one of the parameters is a set. right now when I connect to my VPN, my internet is served from my home router, but any requests for xxx.xxx.xxx.xxx i.e. my works ip range are served via the vpn connection I believe.  How can I force all traffic to the vpn? Why is torque not measured in Joules? Recently, I was doing my homework and I found out that Torque can be calculated using $\tau = rF$. This means the units of torque are Newton meters. Work &amp; Energy are also measured in Newton meters which are Joules.  However, torque isn't a measure of energy. I am really confused as why it isn't measured in Joules. Is there any way to keep a command from being added to your history? I have a command that I want to keep out of my history file, and I really don't care to have it there when I search the history stored in memory, though that's less of a concern. Is there any way to prevent this, or do I just have to go back and edit my history file.  update: I didn't realize this might be shell-specific. My shell is zsh. You're welcome to answer for other shells so people know how to do this in their shell. Search text within multiple pdfs and docs I got a bunch of notes written by other students, but they are from an old textbook that didn't deal with everything in the same order, so I need to search through the notes for every chapter (each individual chapter is in a different .pdf or .doc) for "trace conditioning" for example.  I used to use Google Desktop for this, I have Launchy now and I told it to search pdfs, but it only searches the titles, not the content.  Thanks for any help. How to solve ~(P → Q) : P & ~Q by natural deduction? I'm trying to solve the following by natural deduction:  ~(P → Q) : P &amp; ~Q  It's a trivial problem if identities are used, as can be seen by the following:   {1}      1.   ~(P → Q)                    Prem. {1}      2.   ~(~P ∨ Q)                   1 Mat. Impl. {1}      3.   ~~P & ~Q                    2 De Morgan's {1}      4.   P & ~Q                      3 DNE   Starting from step 2 of the previous proof, it's also fairly straightforward to reach a conclusion using natural deduction; i.e. starting from ~(~P ∨ Q), which is an identity of ~(P → Q):  ~(~P ∨ Q) :  P &amp; ~Q   {1}      1.   ~(~P ∨ Q)                   Prem. {2}      2.   ~P                          Assum. {2}      3.   ~P ∨ Q                      2 ∨I {1,2}    4.   ~(~P ∨ Q) & (~P ∨ Q)        1,3 &I {1}      5.   P                           2,4 RAA {6}      6.   Q                           Assum. {6}      7.   ~P ∨ Q                      6 ∨I {1,6}    8.   ~(~P ∨ Q) & (~P ∨ Q)        1,7 &I {1}      9.   ~Q                          6,8 RAA {1}      10.  P & ~Q                      5,9 &I   I also found that it's fairly easy to conclude ~Q:   {1}      1.   ~(P → Q)                    Prem. {2}      2.   Q                           Assum. {3}      3.   P                           Assum. {2,3}    4.   P & Q                       2,3 &I {2,3}    5.   Q                           4 &E {2}      6.   P → Q                       3,5 CP {1,2}    7.   ~(P → Q) & (P → Q)          1,6 &I {1}      8.   ~Q                          2,7 RAA ... {1,2}    12.  P & ~Q   In spite of how easy it looks, I can't figure out how to do it. I believe it can be done in 12 steps. Thanks! jquery mobile external panel not taking on styling Postgres: Reclaiming Space Given Newton's third law, why are things capable of moving? Stack Exchange doesn't allow me to answer protected questions because I gave away earned rep in bounties How do I set a featured image (thumbnail) by image URL when using wp_insert_post()? While looking through the , I noticed that there's no parameter in the array it requires which will allow me to set the 'Featured Image' for a post, displayed as the  in my theme.   I have looked into functions like , as suggested by Mr. Bennett, but this seems to be a relatively new addition to WordPress itself and the WordPress codex. As such, there aren't any sources that I can find which explain how the $thumbnail_id parameter should be acquired and supplied. If this really is the function to use, in what way could I provide it with a valid $thumbnail_id parameter when all I have is an image URL?  Thanks in advance! Why are we scared of singularities? I often hear people say that general relativity predicted its own demise because of the singularities it predicts. If I'm not mistaken, this is also a problem in QFT. I wonder why singularities garner so much hate. To me, it seems like negative or complex numbers: we used to hate these things but now they are more generally accepted. Why can't it be that nature just has singularities? We might not get it, we might not like it, but it may be so. What's wrong with this query: INSERT INTO Users( weight, desiredWeight ) VALUES ( 160, 145 ) WHERE id = 1;  It works without the WHERE clause. I've seemed to have forgot my SQL. Continuity of a convex function I'm trying to solve the following problem:  Let $f:K\rightarrow \mathbb{R} $, $f$ convex and $K \subseteq \mathbb{R}^n$ convex. Then $f$ is continuous on $K$.   I have proved the only case $n=1$, but for an arbitrary $n$?? How to copy the complete folder structure one location to another location include all files and sub folders I have folder structure like in Shared documents/East using CSOM and C# Main Folder   Folder1   Folder2      File1      File2  I have to copy all folders with files to Shared documents/West ....