I moved a part of my code to function and that stopped working. I don't understand why?  this code is working:  \begin{document} \makeatletter \immediate\write18{start cmd echo /k magick convert _SDC4828.jpg  -crop 50\@percentchar x100\@percentchar\space +repage _SDC4828.jpg} \makeatother \end{document}   This not working:  \newcommandx{\twosidepic}{ \makeatletter \immediate\write18{start cmd echo /k magick convert _SDC4828.jpg  -crop 50\@percentchar x100\@percentchar\space +repage _SDC4828.jpg} \makeatother }  \begin{document} \twosidepic \end{document}
After hours of banging my brain against my skull, I narrowed down an issue I'm having to the fact that \makeatletter doesn't work inside \newcommand. Commands that I call after \makeatletter are registered as undefined, as if \makeatletter didn't do anything.  Why is this the case?  In the example below, I define two commands. Calling one of them from the document body causes the undefined error, while the other doesn't.  \documentclass[11pt]{book} \usepackage{kvsetkeys}  \newcommand{\commandThatFails}{     \makeatletter \comma@parse{}{} \makeatother }  \makeatletter     \newcommand{\commandThatWorks}{         \comma@parse{}{}     } \makeatother  \begin{document}  Hi there.  \commandThatFails \commandThatWorks  \end{document}
How to reliably keep an SSH tunnel open? I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken.  If I could at least monitor the tunnel automatically, I could restart the tunnel when it hangs, but I haven't even figured a way of doing that.  Bonus points for the one who can tell me how to prevent my ssh connection from hanging, of course! Let the ring of fractions be denoted as $S^{-1}R$.       Proposition (from Robert Ash's textbook "Basic Abstract Algebra")      Define $f: R \rightarrow S^{-1}R$ by $f(a) = a/1$. Then f is a ring homomorphism. If S has no zero divisors then f is a monomorphism, and we say that R can be embedded in $S^{-1}R$. In particular:      (i) A commutative ring R cna be embedded in its complete (or *full) ring of fractions ($S^{-1}R$, where S consists of all non-divisors of zero in R).       (ii) An integral domain can be embedded in its quotient field.    Why does the proposition say "If S has no zero divisors..."? If S really had zero divisors, then this wouldn't even be properly defined, right? Because we would have a/0 for some a in R. Why did I apparently get +97 for joining a site? Don't worry! I got all my 100 reputation :) It just didn't appear that way...    The notification says +100, but why does it say +97 at the top?  Edit  I created an account on server fault, and this time it says +96. I assume it's because of the down votes on this question; however, I thought down votes aren't shown in the rep you gain. I want to write a query like this:  SELECT o.OrderId, MAX(o.NegotiatedPrice, o.SuggestedPrice) FROM Order o   But this isn't how the MAX function works, right?  It is an aggregate function so it expects a single parameter and then returns the MAX of all rows.     Does anyone know how to do it my way? I understand there has been so much on this topic but I am still confused. I get that if the person is the subject it is who and anything else is whom. However, I'm really struggling to work out this rule for the following sentence:     The scope of which his account of morality applies to is therefore restricted to those whom/who the ‘notion of justification to a being of that kind makes sense.’   Should it be who or whom? I can't work out the subject and object. Change font size of the verbatim environment I want to apply small fonts inside the Verbatim environment e.g.  {\small  \begin{Verbatim}  1   double x, y; 2   double z, w; 3   main(); 4   return 0;  \end{Verbatim}}   Before the command \small and after the closing braket } text has normal size, which is obvious but the font size should be small inside the brakets.     Why is this command not applied to the environment's contents? How can I install the Google Apps Package (Play Store, ...) on my Android device? Binomial confidence interval estimation - why is it not symmetric? I have used the following r code to estimate the confidence intervals of a binomial proportion because I understand that that substitutes for a "power calculation" when designing receiver operating characteristic curve designs looking at detection of diseases in a population.  n is 150, and the disease, we believe, is 25% prevalent in the population. I have calculated the values for 75% sensitivity and 90% specificity (because that's what people seem to do).      binom.test(c(29,9), p=0.75, alternative=c("t"), conf.level=0.95)      binom.test(c(100, 12), p=0.90, alternative=c("t"), conf.level=0.95)   I have also visited this site:    Which is a java page which calculates binomial confidence intervals, and it gives the same answer.  Anyway, after that lengthy set-up, I want to ask why the confidence intervals are not symmetric, e.g. sensitivity is      95 percent confidence interval:    0.5975876 0.8855583      sample estimate probability: 0.7631579    Sorry if this is a basic question, but everywhere I look seems to suggest that they will be symmetric, and a colleague of mine seems to think they will be too. Past Subjunctive vs Future Subjunctive form How to do this manually, not installing any tools? find command with regex quantifier e.g. {1,2} I have been trying to create a find command string that will find all files that end with a number 1-99 but exclude all others.  e.g. I want to find myfile1 myfile99 but not myfile456 and not myfilebackup  The regex I'm thinking of is myfile[1-9]{1,2} but I can't get this to work with find.  find . -regex '.*myfile[0-9]{1,2}' OR  find . -iname 'myfile[0-9]{1,2}'  From what I can see it's the {1,2} part that is not working.  (by the way can you use -name -regex interchangably?)  Any help appreciated. I am crawling some data using Apache Nutch and storing it on my USB Drive. The OS itself is Ubuntu Live Boot OS. But for every restart or shutdown I am losing my data. I also tried suspending my Ubuntu user still data was not visible when I reinserted my live USB.  Is there any way I can keep the data intact and does not loose and application settings installations when I do restart Ubuntu.  Used USB installer provided by pendrivelinux.com at Possible cardinality of power sets What cardinals can provably not occur as the cardinality of a power set? I know that $\mathbb N$ and natural numbers that are not powers of two are such cardinals. What else is out there? What does a leading zero do for a php int? The product of a normal and Rademacher variables, independent from each other Let $X\sim N(0,1)$ and let $Z$ be a random variable independent of $X$ such that:  \begin{equation} \Pr(Z=z) = \begin{cases} \frac{1}{2} &amp; \mbox{if $z = -1$ or $z=1$}, \\ \\ 0 &amp; \mbox{otherwise}. \end{cases} \end{equation}   Define $Y = ZX$. Show that $Y \sim N(0,1)$. Determine $\operatorname{Cor}(X,Y)$. Are $X$ and $Y$ independent?   Progress:  I'm basically stuck at the beginning. I got as far as $P(ZX &lt; y) = P(Z &lt; y/X)$, which I'm not even sure is correct. I'm also not clear on what it means by defining $Y = ZX$ - does it mean I need to state the probability density function or something? And how do I show that $Y \sim N(0,1)$? Is the convex hull of closed set in $\mathbb R^{n}$ is closed? Is convex hull of closed set in $\mathbb R^{n}$ closed? Logins with only HTTP - are they as insecure as I'm thinking? Recently I was thinking about how websites like gmail and amazon use HTTPS during the login process when accessing your account. This makes sense, obviously, since you're typing in your account username and password and you would want that to be secure. However, on Facebook, among countless other websites, their logins are done with simple HTTP. Doesn't that mean that my login name and password are completely unencrypted? Which, even worse, means that all those people who login to their facebooks (or similar sites) at a wifi hotspot in public are susceptible to anyone getting their credentials using a simple packet sniffer (or something similar)? Is it really that easy? Or am I misunderstanding internet security?  I'm a software engineer working on some web related stuff, and although at the current time I'm not too involved with the security aspect of our software, I knew I should probably know the answer to this question, since it's extremely fundamental to website security.  Thanks! Recursively list files with file names, folder names and permission When will L1 regularization work better than L2 and vice versa? Stop setInterval call in JavaScript