For the given class bellow, why the transaction scope is the same from the caller method ? And why it only works when i call, for example someBeanInstance.A() from another class ?  @Stateless public class X {      @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)     public void A() {         B();     }      @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)     //or @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)     public void B() {         // here the transaction is the same         // the annotation has no effect     } }
In the following setup, does method B run in a (new) transaction?  An EJB, having two methods, method A and method B  public class MyEJB implements SessionBean     public void methodA() {        doImportantStuff();        methodB();        doMoreImportantStuff();     }      public void methodB() {        doDatabaseThing();     } }   The EJB is container managed, with methodB in requires_new transaction, and method A in required transaction. thus:  &lt;container-transaction id="MethodTransaction_1178709616940"&gt;   &lt;method id="MethodElement_1178709616955"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;*&lt;/method-name&gt;   &lt;trans-attribute&gt;Required&lt;/trans-attribute&gt;   &lt;/method&gt;   &lt;method id="MethodElement_1178709616971"&gt;     &lt;ejb-name&gt;MyName&lt;/ejb-name&gt;     &lt;method-name&gt;methodB&lt;/method-name&gt;   &lt;/method&gt;   &lt;trans-attribute&gt;RequiresNew&lt;/trans-attribute&gt; &lt;/container-transaction&gt;   Now let another EJB call methodA with an EJB method call. methodA now runs in an transaction. Will the subsequent call to methodB from methodA run in the same transaction, or does it run in a new transaction? (mind, it's the actual code here. There is no explicit ejb-call to method B)
Baking cloth simulation use only 20% of cpu ressources, how to get 100%? Baking a cloth use only 20% of CPU, inactive process of cpu is 78%, is there a way to use those extra 78% ? Blender 2.75 Windows 10 Can I use the Twig template engine? I do a lot of  development and I like their templating language. , the , looks very much like it.  How can I use Twig in Drupal 7 or even Drupal 6? I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at the beginning of the line need to be be copied along with the text.  This question has been asked in various ways before (e.g. , or ). Those questions focus on making line numbers uncopyable, though.  Making the spaces at the beginning of a line copyable seems to be harder: "I am not sure it is possible to specify in the PDF (at least in a viewer-independent way) that the indentation should be copied too" (). At , Philippe Goutet suggests a solution (turning the spaces into visible spaces, and coloring them in the background color so that they appear invisible) that works using Acrobat Reader, but not all readers. He says "It works under Acrobat Reader and it's extremely pleasant to be able to quickly copy/paste code without problem (perhaps the problem can be circumvented by writing direct PDF code to tell that it's a space, I've never had the time to try)".  Is it possible to produce a PDF with a code listing with copyable real spaces at the beginning of a line?  Minimal example: The line return x should start with four spaces.  \documentclass{article}  \begin{document} \begin{verbatim} def myfunction(x):     return x \end{verbatim} \end{document}   I know that I could attach the code to the PDF as a file, but that's not what I want. I need to execute a directory copy upon a user action, but the directories are quite large, so I would like to be able to perform such an action without the user being aware of the time it takes for the copy to complete.  Any suggestions would be much appreciated. $[S]$ means linear span of S. Then $[S] = [[S]]$ My definition of span:   Suppose a vector space $(V,+,\cdot)$, and       $$S = \{u_1,\cdots,u_n\}$$      (and $S$ is a subset of $V$, not a subspace)      $$[S]=:\bigcap_{W\subset V, W\supseteq S} W$$      In other words, $[S]$ is, by definition, the intersection of all $W$,   such that $W$ is a subspace of $V$ and $W$ contains $S$.   Well, then I need to prove that   $$[S] = [[S]]$$  My strategy:  $[[S]]$ means the intersection of all subspaces that contain $[S]$. If all the subspaces contains $[S]$, so does their intersection. Therefore, $[S]\subset[[S]]$  However, I'm having trouble proving the converse:  $$[[S]]\subset[S]$$  Any hints? Let's make the hot network questions icons clickable I would like to see the icons in the 'Hot Network Questions' right panel clickable, leading to the homepage of the site where the question comes from.  It would make it more comfortable to switch to the site when you want rather to visit it than to see that specific "hot" question. I've heard you can start with pikachu in pokemon go instead of the 3 standard starters. How would one do this? Is this even possible? How to increase swap size? Height of colorbox Are "pushforward" and "pullback by zero section" of diffrentials isomorphic in elliptic curves? Let S be a scheme, $p:E\rightarrow S$ be an elliptic curve with zero section $e:S\rightarrow E$. My question is: Are $p_*(\Omega_{E/S}^1)$ and $e^*(\Omega_{E/S}^1)$ isomorphic? I think it's right because I saw both definitions in different notes and they seem to represent the same thing. Thank you! Possible Duplicate:          How do you convert a C++ string to an int?  Assume you are expecting the string to have actual numbers in it ("1", "345", "38944", for example).  Also, let's assume you don't have boost, and you really want to do it the C++ way, not the crufty old C way. Flagging a deleted answer results in a message saying I am flagging too quickly I know that matrix multiplication in general is not commutative. So, in general:  $A, B \in \mathbb{R}^{n \times n}: A \cdot B \neq B \cdot A$  But for some matrices, this equations holds, e.g. A = Identity or A = Null-matrix $\forall B \in \mathbb{R}^{n \times n}$.  I think I remember that a group of special matrices (was it $O(n)$, the ?) exist, for which matrix multiplication is commutative.  For which matrices $A, B \in \mathbb{R}^{n \times n}$ is $A\cdot B = B \cdot A$? Silencing "Your disk is almost full" notification After upgrading to macOS Sierra, I'm getting the notification that "Your disk is almost full. Save space by optimizing storage.":    The options appear to be to store my files in iCloud, automatically delete files, or manually delete files:    My problem/irritation is that I have 80GB free of my 440GB volume.  The question: is there a way to silence this notification in a (semi-)permanent fashion, or to change the threshold it uses for the notification? Variance of the future value of a cash flow I want to compute the variance of $FV =A\sum_{k=1}^n(1+r)^k=:g(r)$, assuming interest rate $r\sim\mathrm{N}(\mu,\sigma^2)$ and constant equal payments $A$. As discussed in the comments, the Delta Method gives an approximation $\mathrm{Var}[FV]≈\sigma^2\times(g′(\mu))^2$. Is there a way to get an exact answer? In a moment of cheapness, I decided not to order a 5v to 3.3v level shifter from Sparkfun, but instead to put it together myself.  The  used a  MOSFET, but since I enjoy surface-mount soldering about as much as root canal treatment, I decided to use a  that is through-hole mounted and easily available from my preferred supplier.  The results of this were sub-optimal.  When pulling the 5v line to ground, all was fine - the 3.3v side went to 0.07v.  But when pulling the 3.3v to ground, the 5v line showed around 4.14v (it was otherwise a touch above 5.1v).  On a closer reading of the datasheets involved, as well as the original Philips application note on the subject, I began to come to the conclusion that the gate threshold voltage was the problem.  By altering the schematic and tying the MOSFET's gate to 5v instead of 3.3v, both sides seem to work fine.  Pulling either side low causes the other side to go low.  I'm not, however, at all confident that this is actually a sane thing to do.  My understanding of the original schematic isn't deep enough to form a sensible opinion.  Will this modified schematic work, or are the current good results I'm seeing mere fluke or a precursor to something releasing magic smoke? Let $f(x)$ be a monotone non-increasing function such that $\int_{0}^{\infty}f(x) dx$ converges. Prove: $\lim\limits_{x \to \infty} xf(x)=0$. My question is, why can't I simply contradict any other possibility by using the Integral Limit Comparison Test with $1\over x$? I am, after all, to show that $f(x)=o(x)$ as $x\to \infty$. I really don't understand why monotony is crucial here. I could use some help. I have some plasterboard screws like this:     However, without a drill I have a job getting them into the wall. Am I safe to use normal screws on hangings that aren't going to be taking a great deal of weight? In this case it is a rack of coat hooks. Referencing without captions appearing but keeping numbering show that a distance function is continuous Let $X$ be a metric space with metric $d$. Define $d: X \times X \to \mathbb{R}$, show that $d$ is continuous.  I would like to show that the function is continuous the topology way (since it is a course on topology).   Let $(a,b)$ be a basic open set in $\mathbb{R}$, then $d^{-1}(a,b) = \{(x,y): a&lt;d(x,y)&lt;b\}$. Define $A= \bigcup_{x \in X} B_{b} (x)$, where $B_b (x) = \{y \in X| d(x,y)&lt;b$}. Clearly $A$ is open. Now define $C = \{(x,y):d(x,y)&gt;a \}.$ Essentially I hope that $A \cap C$ is open. But I am stuck in showing that $C$ is open.  Any help please? :)