Memory Usage of Python application in PyCharm
How can you profile a Python script?
This is a follow-up to this question:   Hans Bethe wrote a paper in 1944, "Theory of Diffraction by Small Holes," Phys. Rev. 66, 163. I don't have access to the paper, but from descriptions online it sounds like he proved the following. Suppose a plane wave impinges on an absorbing sheet, and there is a hole in the sheet of diameter $d$, with $d&lt;\lambda$. Let $P_0$ be the power incident on the hole, and $P$ the power diffracted through the hole. Then the transmission is $T=P/P_0=(d/\lambda)^4$.  As a practical application, I think this explains why microwaves don't leak strongly through the metal grille in the front of a microwave oven.  Questions:   Does the thickness of the sheet matter? From references online, it sounds like the hole is treated as a waveguide...? This seems to relate to cutoff frequencies of waveguides, etc.? It seems to me that Huygens' principle would give $T=1$ for $d\ll\lambda$, since in this limit the wavelets are in phase. Why is Huygens' principle invalid here? Is this related to question #1? Is there a simple argument for the proportionality to $(d/\lambda)^4$? Or if not, how does one prove this using the gory details of Bessel functions, etc.? How to test if a player is near coordinates in 1.13? I am trying to evaluate the following:  $\displaystyle \int_{0}^{\infty} \frac{1}{1+x^a}dx$, where $a&gt;1$ and $a \in \mathbb{R}$  Any help will be much appreciated. Switch command output language from native language to english Order of an element in a finite cyclic group Let $G$ be a cyclic group of order $m$ generated by an element $a$.  I want to show that the order of $a^k$ is $m/d$, where $d:=\gcd(k,m)$.  I have a simple proof, but want to make sure I haven't overlooked anything since the other proofs I've seen (such as in Dummit and Foote) look more complicated.    The order of $a^k$ is the cardinality of the set $\{a^{ks}: s \in \mathbb{Z}\}$, which equals the cardinality of the set $\{a^{ks} a^{mt}: s,t \in \mathbb{Z} \}$ since $a^m$ is the identity.  But the set $\{ks+mt: s,t \in \mathbb{Z} \}$ is the set $d \mathbb{Z}$ by the basic properties of integers. So we have that the cardinality of the set is $| \langle a^k \rangle| = |\{1, a^d, a^{2d}, \ldots, a^{m-d} \}| = m/d$. Wiki-tag edit error is non-descriptive I've been editing some wiki entries on the new Expatriates site, and started to get the following error:    When I go to a normal post, I see what is presumably the proper explanation:    Can the Wiki Tag edit error be updated to show a more meaningful error message? Cartographic techniques for symbolizing routing data Spacetime Torsion, the Spin tensor, and intrinsic spin in Einstein-Cartan theory In  gravity, the action is the usual  but now the Torsion tensor is allowed to vary as well (in usual GR, it is just set to zero).  Variation with respect to the metric gives:  $$R_{ab}-\frac{1}{2}R g_{ab}=\kappa P_{ab} \quad (1)$$  where $P_{ab}$ is the canonical stress energy tensor.  Variation with respect to the torsion tensor ${T^{ab}}_c$ gives:  $${T_{ab}}^c + {g_a}^c{T_{bd}}^d - {g_b}^c {T_{ad}}^d = \kappa {\sigma_{ab}}^c \quad (2)$$  where ${\sigma_{ab}}^c$ is the .  By contracting that equation, I can see that if the spin tensor is zero, the Torsion tensor is identically zero:  $${T_{ab}}^c + {g_a}^c{T_{bd}}^d - {g_b}^c {T_{ad}}^d = \kappa {\sigma_{ab}}^c = 0$$ $$ {g^b}_c({T_{ab}}^c + {g_a}^c{T_{bd}}^d - {g_b}^c {T_{ad}}^d) = 0$$ $$ {T_{ab}}^b + {g_a}^b{T_{bd}}^d - {g_b}^b {T_{ad}}^d = 0$$ $$ {T_{ab}}^b + {T_{ad}}^d - 4 {T_{ad}}^d = 0$$ $$ {T_{ad}}^d = 0$$ $${T_{ab}}^c + {g_a}^c{T_{bd}}^d - {g_b}^c {T_{ad}}^d = 0 \quad \Rightarrow \quad {T_{ab}}^c =0$$  My understanding is that:  The spin tensor and the stress energy tensor, are defined entirely in terms of whatever matter Lagrangian we add to the theory.  Therefore, from above, the equations in vacuum are exactly the same as normal GR (so solving for outside matter, only the boundary conditions with the matter could be different).  Assuming my understanding up to here is correct, my line of questioning is:   How is the Spin tensor (and hence Torsion) related to the concept of material with intrinsic spin? Hopefully answered by 1, but if the matter has zero intrinsic spin, yet we have an extended "spinning" body, is the spin tensor still zero (as I'd consider that orbital angular momentum then)? Does this mean Einstein-Cartan predictions are identical to normal Einstein GR if (and only if) the instrinsic spin of any particles and fields in the theory are zero? Is re-projection needed from SRID 4326 (WGS 84) to SRID 4269 (NAD 83)? I have US census data against state boundaries stored as  SRID 4269, in an MSSQL DB.  The input data used for calculations against that dataset is stored as SRID 4326.  As far as I can infer from the , SRID 4269 is just a subset of SRID 4326 and no coordinate re-projection is necessary.  Do I actually need to re-project from SRID 4326 to SRID 4269, provided that the input data is always within the bounds of the SRID 4269? The title is kind of obscure. What I want to know is if this is possible:  string typeName = &lt;read type name from somwhere&gt;; Type myType = Type.GetType(typeName);  MyGenericClass&lt;myType&gt; myGenericClass = new MyGenericClass&lt;myType&gt;();   Obviously, MyGenericClass is described as:  public class MyGenericClass&lt;T&gt;   Right now, the compiler complains that 'The type or namespace 'myType' could not be found." There has got to be a way to do this. MyClass[] array; List&lt;MyClass&gt; list;   What are the scenarios when one is preferable over the other? And why? Ideal of the twisted cubic The twisted cubic is the image of the morphism $\phi : \mathbb{P}^1 \to \mathbb{P}^3 , (x:y) \mapsto (x^3:x^2 y:x y^2:y^3)$, it is given by $X = V(ad-bc,b^2-ac,c^2-bd)$. Now I would like to compute $I(X)$, which equals by the Nullstellensatz the radical of the ideal $I := (ad-bc,b^2-ac,c^2-bd) \subseteq k[a,b,c,d]$. I think that that $I$ is already a radical ideal, even a prime ideal. Namely, I suspect that  $$\phi^* : Q:=k[a,b,c,d]/I \to k[s,t] , a \mapsto s^3, b \mapsto s^2 t , c \mapsto s t^2 , d \mapsto t^3$$ is an injection. If this is true: How can we prove that? I've already tried to find a $k$-basis of the quotient, but this turned out to be a big mess. Even the representation of the quotient as a monoid algebra doesn't seem to help. Another idea is the following: A formal manipulation of generators and relations implies $Q_a \cong k[a,b]_a$. Thus it suffices to prove that $Q \to Q_a$ is injective, i.e. that $a$ is not a zero divisor. How does one know when to use a gerund or an infinitive? As a native speaker of English, the gerund version of this sentence sounds better:  infinitive:     When used together in chains,   extension methods are an unprecedented   tool to produce extremely concise   code.   gerund:     When used together in chains,   extension methods are an unprecedented   tool for producing extremely concise   code.   But how can I explain to someone learning English how to decide in situations like these whether to use the infinitive or the gerund? How can I prove that $\frac{n^2}{x_1+x_2+\dots+x_n} \le \frac{1}{x_1}+ \frac{1}{x_2} +\dots+ \frac{1}{x_n}$? How can I prove that $\frac{n^2}{x_1+x_2+\dots+x_n} \le \frac{1}{x_1}+ \frac{1}{x_2} +\dots+ \frac{1}{x_n}$?   im trying to use AM-GM  $\sqrt[n]{ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}}   \le \sum_{k=1}^n \frac{{\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}}{n}$  $ln\sqrt[n]{ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}} \le ln \frac{1}{n} \sum_{k=1}^n {\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}$  $ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}\le  \sum_{k=1}^n {\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}$  im not sure is this right or not, however i dont know how to include the $n^2$ in the nominator? is there also alternative proof using jensen inequality? How to clear the interpreter console? Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work. Custom unique constraint, only enforced if one column has a specific value Please help me delete a file? I have a movie named Con Man. Apparently, in Windows, you cannot have a file name with the name CON in it.  Can anyone please help me delete it?  It is stored in F:\Movies\Con Man The name of the file that I want to delete is Con.Man.2018.720p.WEBRip.x264-[YTS.AM]  I know there are a lot of similar issues but I am not able to apply them that is why posting here.  Thankyou  PS :: I am a noob!  Edit: Found this on the internet but cant work it out How does Java's PreparedStatement work? If $\operatorname{rank}\left( \begin{bmatrix} A &B \\ C &D \end{bmatrix}\right)=n$ prove that $\det(AD)=\det(BC)$ How iptables tables and chains are traversed I know linux has 3 built-in tables and each of them has its own chains as follow:  FILTER: PREROUTING, FORWARD, POSTROUTING  NAT: PREROUTING, INPUT, OUTPUT, POSTROUTING  MANGLE: PREROUTING, INPUT, FORWARD, OUTPUT, POSTROUTING  But I can't understand how they are traversed, in which order, if there is. For example, how are they traversed when:   I send a packet to a pc in my same local network when I send a packet to a pc in a different network when a gateway receives a packet and it has to forward it when I receive a packet destinated to me any other case (if any)