I ran CheckMarx security code scanner and found this 1 security risk issue for a Button on Opportunity that opens a VF page (generates pdf).  From the code report, here is the issue mentioned.  Can someone explain in detail? It highlighted the 2 lines below.  XSRF result path 1   Object: createquote in file: /pages/Print_Contract.page  L 4: showHeader="false" action="{!createQuote}"&gt;   Object: insert in file: /classes/ContractController.cls  L 93: insert quotelineItems;   Is this related to running DMLs on action method of the page? If yes, then what are the alternatives? I don't want users to do an additional manual step after clicking the button.
DML is not allowed in a constructor. Is there a known reason behind this limit?  I have been searching for the answer &amp; haven't found anything which addresses the question. May be it's not documented anywhere(Or google doesn't know where it is).
Experimental data for asymmetric Newton cradle Using a "successive impact model" (as if each ball were seperated from the other ones), I produced the following animations:    You can see any combination of balls with masses of 1 or 2 (left) or 1 and 4 (right).  Unfortunately, I do not have any Newton cradle to make some experiments, and I'd like to compare my results with observations. I contacted the author of , which is the most instructive one I found about asymmetric Newton cradle. In particular, he writes that the "OoO" configuration behaves as the "ooo" one, which is not what I simulate. But the author is not sure whether who is wrong because he did the experiments a long time ago.  I am especially interested in asymmetric Newton cradle with simultaneous impacts: left and right balls collinding at the same time.   Please let me know if you have any idea on where to find such experimental data.  Edit Just of few general remarks to avoid extending the comments.    Energy and momentum are conserved. However, they are sufficient to ensure uniqueness of the post-impact velocities only when there are 2 balls. The successive impact model precisely consists in propagating the impact ball after ball, and therefore leads to a unique solution (which conserves momentum and energy globally). From the waves point of view, changing the mass of a ball can be done by increasing the diameter, or the density (or a combination of both). This simple model cannot account for such subtleties of course, but maybe it does not matter when the balls are "small enough". Even if I think it's quite basic, following WetSavannaAnimalakaRodVance's comment, I am ready to hand out my Mathematica code to anybody who wants it. I'll check for good ways to share it. $\int_0^{\infty } \frac{\log (x)}{e^x+1} \, dx = -\frac{1}{2} \log ^2(2)$ How to show? Cleaning ‘staining’ off bottom of MacBook screen A couple months ago, I started to see some very small stain spots on the bottom of my MacBook Pro early 2015 screen. It's very annoying to see while I'm using it. When the screen is turned off, I see it as in the picture below. But when it's turned on, I see it as very small water-ish drops. I tried to clean it using water, screen cleaner, and even alcohol, but it didn't go away.  Also that area doesn't feel as smooth as the unaffected area. So, I think it's on the outside of my screen not inside.  Have you ever seen this before? Any suggestions on how to remove it without the need of replacing the whole screen? Cooking steak in frying pan, problem with oil splatter how to calculate earliest leap year in formula field salesforce I am writing a formula where I need a logic for calculating the earliest leap year.     Formula   (Sum(Mort1, Mort2, Mort3)*1.08^(current year-earliest LP year))+water+ECB+Taxes   What logic we can apply for earliest LP year? What part of speech is "back" in "put the book back on the table"? Put the book back on the table.   I'm having trouble. I think it is a preposition. Can I install Microsoft Office? If so, how? How can I know if my macbook is hacked? I develop a windows application and am curious whether it works via Wine. The application runs fine with Wine but I get no sound. In fact, I'm not sure whether my ubuntu installation has MIDI capabilities. The sound output settings shows "LFE on Separate Mono Output" one with "no amplifier" and another with "amplifier". They both function. I am using Ubuntu 12.04 as a client on virtualbox that runs on windows 7.  Thanks for any suggestion!  EDIT: virtual box hosted by windows 7, ubuntu running as a client in virtualbox. php loop through json array I forgot my username, how do I get it back? How to calculate the correct focal length needed for a subject of a given size and distance? I need to purchase my first ever lens. So far I've only used lenses that were built into a camera. This specific lens is for the BlackMagic Deign Pocket Cinema Camera (a video only camera, but one that uses photography lenses). I would prefer this to be a prime lens.  I have tried to find the exact way to calculate the focal length of the lens I need but I have not been able to find a good resource to make this simple enough for my limited optics knowledge. Can you please explain a simple way to calculate the focal length of a lens given the following inputs as an example:    I would prefer a simplified mathematical explanation so that I may use it to make similar determinations in the future using a "" method.  I have . Using that method, I came up with:  Required lens focal length = 7.02mm sensor height x (77in / 36in) = 15mm   Is that correct? Abount linear functional: If $T(B)$ is bounded, is $T$ bounded? Let $H$ be a infinite dimensional Hilbert space and let $B$ be a basis of $H$ that $H=\overline{span(B)}$  moreover, let $T : H \rightarrow K$ be a linear functional   If $T(B)$ is bounded, is $T$ bounded? I am able to solve simple differential equations like :  $$\dfrac{dy}{dx} = 3x^2 + 2x$$  We simply bring $dx$ to other site and integrate.  But how do we find solutions of differential equations like :  $$\frac{d^2x}{dt^2} + \dfrac{kx}{m} = 0$$  ?  We have been told the solution is $x(t) = A\cos ( \omega t + \phi_o)$ where $\omega\ =\sqrt{\dfrac{k}{m}}$  but how do we actually find it? How do I make the Messages that are sent to me stop going to my Mac? Inequality of $\vert \text{tanh}(x)-x+\frac{x^3}{3}\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$ I have an assignment, that I cannot seem to find a starting point for. I am not looking for the specific answer, but only where to begin. Any pointers are appreciated.  I have to prove the inequality $\vert \tanh(x)-x+\frac{x^3}{3}\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$ where $x-\frac{x^3}{3}$ is the 3rd order Taylor expansion.  I've tried with the triangle inequalities, Lagrange remainders, and a lot of other stuff, but I am no where near a correct argumentation. Does anyone have any suggestions? Does $x^2 - y^2 = 12345678$ (x,y are integers) have any solutions? This question appeared in KVPY online exam held on Nov 5. This equation is the equation of a hyperbola so any solution must be of the form $a\sec(k),a\tan(k)$. So no solutions. Put your shoes on and Take your coat off I have often heard the following statements when someone talks about shoes, cloths, etc. I don't know which one is more appropriate or grammatically correct.   Hey, put your shoes on.  Hey, put on your shoes.  Take off your coat, please.  Take your coat off, please.    Any thoughts? Can we also say &quot;take out your coat&quot;? Does Mathematica have a "MATLAB Builder" equivalent? Lets assume my classes are loaded from a compressed .war file or loaded elsewhere,  how can I discover all the resources in a given package?  Enumerating files will not really work, since this is a war file.  Most likely this will involve using the current classloader?  Is there a library out there that does something like that? Googling revealed only some hacks with listing files.