What I (think I) understand: When light is refracted in a medium (say glass), the light interacts with the electrons in the medium and the electrons create new waves.  Summing the waves with the original wave gives a group velocity slower than c because of phase lags.   What I'm confused about: How is light interacting with these electrons? It's not being absorbed.  it is described as being "virtually absorbed". I understand that  you can view a photon as taking every possible path and sum them, but they're if they don't have the energy to excite an electron, then why would summing a bunch of paths where it can't excite an electron result in "virtual absorption"? What does "virtually absorbed" mean?  describes it: "In an indirect way they're able to make the electrons wiggle."  What is this "indirect way"? Also is dispersion a continuous or discrete phenomenon and why?
I am currently reading about the interactions between light and matter, but I keep coming across conflicting explanations.  My initial understanding (using classical electrodynamics) was that light (EM) waves do not actually travel through glass. Instead, they are absorbed by the atoms and/or electrons within the glass, which then emit new EM waves. The new EM waves emitted by the energised particles make up the forward-radiation, which is the light observed from the opposite side of the glass. So it appears as if light is travelling through the glass, but it's actually being absorbed and then re-emitted with (mostly) the same properties.  The article  by Chad Orzel, based on a related SE question, confirms the above:      To understand the propagation of a wave through a medium, you can   think of each component of the medium– atoms, in the case of a glass   block– as being set into motion by the incoming wave, and then acting   as a point source of its own waves.   But an answer to a different but related question,  conflicts with the above:     the electrons in glass are tightly bound to atoms so they are not free   to move like the electrons in a metal and therefore they do not absorb   the photons.   I know the above is referring to the quantum electrodynamics understanding, but I think it still conflicts as it claims that EM waves are not absorbed by the electrons in glass because they are too tightly bound to their atoms.  Also, the  provides a small explanation of the mechanics behind refraction within glass, which kind of conflicts with both of the above:     In the case of dielectrics such as glass, the electric field of the   light acts on the electrons in the material, and the moving electrons   generate fields and become new radiators. The refracted light in the   glass is the combination of the forward radiation of the electrons and   the incident light. The reflected light is the combination of the   backward radiation of all of the electrons.   From my understanding, the above claims that some of the light is absorbed and re-emitted by the electrons (which conflicts with the linked answer), and that the rest of the incident light travels through the glass (makes up the rest of the refracted light) (which I think conflicts with the linked article, claiming the light is absorbed (although the article doesn't technically state whether all of the light is absorbed and re-emitted, so maybe that's where I'm going wrong(?))  I'm sure this is my misunderstanding, so I would be very grateful if you could clear it up for me:  When a light wave is incident on a sheet of glass, do the particles that make up the glass absorb the waves and re-emit them in the forward direction? Or do the light waves manage to travel through the glass, without being absorbed and then exit the glass?
The question is based on my theory from the recent manga chapter (Naruto 661):     Sasuke, when stabbed by Madara is the effect of Tsukuyomi from Sasuke.   Now, to prove my theory, is there an episode in manga/anime that Sasuke used Tsukuyomi? Pass a PHP string to a JavaScript variable (and escape newlines) What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  &lt;script&gt;   var myvar = "&lt;?php echo $myVarValue;?&gt;"; &lt;/script&gt;   However, this doesn't work when $myVarValue contains quotes or newlines. How can I straighten ALL the vertical UV lines at once? Is there a hot keyshort cut? Or if I have to do them one by one .. is there at shortcut for that? Thank you! Remap Caps Lock to Ctrl-b Coconut Water from White vs Brown Coconuts What are some practices for getting a name change so that people can find me more easily? For a similar thing, , where Jay Wacker managed to get people to call him by the name Jay even though he didn't need to get a legal name change. I'm not sure how to go about this though.  The main problem with me is that I have such a frustratingly common name that a lot of people cannot find me when they google me. So many of them simply don't notice the middle initial that I always use in between my first and last names, and this could actually become a major issue in academia, since people have little time and are prone to giving up quickly if they want to look for me (or for my papers) and can't find me at all (I know this having seen how several academics use the Internet and how they look for people's names). This, in turn, could easily ruin my citation count in the future (it's not just that - it's helpful to others when I have a less common name so that they can more easily locate my stuff). I already know at least several people who specifically told me that they tried to find my email but that they couldn't find it (and this isn't limited to just them - there are many, many more - including long-lost friends who have wanted to talk to me for a long time, but who couldn't find me due to said ultra-common name). Of course, people can go through the respective university directories, but how many people really do that? From my observations (when I've seen people look for someone else), very very few do it. Hell, there are even several people at my OWN university who share the same exact first+last name as me.  In Academia, this is even a bigger problem because the vast majority of your connections will be people who only vaguely recognize/know you, so they may know most of the search clues. Even a "full name" + university won't solve all the problems, because I may switch universities and people may only remember the old university that I was in. I'm also very very interdisciplinary, so I want to be searchable to people outside my field as well.  And even if I fix the issue for Google with a massive SEO operation or whatever (that may even be impossible for my ridiculously common name), it's still not going to fix the problem for all of the other ways that people use search.  I'm currently transitioning between undergrad and grad school, so now may be the perfect time for a name change? But I don't know what to do. Is it better for me to change my first name or my last name? The problem is that a citation like "Chen 2011" is going to produce so many entries that no one will ever find them, even though they frequently do google things like that (and I simply cannot prevent people from googling something like that). Chen is so frustratingly common that even a "Chen and Name2 2011" paper could come from some random medical paper rather than from something I wrote.  As an additional complication, the % of Chinese people using the English Internet is exponentially rising, and I can only expect the problem to get worse in the future because of that (and not just for my first name, but even variants of my first name too). How to extract code of .apk file which is not working? Is there a canonical explanation for how Ant-Man's weight works when he shrinks down that's consistent with the various events depicted in the film?    I think the explanation given in the film is roughly "the suit compresses the space in-between atoms, so your size decreases, your density increases, and your total mass stays the same", however it seems to be portrayed in contradictory ways.  For instance:   He can float in water, and even be sent shooting through the air by a relatively gentle flow of water filling a bathtub.  This wouldn't happen if he retained his original mass, as he'd essentially be the densest thing on the planet and should sink like a stone even in a vat of molten lead. Upon landing after being ejected from the bathtub, the ceramic tile underneath him shatters.  That takes a significant amount of force, and similar effects are used at other points in the movie where he falls onto (or straight through) various things. He's able to get sucked into a vacuum-cleaner.  One that didn't even appear to be a high-end, extra powerful vacuum-cleaner, let alone one capable of sucking up a 200 pound piece of dust.   He can run along the barrel of a gun as someone shoots it, apparently without causing them to drop the weapon or even have trouble continuing to aim it.     Does a more consistent explanation exist in other media, that would fit with the above examples?  Or is this simply a case of the power being made to do whatever happened to be most convenient at the time? How to print a string at a fixed width? Find $\lim \limits_{n \to \infty}{1*4*7*\dots(3n+1) \over 2*5*8* \dots (3n+2)}$ I am trying to find  $$\lim \limits_{n \to \infty}{1*4*7*\dots(3n+1) \over 2*5*8* \dots (3n+2)}$$  My first guess is to look at the reciprocal and isolate factors:  $${2 \over 1}{5 \over 4}{8 \over 7} \dots {3n+2 \over 3n+1}= {\left(1+1\right)}\left(1+{1 \over 4}\right)\left(1+{1 \over 7}\right) \dots \left(1+{1 \over 3n+1}\right)$$ Now we take the natural log: $$\ln{ + \ln\left(1+1\right)} + \ln\left(1+{1 \over 4}\right) +\ln\left(1+{1 \over 7}\right) \dots +\ln\left(1+{1 \over 3n+1}\right)$$ Using $\ln(1+x) \le x$, we get: $$\ln{ + \ln\left(1+1\right)} + \ln\left(1+{1 \over 4}\right) +\ln\left(1+{1 \over 7}\right) \dots +\ln\left(1+{1 \over 3n+1}\right) \le 1 + {1 \over 4} + {1 \over 7} + \dots + {1 \over 3n+1}$$ Now, I'm stuck. I suppose I might use the fact that the RHS is similar to the harmonic series and show that it converges to some log, but I'm not sure how to do that. Do you have any clues? You are a pie maker and you are holding a fair to display your pies. You have 1000 pies. You have 10 workers to help you. The fair is in two hours. Unfortunately you discover that a rival pie maker has poisoned one of your pies with a form of norovirus that makes people violently ill one and a half hours after even consuming a tiny bit of it. You know if any single person who visits your fair gets ill, your business will collapse but you need all the non poisoned pies for the fair. You can take small samples from the pies without spoiling them and your workers are prepared to do anything to help you. How do you find the poisoned pie? How to access raw texture data in DirectX 11? I want to get access to a texture's pixel color data on the CPU. When trying to map the texture, I get E_INVALIDARG in return from ID3D11DeviceContext::Map.  ID3D11ShaderResourceView* resourceView; //represents my texture, already loaded up //...  //Getting the resources of the texture view... ID3D11Resource* res = nullptr; ID3D11Texture2D* tex = nullptr; resourceView-&gt;GetResource(&amp;res); res-&gt;QueryInterface(&amp;tex); D3D11_TEXTURE2D_DESC desc; tex-&gt;GetDesc(&amp;desc); //Correct data gets filled out D3D11_RESOURCE_DIMENSION dim; res-&gt;GetType(&amp;dim); //value gets set as Texture2D which it should  D3D11_MAPPED_SUBRESOURCE mappedResource; HRESULT h; h = context-&gt;Map(tex,0,D3D11_MAP_READ,0,&amp;mappedResource); //This always fails h = context-&gt;Map(res,0,D3D11_MAP_READ,0,&amp;mappedResource); //This also fails   The idea is that I keep only shaderResourceViews for my textures, because that is all I needed until now, and get the relevant resources here.  I tried mapping as WRITE_DISCARD also, but to no success. I am really confused, because I never had any problem with mapping constant buffers and vertex buffers. I seem to be certainly missing something? By the way, I am using Wic Texture loader and DDS Texture loader for the DirectXTex toolkit, and tried this code for png, dds textures, with and without mip-maps. Presentation of SL$(n,\mathbb{Z}_p)$ I know a presentation of the special linear group SL$(2,3)$(). My question is that-     Can we give a presentation for SL$(n,\mathbb{Z}_p)$ in general or in more general can we  give a presentation for SL$(n,\mathbb{F})$,where $\mathbb{F}$ is field.   As J.P. Serre had given presentation for SL$(2,\mathbb{Z})$   $$\mathrm{SL}_2(\mathbb{Z}) = \langle \,S, T \mid S^4 = 1, (ST)^3 = S^2 \,\rangle$$ where, \begin{align}     S &amp;=     \begin{pmatrix}     \phantom{-}0&amp; 1 \\ -1 &amp; 0     \end{pmatrix},     &amp;     T &amp;=      \begin{pmatrix}     1 &amp; 0 \\ 1 &amp; 1     \end{pmatrix}. \end{align} I wants it to be more general. Image of concave mirror when object is farther than the focal point I have a set of concave/convex mirrors/lenses, and I have drawn out all of the ray tracing diagrams for each possible combination and type of image each optical element can produce. When I look at the ray tracing diagrams then reproduce the situation in the real world with myself as the &quot;object&quot;, all the scenarios make sense to me except one: when I as the object stand beyond the focal point of a concave mirror.  The image ends up as &quot;real&quot; and appears to be in front of the mirror. Now I understand that in the situation above, I as the object would stand at 6m and this would result in the image appearing at 12m. So if I placed a wall or screen at the 12m mark, the image would form on that surface (just like a movie theater screen).... at least I think I interpreted that correctly. But I still see myself when I look in the mirror?! If the image is supposed to form and come into focus behind me, what in the world am I seeing when looking at the surface of the mirror? I still see myself, just inverted. The surface of the concave mirror still has a reflection on it. It doesn't look quite like a normal flat mirror, in that the image doesn't really look like it's &quot;inside&quot; the mirror, more like it's right on the surface of it. It's really frustrating because every other possible arrangement of optical elements makes total sense to me, except this one. Any suggestions on how to think about it? Thank you for your time! Objects with transparent texture not always show transparency in 3dview For some reason objects don't show their transparency all the time.  In this image the circles in red are suposed to be transparent like the ones in green.    When I select the object in the back, all objects in front of it become opaque.    When I select the two objects that are opaque, then they become transparent as they sould be.    The display is in GLSL mode  These are the material and texture properties      I'm not worried about the final render, just the editing view. I would like to see the actual transparency at editing time only, because the scene is to be imported in a third party game engine.  Blender is v2.68   is the blend file Why does "Object reference not set to an instance of an object" not refer the variable name or column? How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$ How can I pass a class member function as a callback? I am trying to show $$\lim_{n\rightarrow \infty} \int_{[0,1]^n} \frac{|x|}{\sqrt{n}}dx=\frac{1}{\sqrt{3}}$$ where $[0,1]^n$ is the unit cube in $\mathbb{R}^n$. I would appreciate any hint. A generic list of anonymous class