I can include pdf documents as they are in the common pdf document, but I cannot do it with common page numbering in the top right corner.  The following fancyhdr does not have any effect on have page numbering on the top of pdf documents.  It would be great if the page numbering would be on top of pdf documents because they are just articles where plenty of space there.  Code proposed based on the thread  about base document  \documentclass{article} \usepackage{pdfpages}  % https://tex.stackexchange.com/q/56316/13173 \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[R]{\thepage}  \renewcommand{\headrulewidth}{0pt} % Werner, remove top margin border  \begin{document} \includepdf[pagecommand=\thispagestyle{plain}]{sforzo.pdf} \includepdf[pagecommand=\thispagestyle{plain}]{testData.pdf} \includepdf[pagecommand=\thispagestyle{plain}]{sforzo.pdf} \end{document}   Fig. 1 Output with pagestyle{plain} where you see that the approach decreases the size of the page,  Fig. 2 Output with pagestyle{fancy} and renewcommand     The fancy pagestyle looks better, but I would still like to maintain  the page size.  The following Werner's proposal stays in loop and never ends, so I cannot get any output with it  \let\oldincludepdf\includepdf \renewcommand{\includepdf}[2][]{\oldincludepdf[pagecommand=\‌​thispagestyle{fancy}‌​,#1]{#2}}   Werner's correct answer  \usepackage{letltxmacro} \LetLtxMacro\oldincludepdf\includepdf \renewcommand{\includepdf}[2][]{\oldincludepdf[pagecommand={‌​\thispagestyle{fancy‌​}},#1]{#2}}   Output without decreasing the page size    TeXLive 2016 OS: Debian 8.5
I'm writing a report, in LaTeX. And I need to include, as appendices, other latex documents I have written. I am currently doing this using pdfpages and it works. However, the inserted PDF has no page numbers and it overlays my base documents page numbering, resulting in no page numbers on the PDF pages. My questions:   How to solve the above problem. Is there a better way to do this.
How do you determine the winner of a hand? In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2&clubs; and 3&clubs;   Bob has 4&clubs; and 5&clubs;   On the board are 6&clubs;, 8&clubs;, 10&clubs;, 2&hearts;, 5&diams;   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer. A geometric reason why the square of the focal length of a hyperbola is equal to the sum of the squares of the axes? When I teach conics, I give a simple geometric argument for the Pythagorean relation for ellipses. (By "Pythagorean relation" I mean the fact that the square of the focal length $c$ is the difference of the squares of the semimajor and semiminor axes, i.e. $c^2=|a^2-b^2|$ for the ellipse defined by $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$.) The picture argument goes as follows: just draw the obvious isosceles triangle from the two foci to one of the two points at the end of the minor axis. We see two right triangles; in each, one leg is the focal length $c$ and the other leg is the semiminor axis, while the hypotenuse is the semimajor axis. The result follows from the Pythagorean theorem applied to this right triangle.  But when it comes to the Pythagorean relation for hyperbolas, I can't think of an equally convincing picture to draw. Instead I have to give a rather inelegant algebraic argument for the relation $c^2=a^2+b^2$ (for the hyperbola defined by $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$, with focal length $c$), directly from the definition of the hyperbola. The messy details are below.*  Now, obviously there is an asymmetry between the argument for the ellipse and the argument for the hyperbola: the ellipse argument is almost trivial and doesn't involve working straight from the locus definition, but the hyperbola argument is tedious and does require working straight from the definition. So, my question:     Is there an equally persuasive picture I could draw to convince high   school students of the Pythagorean relation for hyperbolas -- without having to get technical with points at infinity, say?   The natural triangle to draw is the right triangle with legs from the center to a vertex and from that vertex to an asymptote, which has legs of length $a$ and $b$; but then the problem becomes why the length along the asymptote should be equal to $c$. I doubt there is a purely (Euclidean) geometrical reason because this triangle lies on the asymptote, not on the hyperbola itself; I suspect some sort of limiting procedure will be required.    [*] The tedious algebraic details:     The foci lie at $(\pm c,0)$.   Say $a&gt;b$. Then hyperbola is the locus of points $(x,y)$ such that       $$\left|\sqrt{(x+c)^2+y^2}-\sqrt{(x-c)^2+y^2}\right|=2a$$      Assume for simplicity the expression between the absolute value bars   is positive. (The algebra is even more tedious if we don't make such a   simplifying assumption.) Then moving the right root to the other side   and squaring gives      $$(x+c)^2+y^2=4a^2+(x-c)^2+y^2+4a\sqrt{(x-c)^2+y^2}$$      Simplifying gives      $$xc-a^2=a\sqrt{(x-c)^2+y^2}$$      and upon squaring again we have      $$x^2c^2-2xca^2+a^4=a^2(x^2-2xc+c^2+y^2)=a^2x^2-2xca^2+c^2a^2+a^2y^2$$      which reduces to      $$x^2(c^2-a^2)-y^2a^2=a^2(c^2-a^2)$$      Defining $b^2:=c^2-a^2$ brings the equation into the form   $x^2/a^2+y^2/b^2=1$, and the Pythagorean relation follows from the   definition of $b$. In a custom lightning component where one is using the recordEditForm tag, how can one validate fields that are filled by the user?  For example, in a quick action to create a Case record, we can have the following line inside the recordEditForm:  &lt;lightning:inputField aura:id="caseAccount" fieldName="AccountId"/&gt;   How can one enable or disable a button if certain fields are assigned by the user? Like if the account is specified, then a button on the component is enabled for the user.  Making the field required is not an option. How to switch window controls to the left (Gnome Shell)? Is there a way to the switch gnome-shell window buttons to the left? I've gotten so used to them being on the left that them being on the right has thrown me way off.  (gnome shell has them defaulted to the right corner) Example of the equality of an inequality This question is related to Daniel Fischer's answer . Suppose $f$ is a real $C^{1}$ function on $[0, 1]$ such that $f(0) = 0$ and $\int_{0}^{1}f'(x)^{2}\, dx \leq 1$. Then (essentially by Cauchy-Schwarz), we have $\left|\int_{0}^{1}f(x)\, dx\right| \leq 2/3$ as Daniel Fischer stated in his answer.  My question is: Is there an example of a function such that we have equality in $\left|\int_{0}^{1}f(x)\, dx\right| \leq 2/3$? I was thinking of maybe a smoothed version of a function which takes the value $0$ on $[0, 1/2)$ and $4/3$ on $(1/2, 1]$ but that seems complicated to construct, moreover, the derivative in some neighbourhood of $1/2$ might be hard to control. I got the Turkey e-visa several times with my schengen visa. In the e-visa form there is a condition      I have a round-trip ticket with Turkish Airlines, Pegasus Airlines,   Onur Air or Egypt Air.   What if I am traveling from another country to Turkey or using another airlines like Nile Air form Egypt? Uniform vs discrete Gaussian sampling in Ring learning with errors The Wikipedia article on  mentions two methods of sampling "small" polynomials namely uniform sampling and discrete Gaussian sampling. Uniform sampling is clearly the simplest, involving simply uniformly selecting the coefficients from the set of small coefficients, thereby guaranteeing they will be small. However, the articles mention that security proofs rely on discrete Gaussian sampling.  However, I have a bit of difficulty wrapping my head around    Why discrete Gaussian sampling would be better than uniform, security-wise?   I mean, usually uniform is preferable - it maximizes the entropy/information in each sample, making the outcome more unpredictable. I could understand it if the Gaussian sampling technique would somehow serve to avoid (at least with high probability) "weak" parts of the space of outcomes but I have found no information/justification that this is the case.  Another reason I can see why discrete Gaussian might be better is that there is, after all, a chance (albeit a small one) one would select a non-small coefficient, so the space of outcomes is actually larger. However, given that this probability of hitting this extra space is (by design) quite small but also that one would likely immediately reject such a sample (because the algorithm calls for a small polynomial), this seems to be irrelevant.  It is not because I am against discrete Gaussian sampling I just want to understand why it is more secure. Also, I want to understand if it really IS more secure or it is simply easier to prove security in that model. I would actually consider that very interesting if it is the case because it raises the question of why is it easier to prove the security under conditions that are intuitively worse (i.e. discrete Gaussian vs the intuitively better uniform case)? If it is so intuitively clear that uniform sampling is better, surely it must be possible to transform that intuition into a security proof of RWE also under uniform sampling. Otherwise, I would fear the intuition must with high likelihood be wrong or at least dubious. I'm an Indian National. I have a Type C Schengen Business Visa which is valid from 26-11-2015 to 26-11-2020. I received it when I intended to travel to Netherlands, although I have not used it.   When I applied for a spouse endorsement, the passport on which the visa is stamped was cancelled and a new passport was issued.  Now, I plan to travel to Italy on business from July 8th to 16th.    Can travel with the same visa in old passport, or should I cancel the existing visa and apply for a new one?  I contacted the Netherlands Embassy call center (not VFS Netherlands) which responded that I can use it without any issues. However, they have not confirmed it by email.   I asked about any immigration issues in Italy and was told me that, if I have a valid itinerary and invitation letter from the office, there should be no problem. I was also told that Italian immigration authorities are able to contact the Dutch, if necessary.   I emailed the Italian Embassy in Mumbai (visa.mumbai@esteri.it) and await its response. Suppose $G$ is a group and has exactly two nontrivial proper subgroups. Prove that $G$ is cyclic and $|G|=pq$ where p,q are distinct primes or $G$ is cyclic and $|G|=p^3$ where $p$ is a prime. Usually my tactic to show a group is cyclic is find an elements such that its order and order of the group are the same. But here I cannot do so because I have no informatio regarding order of elements. So I stuck. Can anyone help me? Possible Duplicate:             What is correct? The jury was divided or The jury were divided? I am told that the latter is accurate because all of the jury do not have the same opinion in the particular case. Then, how does the subject verb agreement fit in 'The jury is still out' ? I mean, 'The jury is out' would allude to a situation were the opinion on a matter is (are?) still divided. Sugar daddy wants my online banking login info to make deposits — is it a scam? How can I make calls related to a case display in its Chatter feed? I am using the Service Console in Lightning Experience, and using the Chatter Feed component on the Case layout to display updates to the Case.  If I use the "Log a Call" Quick Action from the Chatter publisher, these calls are displayed in the Chatter feed.  This is the desired behaviour.  However, if I insert a Log a Call record related to the Case any other way - e.g. using the Developer Console, or my CTI system's custom components - the call does not display in the feed.  If I query the record, it looks exactly the same as the record that is created with the Quick Action.  It just seems that the Chatter post is never made in this situation.  I have checked my Feed Tracking settings:   Task has Enable Feed Tracking and Subject checked Case has All Related Objects checked   How can I enable calls created with a custom component (part of a CTI system) to display in the case feed? Avoid trailing zeroes in printf() I keep stumbling on the format specifiers for the printf() family of functions.  What I want is to be able to print a double (or float) with a maximum given number of digits after the decimal point.  If I use:  printf("%1.3f", 359.01335); printf("%1.3f", 359.00999);   I get  359.013 359.010   Instead of the desired  359.013 359.01   Can anybody help me? Why does the atmosphere rotate along with the earth? I was reading somewhere about a really cheap way of travelling: using balloons to get ourselves away from the surface of the earth. The idea held that because the earth rotates, we should be able to land in a different place after some time. As we all know, this doesn't happen.  Someone said that the reason why this doesn't happen is because the atmosphere (air, clouds etc.) also revolves around the earth (with the same angular velocity as the earth's rotation). Since we are also part of the atmosphere, our position doesn't change relatively.  Well, I'm not convinced with that answer. Why does the atmosphere rotate along with earth?  Gravitational force is towards the centre of the earth, but I don't see how it's making the atmosphere rotate. Why didn't the rebels on Hoth use X-Wings to fight AT-ATs? do a good job explaining why the Imperial forces didn't have fighter protection for their ground force on Hoth.  But nothing there explains why the Rebels didn't use X-Wings to easily dispatch the AT-ATs and buy more time. They obviously had them available because they were sending them off with transports and some of these were obviously not sent until after "defending" the base (since a few of the pilots of the X-Wings were the Rogue Squadron pilots fighting in the Battle of Hoth).  This happens in the EU in the book  (in fact, the cover picture shows this scene) with great success and Wedge actually comments, on page 120:     Back then we were in airspeeders - undergunned and overmatched... Not the case this time [referring to being in X-Wings against AT-ATs instead of speeders on Hoth]   This indicates X-Wings can perform in cold conditions - there was snow in this environment as described by Corran Horn after he is shot down. The temperature difference between day-time on Hoth and here is unknown however.  Additionally, the X-Wings were able to destroy the AT-ATs with their laser cannons only - no grappling was required.  I suspect the answer is basically "because that would have been boring to watch on-screen" but it seems there may have been an actual in-universe reason outside of this. How to get keycodes for xmodmap? I'm trying to use xmodmap to remap Alt / Super keys on Dell L100 keyboard, and have trouble getting the keycodes.  For instance, using xev doesn't give me keycode for Alt   FocusOut event, serial 36, synthetic NO, window 0x4a00001,     mode NotifyGrab, detail NotifyAncestor  FocusIn event, serial 36, synthetic NO, window 0x4a00001,     mode NotifyUngrab, detail NotifyAncestor  KeymapNotify event, serial 36, synthetic NO, window 0x0,     keys:  122 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0               0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0      For Right Super key, xev and showkey give different keycodes -- 134 and 126 respectively.  What's going on with these keycodes?  I tried getting keycodes from showkey -k, and using xmodmap file below, but that gave a weird map which remapped b key:  clear Mod1 clear Control keycode 125 = Meta_L keycode 126 = Meta_R keycode 58 = Control_L keycode 56 = Control_L keycode 100 = Control_R add Control = Control_L Control_R add Mod1 = Meta_L Meta_R How do I pick a part that goes into a breadboard when I order it? I have just bought some 555 timers and they are timers for microelectronic circuits...could anyone tell me what I need to search for in order to get larger ones which will fit a breadboard? Thanks how can I reset a lost administrative password ,considering that Ubuntu and windows7 are both installed on the computer , considering also that "Boot up the machine,and after the BIOS screen, hold down the left Shift key." didn't logged me to any thing, just continue the loading of the system as normal?? I have the following code for my masterpage:  &lt;%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %&gt; &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server" style="position:relative"&gt;     &lt;title&gt;Masterpage&lt;/title&gt;     &lt;asp:ContentPlaceHolder id="head" runat="server"&gt;     &lt;/asp:ContentPlaceHolder&gt; &lt;/head&gt; &lt;body&gt;     &lt;form id="main" runat="server" style="position:relative"&gt;     &lt;div&gt;         &lt;asp:ContentPlaceHolder id="MainContent" runat="server"&gt;         &lt;/asp:ContentPlaceHolder&gt;     &lt;/div&gt;     &lt;/form&gt;     &lt;br style="clear:both" /&gt;     &lt;form id="footer" style="position:relative"&gt;     &lt;div&gt;         &lt;center style="font-size:small"&gt;Footer content&lt;/center&gt;     &lt;/div&gt;         &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;   My problem is that when the MainContent isn't filling up the page the footer is not at the bottom of the page. Is there a way to force the footer to stay on the bottom of the page if the main content isn't pushing it all the way down? When the main content is "big" enough it pushes the footer down with the content and displays on the bottom when scrolling down, but not if it is to small.  Anybody know how to fix this? Are there any examples of subspaces  of $\ell^{2}$ and $\ell^{\infty}$ which are not closed?