Some places I've read flat out say light actually slows down in a medium, some say the speed decresae is just apparent but not real and that the photons still travel at the constant speed of light.  I'm kinda confused.
So light travels slower in glass (for example) than in a vacuum. What causes light to slow down? Or: How does it slow down? If light passes through the medium, is it not essentially traveling in the "vacuum" between the atoms?
Allow sound file uploads in questions and answers? Should Stack Exchange introduce the ability to upload embedded sounds (maybe via HTML5/Flash, whichever the user has) as part of questions and answers to Stack Exchange?  It could require a certain amount of rep to stop new users from doing it frivolously.  My rationale behind this is the new language &amp; usage sites.  I often find myself thinking that it might be helpful, when discussing a regional dialect or something, for the person answering to just pronounce what they're trying to describe in words. I would like to use pgfplots to create a figure where I plot curves that have a recursive formula. I tried a very simple case that uses the declare function command to see whether this is possible, and I can't compile (TeX capacity exceeded). Is it even possible to do this?  \documentclass{standalone}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}[   declare function={test(\p)=ifthenelse(\p&gt;1, test(\p-1), 0.5);}, ]     \begin{axis}[]     % use TeX as calculator:     \addplot [mark=none] {x};     \addplot [mark=none] {test(0)};     \end{axis} \end{tikzpicture}  \end{document} Pointer vs. Reference What would be better practice when giving a function the original variable to work with:  unsigned long x = 4;  void func1(unsigned long&amp; val) {      val = 5;             } func1(x);   or:  void func2(unsigned long* val) {      *val = 5; } func2(&amp;x);   IOW: Is there any reason to pick one over another? Crash adding comment How to get the file name from a full path using JavaScript? Is there a way that I can get the last value (based on the '\' symbol) from a full path?  Example:  C:\Documents and Settings\img\recycled log.jpg  With this case, I just want to get recycled log.jpg from the full path in JavaScript. Zero-dimensional ideals and finite-dimensional algebras Sorry for the title, its hard to put the problem into proper words.  Basically, in Firefox or Chrome, I try to navigate to stackoverflow.com.  The request fails and the URL I see in the navigation bar is:  http://d2e24t2jgcnor2.webhostoid.com/Secure/Error?URL=http%3A%2F%2Fstackoverflow.com%2F&amp;ResponseCode=504&amp;user_id=5b5033d3-3543-4b7c-9844-055afde93841&amp;uc=20140915&amp;subid=20140915&amp;source=browsersafeguard-rockettab-spigot&amp;version=1.0.5370.12627&amp;implementation_id=browsersafeguard-rockettab-spigot%20&amp;block_host=False&amp;reg=False&amp;redirectms=True   This looks shady and my internet seems slower lately. I have a few questions:   Why is my request going through this strange URL? Do the query parameters reveal my identity? How can I stop this?   I use my cell phone’s 3G network and tether it to my laptop. Calculating $1+\frac13+\frac{1\cdot3}{3\cdot6}+\frac{1\cdot3\cdot5}{3\cdot6\cdot9}+\frac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $ How to find infinite sum How to find infinite sum $$1+\dfrac13+\dfrac{1\cdot3}{3\cdot6}+\dfrac{1\cdot3\cdot5}{3\cdot6\cdot9}+\dfrac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $$   I can see that 3 cancels out after 1/3, but what next? I can't go further. Why didn't Palpatine publicly change his name once he became Emperor? Anakin Skywalker was known as Darth Vader (this was already his Sith name) after the creation of the Galactic Empire.  So why did Palpatine remain "Emperor Palpatine"? Why didn't he embrace his persona as Darth Sidious?  I started wondering after reading one of the answers to How to get a JavaScript object's class? Why did Zobrist leave the trail to the virus in the first place? Cann I use a 19.5V 4.62A laptop charger for 19V 4.74A laptop? One might expect the sum of the tracert latencies to equal 267ms: Outlook autocleaning my line breaks and screwing up my email format I'm sending an email using the dotnet framework. Here is the template that I'm using to create the message:  Date of Hire: %HireDate% Annual Salary: %AnnualIncome% Reason for Request: %ReasonForRequest%  Name of Voluntary Employee: %FirstName% %LastName% Total Coverage Applied For:  %EECoverageAmount% Guaranteed Coverage Portion: %GICoveragePortion% Amount Subject to Medical Evident: %GIOverage%   When the messages is received in outlook, outlook tells me "Extra line breaks in this message were removed". And the message displays like this:  Date of Hire: 9/28/2001 Annual Salary: $100,000 Reason for Request: New Hire  Name of Voluntary Employee: Ronald Weasley Total Coverage Applied For:  $500,000 Guaranteed Coverage Portion: $300,000.00 Amount Subject to Medical Evident: $200,000   Note how Outlook incorrectly removes needed line breaks after the name, EECoverageAmount, etc...  It's important for the email recepients to get a correctly formatted email, and I have to assume that some of them use outlook 2003. I also can't assume they will know enough to shutoff the autoclean feature to get the message to format properly.   I have viewed these messages in other mail clients and they display correctly  some more information:   I am using UTF-8 BodyEncoding (msg.BodyEncoding = System.Text.Encoding.UTF8) The msg.Body is being read from a UTF-8 encoded text file, and each line is terminated with a crlf.   Question: How do I change the format of the message to avoid this problem? How to blacklist kernel modules? Diagnostics for logistic regression? For linear regression, we can check the diagnostic plots (residuals plots, Normal QQ plots, etc) to check if the assumptions of linear regression are violated.  For logistic regression, I am having trouble finding resources that explain how to diagnose the logistic regression model fit. Digging up some course notes for GLM, it simply states that checking the residuals is not helpful for performing diagnosis for a logistic regression fit.  Looking around the internet, there also seems to be various "diagnosis" procedures, such as checking the model deviance and performing chi-squared tests, but other sources state that this is inappropriate, and that you should perform a Hosmer-Lemeshow goodness of fit test. Then I find other sources that state that this test may be highly dependent on the actual groupings and cut-off values (may not be reliable).  So how should one diagnose the logistic regression fit? Number of moves necessary to solve Rubik's cube by pure chance Suppose, random moves are made to solve Rubik's cube. A move consists of a $90$-degree-rotation of some side. The starting position is also random.   What is $E(X)$, where $X$ is the number of moves until the cube is solved ? How many moves must be made, that the probability that the cube is solved, exceeds $99$% ? Introductory Calculus textbook for physics? I'm very new to latex, and I've noticed that using a book class causes the text on one page to be on the right and then left on the next and so on. I'd like for it to all to be on the left or centered. How can I change this? Was V'ger responsible for the creation of the Borg? I remember reading somewhere a theory that  (the being that the Voyager probe had become in Star Trek: The Motion Picture) was somehow responsible for the creation of the Borg.  Is this canonical?  Where does the theory come from?  And how exactly did it go down?