Python syntax highlighting breaks on quotation mark A quote mark (') in a comment breaks further highlighting. Example:
Is it possible to explicitly tell Stack Overflow the language of the code block you are including? Possible Duplicates:             Stack Overflow awesomely detects what language a code block is and syntax highlights it accordingly. But sometimes it fails. Is it possible to explicitly tell it what the language is?  php:  if ( force_ssl_admin() &amp;&amp; !is_ssl() ) {     if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {         wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));         exit();     } else {         wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);         exit();     } }   ruby:  def destroy   @payment = Payment.find(params[:id])   @payment.destroy    redirect_to :back end   yaml (FAIL)  foo: this is foo! bar: this is bar! id: 5
Detecting if resistances are parallel or series in complex circuits I know how to detect when resistors are arranged in parallel or series arrangement and I can also find their equivalent resistance in simple circuits or when resistances are connected in form of triangle but what happens when the arrangement is complex like this :   Which resistors are parallel and which are in series ? How can I find the equivalent resistance in such cases ? Is there rule or method for figuring this out ? I am going to start a phd at the US with an F1 visa. University told me that I could enter the US only 30 days before the date on I-20. Since English is not my first language (and this would be a big change in my life) I would like to go there by June.  The thing is that I have an European passport with a valid ESTA. My plan would be to arrive with this passport, stay 4-6 weeks , go to Canada for a short vacation (maybe flight maybe by land) and come back to the USA with F1 visa.  I have two questions about this:  1) is this possible?   2) If yes, how could I justify knowing I will lose my come-back flight during my first entry? (I would purchase round trip because one-way are too expensive, probably with less than 90 days difference) Evaluate $\lim_{n\rightarrow\infty} \int_0^1 f(x^n) dx$ Let $f$ be a real, continuous function defined for all $0\leq x\leq 1$ such that $f(0)=1$, $f(1/2)=2$, and $f(1)=3$. Show that  $$\lim_{n\rightarrow\infty} \int_0^1 f(x^n) dx$$  exists and compute the limit.  Attempt:   Since $f$ is real-valued continuous on $0\leq x\leq 1$ and the boundaries $f(0)=1$ and $f(1)=3$, $f$ is bounded on the interval  and the integral $\displaystyle\int_0^1 f(x^n)dx$ exists for any positive $n$. Thus, we can interchange the limit and the integral and compose the limit, \begin{align*} \lim_{n\rightarrow\infty} \int_0^1 f(x^n)dx&amp;=\int_0^1\lim_{n\rightarrow\infty}f(x^n)dx\\ &amp;=\int_0^1 f\left(\lim_{n\rightarrow\infty} x^n \right)dx\\ &amp;=\int_0^1 f(0)dx=1. \end{align*}  Questions: So, my first question concerns whether interchanging the limit and the integral is correct. It seems it would be justified by the dominated convergence theorem, where $f(x^n)$ is dominated by a function $g(x)=\displaystyle\sup_{0\leq x\leq 1} f(x^n)$ and $f_n(x^n)$, on $0\leq x\leq 1$, converges pointwise to a function $f$ that takes value 1 for $x\neq 1$ and 3 for $x=1$.  My next question is whether the interchange between the limit and composition of the function is allowed. Since the function is continuous and the limit exists at that point, it seems the interchange would be justified. Equation left margin I have equations inside an environment which has a larger left-margin than the main text (analogous to an enumerate/itemize environment, implemented with the changepage package's adjustwidth environment). Just as equations in enumerate/itemize behave, the equations are centered with respect to the entire text, rather than just the width of the container environment. I want the latter behavior.  I'm trying to accomplish this by wrapping all display-math in minipages. Namely, I'm modifying the mathdisplay environment in amsmath.sty as follows:  \makeatletter \let\oldmd\mathdisplay \def\mathdisplay#1{%   \newline   \begin{minipage}{\textwidth-\@totalleftmargin}%     \oldmd{#1}% } \let\oldendmd\endmathdisplay \def\endmathdisplay#1{%   \oldendmd{#1}%   \end{minipage} } \makeatother   This is almost working, but there are some issues with spacing which I don't understand how to fix. Here's how the the normal \[ ... \] and numbered \begin{equation} ... \end{equation} look with the above modification:      My main confusion is why the numbered version is behaving so differently from the unnumbered. But all in all I want to fix this so that the spacing above and below is even as it usually is. Any help is appreciated, thanks.  Edit: Here's a compilable example:  \documentclass{amsart}  \usepackage{lipsum} \usepackage{calc} \usepackage{changepage}  \makeatletter \let\oldmd\mathdisplay \def\mathdisplay#1{%   \newline   \begin{minipage}{\textwidth-\@totalleftmargin}%     \oldmd{#1}% } \let\oldendmd\endmathdisplay \def\endmathdisplay#1{%   \oldendmd{#1}%   \end{minipage} } \makeatother  \setlength{\parindent}{0pt}  \begin{document}  \lipsum[1]  \begin{adjustwidth}{20pt}{} \lipsum[2] \[ x \mapsto \hom(-,x) \]  \lipsum[3] \begin{equation}   y \mapsto \hom(y,-) \end{equation} \lipsum[4] \end{adjustwidth}  \lipsum[5]  \end{document} Why does $\sum_1^\infty \frac1{n^3}=\frac52\sum_1^\infty\frac{(-1)^{n-1}}{n^3\binom{2n}{n}}$? Apery's original proof that $$ \zeta(3) \equiv \sum_1^\infty \frac1{n^3} $$ is irrational starts from an alternating series  $$ \zeta(3) = \frac52\sum_1^\infty\frac{(-1)^{n-1}}{n^3\binom{2n}{n}} $$  There must be a way to see that those two series are equal, but I have tried various telescoping and other techniques and I just can't see it. Help me out:       Show (preferably by reasonably elementary means) that$$\sum_1^\infty \frac1{n^3}=\frac52\sum_1^\infty\frac{(-1)^{n-1}}{n^3\binom{2n}{n}}$$ Does $\sum_{m=1}^{\infty}\sum_{n=1}^{\infty}a_{mn}^3=\sum_{n=1}^{\infty}\sum_{m=1}^{\infty}a_{mn}^3$ occur here? Let $\{a_{mn}\},~m,n \in \Bbb{N}$, be an arbitrary double sequence of real numbers then does the following equality occur always?   $$\sum_{m=1}^{\infty}\sum_{n=1}^{\infty}a_{mn}^3=\sum_{n=1}^{\infty}\sum_{m=1}^{\infty}a_{mn}^3$$   I think there is no reason for the equality of this iterated series in general but I cannot figure out how to construct a counter example. Can anyone please help me how to create a example of $\{a_{mn}\}$ such that the given equality does not hold...!! I have a table and I am always getting the data by ordering a column. In my case, I  order by datenum. However, the selection is so slow because of the ordering.  Is it possible to order the table after datenum. This column is defined as unique. If  defined as an index, would the selection will be faster? Error entering equation in DSolve What to include in my portfolio? I am a relatively recent graphic design graduate. I have been working at a small printing house for about two years, but will soon be interviewing for a different position in another city.  My question is about what to include in my design portfolio. When I was in school, my professors all insisted that work included in a portfolio should be 100% original: my original photography, my original logos, my original layout, my original written content etc. However, at my current office, we rely heavily on client-supplied logos, type content, and photography—and stock photography (shutterstock, etc).  What do other designers include in their portfolios? Has anyone else had this issue and can I reasonable include these more recent projects in my portfolio if I label them appropriately (something like "layout design")? Let $A$ be a squared matrix, and suppose there exists an $n\in \Bbb N$ in a way that $A^n=0$. Show that $I-A$ is invertible and that $(I-A)^{-1}=I+A+\cdots+A^{n-1}$    I don't have a clue where to start from. Is every metric space a subspace of some connected metric space? Can one preserve food by periodically heating it? I get that keeping food temperature low will slow down chemical reactions and preserve food, but sometimes my sister preserves food by heating it every 6 hours or so (up to 1-2 days). Does this help preserving the food? If yes, how does it work?  If it matters, the food currently in question is , but I would appreciate a general explanation. In case anyone is wondering, she doesn't store it in the fridge because it is full. I'm an on and off user of LaTeX so I'm not familiar with every package out there. Having said that, whenever I use LaTeX and need to accomplish a certain goal (i.e. ), I search around and find some kind of solution that involves a package that I didn't know about. I think that's great, I learn something new, and it goes in my template file.  Every now and then, though, my search comes up with a package that, after much wrangling, I find out that it's obsolete. An example of this is just recently I came across the subfigure package and wanted to try it out. Soon after I found out from here that it has become . I usually keep my TeX up-to-date because I like keeping up with new XeLaTeX features.   My question is, is there a map or timeline of what TeX packages should be avoided because there are better ways of doing things? An idea I have is some kind of list of all packages split by what they accomplish, then cancelling out packages whose features are incorporated into and improved upon by newer packages.  Edit: another example is lscape versus pdflscape. The latter implements rotating pages in the final PDF not just for pdftex but also for other drivers such as xetex. The only way I found out about this was Googling latex lscape rotate xelatex, for which the second link leads to the  (PDF).  Great answers so far. I'll check them out and see which one works best for me.  Edit 2: Turns out that my question is a bit of a dupe in the sense that a great answer came up on an unrelated question. The nag package . Gotta try it! Why isn't The Flash unstoppable? I've recently gotten into The Flash TV show, and so I've been reading about his powers. What I don't understand is why his typical rogues pose a threat - it seems like there should be very little limit to his powers.  He can go back in time, so if he loses a battle or the bad guys do something, he can go back and preempt it. In the new 52, he can all but predict the immediate future, so he can see bad things that are going to happen and stop them. He can phase matter through matter, or let matter pass through him. This means he is all but immune to weapons fire.  I haven't read enough of the old comics so I don't the know challenges he's had. For a guy who can't be attacked, can time-travel and can race around the globe several times in a minute, I can't imagine there is much that could pose a threat. How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks Miraak is stealing all my dragon souls Is "flu" the only disease usually accompanied with "the"? From what I understand, you don't usually use "the" with diseases / illnesses / disorders ("have Alzheimer's / diarrhea / claustrophobia / dyslexia, etc." not "have the..."), but it's perfectly normal to say "have the flu". Is the flu the only exception?   Edit (this is only a side part, and can be glossed over if you will, so it's not a duplicate imo): What's so significant about the flu that other conditions don't have, so that it's entitled to "the"? I have upgraded from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS. I was surprised to see that the context menu entry "Make Link" (keyboard shortcut Ctrl+M) in Nautilus doesn't seem to exist anymore. It used to appear upon right mouse click on a file or folder and allowed the user to create a symbolic link. A customer has a 6-screen setup for each workstation and would like various pages of a web app to be opened automatically in each of the screens on startup or invoking a shortcut. (The target web browser is likely to be Chrome).  I wondered whether it would be possible to use Javascript window.open to do this but one possible snag is the customer may wish to have tabbed browsing with popup blocker turned on. (OK, these could be overridden but such config is currently out of our control...)  So the question is: Could a script (e.g. batch file) be written to open multiple instances of the browser at specified coordinates within the 6 screens (each pointing to different URLs)?  [This is basically the same question as  but for Windows instead of Ubuntu.] Git for beginners: The definitive practical guide