I am opening a pop up VF page as 'render as pdf'.I have created a button Save and on click on save i am closing the pop window and saving PDf to opportunity.  Issue  When i am saving the code when calling the savePdf method without rerender and oncomplete.Its saving the attachment and i am able to open the attachment in opportunity without issue.When i am using either using rerender or oncomplete i am able to save the attachment but it says ".'Failed to load document'"  Its been a week i am stuck please help.  &lt;apex:form&gt;   function myClose(){      self.close();     window.opener.location.href="/{!$CurrentPage.parameters.Id}";      //you could also use self.close();         }  &lt;apex:pageBlock mode="maindetail" id="thePb"&gt;          &lt;apex:pageBlockButtons &gt;         &lt;apex:commandButton value="Save to Opportunity" action="{!savePdf}" oncomplete="myClose();"  /&gt;        &lt;/apex:pageBlockButtons&gt;       &lt;apex:pageMessages /&gt;       &lt;iframe height="600px" id="Page" name="InvoicePDF" src="/apex/GenerateQuotePDF?id={!parentId}" width="100%"&gt;&lt;/iframe&gt;      &lt;/apex:pageBlock&gt;    &lt;/apex:form&gt;   Class  public void savePdf() {      PageReference pdf = Page.GenerateQuotePDF;     pdf.getParameters().put('id',parentId);      pdf.setRedirect(true);     // create the new attachment   Attachment attach = new Attachment();      // the contents of the attachment from the pdf     Blob body;          body = pdf.getContent();      attach.Body = body;     // add the user entered name     attach.Name = 'Opportunity'+ '.pdf';       attach.IsPrivate = false;     // attach the pdf to the account     attach.ParentId = parentId;     attach.ContentType = 'application/pdf';     insert attach;     }
I have created a VF page and used "render as pdf"  &lt;apex:commandButton value="Save to Opportunity" action="{!savePdf}"  /&gt;   Its working fine when i am using above line without rerender and oncomplete but when i am adding rerender or oncomplete it is not working.I am able to save the PDF in attachment folder but when i am trying to open its showing  "Unable to load document"  Even if i remove oncomplete and use Rerender then also its saving the attachment in Attachment object and when i view ,it is not loading and says "Unable to load document"      &lt;apex:commandButton value="Save to Opportunity" action="{!savePdf}"  oncomplete="myClose();"/&gt;   Javascript Code  function myClose(){      self.close();     window.opener.location.href="/{!$CurrentPage.parameters.Id}";  }   Class Code  public void savePdf() {      PageReference pdf = Page.GenerateQuotePDF;     pdf.getParameters().put('id',parentId);      Attachment attach = new Attachment();      Blob body;     body = pdf.getContent();     attach.Body = body;     attach.Name = 'Opportunity'+ '.pdf';       attach.IsPrivate = false;     attach.ParentId = parentId;     attach.ContentType = 'application/pdf';     insert attach;     }     Please help..
Proving bessel identity $[J_0(x)]^2 + 2[J_1(x)]^2 + 2[J_2(x)]^2 + \cdots = 1$ and $|J_0(x)|\le 1$ The generating function for a Bessel equation is:      $$g(x,t) = e^{(x/2)(t-1/t))}$$      Using the product $g(x,t)\cdot g(x,-t)$ show that:      a) $$[J_0(x)]^2 + 2[J_1(x)]^2 + 2[J_2(x)]^2 + \cdots = 1$$      and consequently:      b)      $$|J_0(x)|\le 1, \forall x$$      c) $$|J_n(x)| \le \frac{1}{\sqrt{2}}; n=1,2,3,\cdots$$   For a) I tried the product:  $$e^{(x/2)(t-1/t))}\cdot e^{(x/2)(-t+1/t))} = 1$$  I at least arrived at the right side of the equation. Since this generates the bessel functions, I should arrive at something related to $J_n$ in the left side. I know that  $$e^{(x/2)(t-1/t))} = \sum_{n=0\infty}^{\infty} J_n(x)t^n$$  $$e^{(x/2)(-t+1/t))} = \sum_{n=0\infty}^{\infty} J_n(x)(-t)^n$$  but it's not just a matter of multiplying coefficients from the two infinite series, right?  For $b$, I tried to use  but it's not as obvious  I have no idea how to deal with $c$, could somebody help me? I have a question on Holder space.Is the space $C^2(\mathbb{R}^n)$ embedded in $C^{1,\alpha}(\mathbb{R}^n)$? I think in the bounded domain case, this should be true. But what if in the case where the domain is not bounded? Thanks for any hint! Prove that $ S=\{0\}\cup\left(\bigcup_{n=0}^{\infty} \{\frac{1}{n}\}\right)$ is a compact set in $\mathbb{R}$, but $\bigcup_{n=0}^{\infty} \{\frac{1}{n}\}$ is not a compact set.   (Can we use definition of compact set for this problem? ) What is the difference between new/delete and malloc/free? What is the difference between new/delete and malloc/free?  Related (duplicate?): How to ensure only a single instance of my application runs? How to re-download Lion to create a VMWare Fusion 4 virtual machine? I have a MacBook with Lion installed.  I bought VMWare Fusion 4 because I want to create a Lion VM.  As far as I can tell I need to point VMWare to the Lion installer that is downloaded from the App Store, but that file deleted itself after Lion was installed.  How do I re-download the Lion installer (and keep it around) to create a VMWare Fusion 4 virtual machine? How do I identify the C terminal on my HVAC? How do I identify the C terminal on an HVAC, furnace, or boiler? If the terminals don't have a screw labeled C what should I look for on the wiring diagram? What steps should I take if a wiring diagram cannot be found or if it indicates that a C terminal doesn't exist?  Note: This is an extension to  which asks about running the wires through the wall. This question is about where to connect the wire at the HVAC. What are the options for player characters to create traps? I tried to open the door. I tried opening the door   We can use both infinitive and gerund with verb "try" as used in above sentences. Does it change the meaning of the  sentence if use gerund or infinitive?.(here i don't know if the meaning of sentences is changed.)     The same confusion arise in these two sentences.  1.I stopped seeing him. 2. I stopped to see him.(But in case of these two sentence i know the meaning is changed but don't know exactly what the change is). When trying to mount an exfat filesystem, I get the following error:  Error mounting /dev/sda6 at /media/gkp/Backup: Command-line  `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda6" "/media/gkp/Backup"'  exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'   Exfat is used on some USB sticks and camera sd cards. What can I do to mount this type of filesystem? How do I "replay" the "Caveats" section from a homebrew recipe What is the fastest way to parse & split XML content with huge file size (800MB UP) into several xml files in Java Do you pluralize the singular possessions of / items or people associated with individual members of a plural group? In a situation where say a group (or at least a plurality) of men is being addressed — for example on a sign passed by many married men — which is correct?  &quot;Remind your wife.&quot;  or  &quot;Remind your wives.&quot; MLE for Poisson-binomial distribution I am looking for the maximum likelihood estimator (MLE) for the .  I understand the derivation of the MLE for a  and a , but I am unable to derive the MLE equation for the Poisson-binomial distribution. Short story (maybe two in the same collection) about Alien education versus Earth I read this somewhere in the 1990s, but it was probably older. I vaguely remember it as being two stories in sequence in an anthology. One was a story involving an Earth administrator comparing Earth curriculum to Mars curriculum and the second was just a class listing for Martian curriculum.  In the first story, what sticks out in my head was the Earth administrator proudly claiming some high value of WPM for reading for his students and the Martian admitting that their rate was lower, and then added a comment along the lines of that the Martian students, when reading at the rate attained at Earth, could not recall every word of the book and recite them back verbatim. In the curriculum listing, I remember that the physical education classes included Tightrope Walking and Advanced Tightrope Walking. In short, the implication was that Mars held its children, and therefore its citizens, to much higher standards, at the cost of sacrificing actual childhood. The children never played, just studied and drilled.  In retrospect, it might not have been Mars... I know one side was Earth and the other was a planet in the Solar System, and Mars sounds about right, but so does Venus. Either way, it was the casual arrogance of the extra-terrestrial society and the blustering attempts of the Earth administrator that stuck out for me. Settings -> Applications -> All tells me that "Contacts Storage" uses 2.5MB which must be my contact data.  Since I had to revert to 4.03 after a faulty update to 4.1 my contacts seem inaccessible although the data seems to be there.  Could you please tell me where to find the associated data(base) for Contacts Storage? My phone is rooted. And no, my contact data is not on GMail and I honestly don't know why... Cursor hitting "border" between differently sized monitors I'm not sure if I'll be to explain this right. I have a dual monitor display on Windows 7 and my left monitor (laptop) has a lower vertical resolution than the right monitor (regular LCD monitor). So obviously, if I stick these monitors together, there's a part in the upper-left corner of my LCD monitor where cursor cannot go to the other monitor. I remember there was a trick to make this gap disappear, and make it seem like the monitors are of equal height.  Any suggestions?  By the way, I am also using UltraMon. $f(z)=\frac1{2\pi i}\int_{\Gamma}\frac{f(\zeta)}{z-\zeta}d\zeta$ if $\lim_{z\to\infty}f(z)=0$ and $f$ is analytic in $|z|\ge1$ Let $f$ be analytic in $|z|\ge1$ and  $\lim_{z\to\infty}f(z)=0$. Then is $f(z)=\frac1{2\pi i}\int_{\Gamma}\frac{f(\zeta)}{z-\zeta}d\zeta$,$\forall |z|\ge2$, where $\Gamma$ is the circle of radius $2$ with centre at the origin.   I think yes, by the Cauchy integral formula. But, how do we ensure that the non analyticity of $f$ in $|z|&lt;1$ dosent affect the formula? Thanks beforehand. Specifying a no-indent for a list I have the following:  This is just normal text...  \begin{enumerate} \item First Item ?\\\\ This is the text of the first item \item Second Item ?\\\\ This is the text of the second item \end{enumerate}   Which renders the following:  This is just normal text...  1. First Item ?     This is the text of the first item  2. Second Item ?      This is the text of the second item   I want to specify that the text of the items has no indentation.  Basically, I want it to be rendered like such:  This is just normal text...  1. First Item ?  This is the text of the first item  2. Second Item ?   This is the text of the second item   How can I specify this form of no indentation? Why are bash tests so picky about whitespace?