I have this body: \begin{center}   \includegraphics[scale=0.8]{image.png}   \captionof{figure}{Image Caption} \end{center}  But I'd like to simplify it to: \mygraphics[scale=0.8]{image.png}{Image Caption}  with: \newcommand{\mygraphics}[2][???]{%   \begin{center}%     \includegraphics[???]{#1}%     \captionon{figure}{#2}%   \end{center}% }
I have made a command  \newcommand{\mysec}[2]{%  \textbf{#1} \\ #2 }   I use it with \mysec{A}{B}.  But sometimes I also want a third parameter. I could make a whole new command for those situations where I need 3 parameters. But I thought if I could handle it with an optional parameter in my original command?  So I have to check if the third parameter is set and how to print if it is set.
Can Mac App Store installs & upgrades be automated? How can I script installing or upgrading apps from the Mac App Store? I'd prefer command line tools, but AppleScript or some other API would suffice.  Relevant puzzle pieces:   installer: note especially the -store flag which is used to simulate App Store installs for package devs. systemupdate: capable of handling updates to Apple apps, flags -i installs and -a tells it to install all available updates Proving there are infinitely many pairs of square-full consecutive integers So the question goes like this :  A positive integer $n$ is called square-full if for every prime $p$, $p \, | \, n$ implies $p^2 \, | \, n$, i.e. every prime power factor of $n$ occurs at least at the second power. This is equivalent to saying that there is no prime $p$ such that $p \, \| \, n$.  Show that there are infinitely many consecutive pairs of square-full numbers, i.e. infinitely many $n$ such that $n$ and $n+1$ are square-full.  The context of the question highly suggests that this can be proved by induction and it is the solution that I am looking for. It is not a homework, just something that caught my attention because I couldn't find any natural answer to it... I hope I'm not missing something trivial!  I've tried assuming $n_1, n_2, \dots, n_k$ were the first $n_k$ integers such that $n_i$ and $n_i+1$ are square-full, and then generate some polynomial in those $2k$ integers to get a new couple $n_{k+1}$, $n_{k+1} + 1$ but after a few natural tries I got nothing good out of it. Any ideas? How do I determine the size of my array in C?   That is, the number of elements the array can hold? What is the quickest way to send some text from desktop\laptop to iPhone? I usually send emails to myself, but I wonder if there is a better way to share something quickly from my PC\laptop to iPhone. How do I animate time? If H is a subgroup of G ( | G:H |=n, n > 1), then how can you show that G has a factor group G/N which is isomorphic to a subgroup D of the symmetric group Sn with |D| > 1.  I've been looking at Cayley's Theorem but it's not specific to the factor groups. Adjust rounded rectangle radii without creating a new one in Photoshop C6 When I create new rounded rectangles, I see the radii and other information in the properties, but after I work on something else and go back to that layer, the information does not show. How do I adjust the radii of the rounded rectangles without deleting and creating a new one? Can I use lens brand X on interchangeable lens camera brand Y? du not accounting for space shown by df I have a CentOS 7.2 (minimal) VM running in a vSphere cluster, which has a 16G drive formatted as XFS under the default full-disk usage partitioning scheme from the CentOS installer. The system is running a test httpd service (all software from the default centos repos), but its space usage on disk is growing. This is in part from problematic apache error/access logs (2+GB in size), and removing these longs frees up some space. What is eating the drive space isn't so much a concern for me (I'll just nuke and pave this eventually). However, when I run df an du to check file sizes, I get a discrepancy and this is what's confusing.  First I run df -h to view filesystem usage:  [root@svrhttp03 httpd]# df -h Filesystem                         Size  Used Avail Use% Mounted on /dev/mapper/centos_svrhttp03-root   14G  4.8G  9.1G  35% / devtmpfs                           902M     0  902M   0% /dev tmpfs                              912M     0  912M   0% /dev/shm tmpfs                              912M   97M  816M  11% /run tmpfs                              912M     0  912M   0% /sys/fs/cgroup /dev/sda1                          497M  169M  329M  34% /boot tmpfs                              183M     0  183M   0% /run/user/0   This is showing 4.8G used on the root FS.  I then run the following to view the size of all items at the root of the filesystem:  [root@svrhttp03 httpd]# du -a -h -t 10K / 2&gt; /dev/null | grep -v -E "[A-Z,a-z,0-9]/." | sort -h 16K /home 7.4M    /root 31M /etc 97M /run 143M    /boot 324M    /var 1.3G    /usr 1.9G    /   This shows only 1.9G in use, and the reported size of all directories add up to ~1.9G, as expected.  So how can I find that ~2.9G discrepancy between what df and du are claiming for data on disk? What happens to net acceleration in a non-inertial reference frame with cenripetal force? In a non-inertial reference frame, the centripetal force is balanced by a centrifugal force. Therefore, shouldn't the net acceleration be zero? Yet, you still feel an acceleration outwards? Why is that? Merging banking and casual style in moderncv (2) I really like the solution given in  but what to do if I want to keep the footer information of the casual style from page 2 on? That is, with this solution, I can put the header as I want in the first page, but the footer disappears from the rest of the pages and I do not want that.  I want the header of the first page to look like this (with an empty footer):   And the footer from the second page on to look like this: Resizing point on zoom out I've added a point on map like this but it is static in size.   How to resize that point on zooming?  Map on zoom out To prove that $f_n(x) = \frac{nx}{1+n^2x^2}$ does not uniformly converge to $f(x) = 0$ on $[0,1]$ I have updated my kubuntu 14.10 to kubuntu 15.04. And now after boot, when I enter my password on welcome screen, I will get black screen. It's looks like screen powered off. No cursor, no change brightness. Nothing. And when I try switch to text consoles (Ctrl+Alt+F1) nothing happening. If I doesn't login in welcome screen I can switch to text console. Is Switching the Neutral OK? What’s the worst that can happen if i put a switch in the neutral instead of the phase?   I just found out that 3 light bulbs sockets in my home  are connected this way, it first came to my mind to fix it but then I recalled the flow of current from positive to negative is just a convention since the electrons are charged negatively and they actually flow from N to L so i cant really find an solid excuse to mess with the wiring for the next 2 hrs "C" sizeof with a type or variable How to fill a rectangular hole with an even amount of vertices on either side? I tried crating faces but it left missing edges. In the end I was left with all the right lines but there was no vertex in the center.    Here's a follow up image in case you're wondering what I mean. Notice how there's no vertex in the center. Prove $$\int _0^\infty f^2(x) dx \leq \frac{2}{3}\cdot  \max_{x \in \mathbb R^+} f(x) \cdot  \int _0^\infty f(x) dx$$ for $f(x) \geq 0$ and convex.   I know via Holder's we can get without the constant $\frac{2}{3}$ but that should also be true for $f$ not convex. I tried some approaches using convexity but didn't get the desired result.   A hint or reference would also help. Also, it would be interesting to know when equality holds. Correlation between a nominal (IV) and a continuous (DV) variable I have a nominal variable (different topics of conversation, coded as topic0=0 etc) and a number of scale variables (DV) such as the length of a conversation.   How can I derive correlations between the nominal and scale variables? self referential struct definition?