Is there a way to overload += in python?
Overriding "+=" in Python? (__iadd__() method)
Is there no electric field inside a conductor? I came across this statement while studying electric currents and I am confused:  "There is no electric field inside a conductor. Hence no current can flow through it".  Is there a fallacy in this statement?  Any help would be appreciated.  The conductor being discussed is ideal. What is the driving force for the current in this case? Using CLI, how do I change the user's profile picture? A similar task for changing the desktop background, can be achieved using the following script:   FILE="/backgrounds/background.png" gsettings set org.gnome.desktop.background picture-uri "$FILE"   How would I achieve the same result, but with the user's avatar/profile picture? I'm using Ubuntu 12.04 &amp; everything about it is great except that it just won't resume after suspend. I've tried the suggestions listed in this thread  but none worked. I'm using Lenovo Y510P. I'm new to Ubuntu, or unix for that matter, so please let me know if there's anymore  information that I should be posting. Thanks.  update  I tried the suggestion by Dima on this post . The machine wakes up from hibernation but immediately the screen gives a screen like this     Wondering if this is an issue with the graphics card or something. Ward model implementation: specular component too weak I'm trying to implement the Ward shading model, the anisotropic, computationally efficient version:       This is how I made it:    float alphaX=0.5, alphaY=0.5; // asinotropic roughness float minFloat= 1.e-6;   vec4 Ward(vec3 L, vec3 N, vec3 V) {     vec3 H= normalize(L+V);     float NdotL= max(dot(N,L),0.0);     float NdotV= max(dot(N,V),0.0);      vec3 e= vec3(1.0,0.0,0.0);     vec3 T= normalize(cross(N,e));     vec3 B= normalize(cross(N,T));     float HdotT= max(dot(H,T),0.0);     float HdotB= max(dot(H,B),0.0);     float HdotN= max(dot(H,N),0.0);      float beta= -2.0 * ( pow(HdotN/alphaX, 2.0) + pow(HdotB/alphaY,2.0) ) / (1.0 + HdotN);     float den= max(minFloat, 4.0 * pi * alphaX * alphaY * sqrt(NdotL * NdotV) );     vec4 specular= Ps * 1.0/den * exp(beta);     return (Pd + specular) * NdotL; }   But I get a result similar to a lambertian surface or Oren-Nayar model, where the specular component is absent: Feedback for The Loop - May 2020 May’s “The Loop” blog post was just posted, you can read it . A popular response last month to our post about how we receive, prioritize and implement feedback was a question around how this framework gets utilized in the practical sense. We thought that Dark Mode was a great feature to dig down into as it was so widely requested and anticipated.   We hope you enjoy this month’s post, please leave any questions or comments you have in this thread and we will respond ASAP. My Prof wrote that   $\sum_{n=2}^{\infty} n(n-1)x^{(n-2)} = \frac{2}{(1-x)^3}$  when $-1&lt; x&lt;1$  I do not understand where the above formula comes from. Can someone please explain the steps or provide a hint?   Thanks! In the , the icon color for the various sites seems* incorrect: Whenever I select a main site, the icon is greyed out, and when ever I select the corresponding meta site, the icon is colored. My initial instinct was to think that the colors of the main/meta sites following the &quot;Switch sites:&quot; prompt should be switched. (Actually, it seems like it's just a UI thing. See the edit below.)  *Edit: Actually, the colors are technically not incorrect, since (as Jeremy Banks has pointed out) the icon shows &quot;the other&quot; site of the main/meta pair, and clicking on it is for switching to the respective other site. See the comment thread for some UI improvement ideas. How to express a polar coordinate for a macro that only accepts space-separated values? \psElectricfield only accepts a coordinate in space-separated values as follows. For example, a charge of -0.1 unit at (-1,0) is written as [-0.1 -1 0]. I have attempted to write in PS notation but it still does not work.  \documentclass{article} \pagestyle{empty}  \usepackage{pst-electricfield,multido} \def\M{2}  \begin{document} \multido{\i=0+30}{12}{% \begin{pspicture*}(-\M,-\M)(\M,\M)     \psElectricfield     [         Q={[-0.1 -1 0][-0.1 1 0][0.1 !\i sin 2 mul \i cos 2 mul]}     ] \end{pspicture*}\newpage} \end{document}   How to express  a polar coordinate for a macro that only accepts space-separated values? Bound states of the $V(x)=\pm \delta'^{(n)}(x)$ potential? The $\delta(x)$ Dirac delta is not the only "point-supported" potential that we can integrate; in principle all their derivatives $\delta', \delta'', ...$ exist also, do they?  If yes, can we look for bound states in any of these $\delta'^{(n)}(x)$ potentials? Are there explicit formulae for them (and for the scattering states)?  To be more precise, I am asking for explicit solutions of the 1D Schroedinger equation with point potential,  $$- {\hbar^2 \over 2m} \Psi_n''(x) + a \  \delta'^{(n)}(x) \Psi(x) \ = E_n \Psi_n(x) $$  I should add that I have read at least of three set of boundary conditions that are said to be particular solutions:   $\Psi'(0^+)-\Psi'(0^-)= A \Psi(0)$ with $\Psi(0)$ continuous, is the zero-th derivative case, the "delta potential". $\Psi(0^+)-\Psi(0^-)= B \Psi'(0)$ with $\Psi'(0)$ continuous, was called "the delta prime potential" by Holden. $\lambda \Psi'(0^+)=\Psi'(0^-)$ and $\Psi(0^+)=\lambda\Psi(0^-)$ simultaneusly, was called "the delta prime potential" by Kurasov   The zero-th derivative case, $V(x)=a \delta(x)$ is a typical textbook example, pretty nice because it only has a bound state, for negative $a$, and it acts as a kind of barrier for positive $a$. So it is interesting to ask for other values of $n$ and of course for the general case and if it offers more bound states or other properties. Is it even possible to consider $n$ beyond the first derivative?  Related questions  (If you recall a related question, feel free to suggest it in the comments, or even to edit directly if you have privileges for it)  For the delta prime, including velocity-dependent potentials, the question has been asked in   In the halfline $r&gt;0$, the delta is called "Fermi Pseudopotential". As of today I can not see questions about it, but  seems to be the same potential.  A general way of taking with boundaring conditions is via the theory of self-adjoint extensions of hermitian operators. This case is not very different of the "particle in 1D box", question  A general take was the question  A related but very exotic question is  because obviosly the point-supported interacctions have a peculiar scaling  Comments  Of course upgrading distributions to look as operators in $L^2$ is delicate, and it goes worse for derivatives of distributions when you consider its evaluation $&lt;\phi | \rho(x) \psi&gt;$. Consider the case $\rho(x) = \delta'(x) = \delta(x) {d\over dx}$. Should the derivative apply to $\psi$ only, or to the product $\phi^*\psi$? Pass shell variable as a /pattern/ to awk Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l &gt;&gt; "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l &gt;&gt; "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally. Can Windows 7 be repaired to run with new motherboard? I have HP computer and it came with Windows Vista. It also had an option to upgrade to Windows 7 via upgrade disc. I have upgraded to Windows 7 via the special upgrade disc (It is special because it will only allow to install Windows 7 if Vista is already installed.  My motherboard recently died. I just replaced it and Windows 7 will not start up. It reboots and sometimes gives a blue screen of death. Very similar problem as described in this post: . Windows will not boot into normal or safe mode. Start up repair from system repair disc does not fix the problem. However, "" post on superuser describes that it should be possible to run Windows 7 on a new motherboard.  Is it hopeless to find a way to repair Windows 7 and I need to do a clean install? Is there a difference for repair options between OEM and retail versions of Windows 7? I remember doing this type of repair just fine in Windows XP days, so why am I unable to do so with Windows 7 - is it Microsoft or HP's fault? Should I stop buying HP computers or should I switch to Ubuntu? I updated to Ubuntu 20.04. When I use the default terminal, everything is fine. But if try to use terminator, I cannot use sudo. I get permission denied. Again, only when using terminator.  How can I sudo from the terminator? I really would like to continue to use a terminator.  Edit: I just also noted that it cannot find make either. I guess it's all messed up. I'll try to uninstall it and install again I guess. If $A$ has two eigenvalues $\lambda _1, \lambda_2$ and $\dim (E_{\lambda_1})=n-1$, then $A$ is diagonalizable Why does a light object appear lighter in your peripheral vision when it's dark? So, I am not sure I can reproduce it via images, but the steps are:  1) At night, open a window and have a look at the surface of the earth  2) Suppose there's an object that reflects a tiny amount of light  3) When you actually try to focus your eyes at this object, you either don't see anything (depends on the amount of light it reflects) or you can hardly see it  4) When you focus your eyes on something that is 3-10 metres away, you can easily see this object with your ambient vision. Not the details, but it seems that it reflects more light.   Why does it happen? Proving that an additive function $f$ is continuous if it is continuous at a single point Suppose that $f$ is continuous at $x_0$ and $f$ satisfies $f(x)+f(y)=f(x+y)$. Then how can we prove that $f$ is continuous at $x$ for all $x$? I seems to have problem doing anything with it. Thanks in advance. Cite in the caption of a graphic but not in \listoffigures? Sometimes I'd like to cite the reference in the caption of a graphic. But I want to avoid that this citation is displayed in the \listoffigures. How can I achieve that?  Fore example with this code:  \begin{figure}[htb] \centering \includegraphics{overview_pyramid.png} \caption{Overview pyramid \cite{LM2010}}\label{fg:overview_pyramid} \end{figure} Why is gravity stronger than other forces at the macroscopic level, yet weaker than other forces at the quantum level? Is there an explanation? Towards the end of , how do I get  $$ \frac{\sqrt{8z + 1} - 1}{2} &lt; w + 1 $$  Here $w = x + y \geq 0, t = (w^2 + w)/2 , z = t + w, x,y \in \mathbb N_{\geq 0}$.  Thanks. Packet Tracer 7 on Ubuntu 18.04 cannot launch I am having some issues with Packet Tracer 7 on Ubuntu 18.04: when I launch it with ./PacketTracer7 within the /opt/pt/bin directory, it opens but close immediately with a lot of:     "Warning: libpng warning: iCCP: known incorrect sRGB profile"   error msgs on the console.  The thing is, I installed PacketTracer7 on Ubuntu 16.04 and I remember that I had that issue with the libqt5multimedia.so.5 dependency, but I was able to find the solution (thanks to askubuntu and google) by installing the dependencies. So, everything perfect with 16.04.  But I'm a bit lost now. I can't realize where the issue come from, because I know the qt5 libs are installed on the system.  This is what I see when I run dpkg --get-selections:  libqt4-xmlpatterns:amd64            install libqt5concurrent5:amd64             install libqt5core5a:amd64              install libqt5dbus5:amd64               install libqt5gui5:amd64                install libqt5multimedia5:amd64             install libqt5multimediaquick-p5:amd64          install libqt5multimediawidgets5:amd64          install libqt5network5:amd64                install libqt5opengl5:amd64             install libqt5opengl5-dev:amd64             install libqt5positioning5:amd64            install libqt5printsupport5:amd64           install libqt5qml5:amd64                install libqt5quick5:amd64              install libqt5quickparticles5:amd64         install libqt5quicktest5:amd64              install libqt5quickwidgets5:amd64           install libqt5script5:amd64             install libqt5scripttools5:amd64            install libqt5sensors5:amd64                install libqt5sql5:amd64                install libqt5sql5-sqlite:amd64             install libqt5svg5:amd64                install libqt5test5:amd64               install libqt5webchannel5:amd64             install libqt5webkit5:amd64             install libqt5webkit5-dev:amd64             install libqt5widgets5:amd64                install libqt5x11extras5:amd64              install libqt5xml5:amd64       I've tried to uninstall pt and the qt5 libs and install everything again, but nothing... the same issue.  Did anybody install PacketTracer7 on Ubuntu 18.04?  I would be very happy to have your help for doing it!  Thanks and forgive me for my poor english :) Convert a Pair of Integers to a Integer, Optimally?