How do I resize a matplotlib figure, after I have created/initialized it?  fig, ax = plt.subplots(figsize=(4, 3)) pd.Series([1, 2, 3]).plot(ax=ax)     # which command to use to? below obviously does not work fig.set_figsize((6, 6))
How do you change the size of figure drawn with Matplotlib?
When my receiver that I have hooked up to my pc turns on it causes my monitors to turn black is there a way to stop this? Show that there's no continuous function that takes each of its values $f(x)$ exactly twice. I need to prove the following:  There's no continuous function $f:[a,b]\to \mathbb{R}$ that takes each of its values $f(x)$, $x\in [a,b]$  exactly twice.  First of all, I didn't understand the question. For example $x^2$ takes $1$ twice, in the interval $[-1,1]$. Is it saying that it does not occur for all $x$ in the interval? But what about $f(x) = c$? Is it saying that it does not occur only exactly $2$ times, then? I have no idea about how to prove it. I know that for $f(x)$ such that $f(a)&lt;f(x)&lt;f(b)$, if $f$ is continuous then there is a $c\in [a,b]$ such that $f(c) = f(x)$.  Now, there's the following proof in my book and I really wanted to understand it, instead of just getting a new proof  Since the interval $[a,b]$ has only $2$ extreme points, then the maximum or minimum of $f$ must be in a point $c\in int([a,b])$ and and in another point $d\in [a,b]$. Then, there exists $\delta&gt;0$ such that in the intervals $[c-\delta, c), (c,c+\delta)$ (and if $d$ is not extreme of $[a,b]$, $[d-\delta, d]$) the function takes values that are less than $f(c) = f(d)$. Let $A$ be the greatest of the numbers $f(c-\delta), f(c+\delta), f(d-\delta)$. By the intermediate value theorem, there are $x\in [c-\delta, c), y\in (c, c+\delta]$ and $z\in [d-\delta, d)$ such that $f(x)=f(y)=f(z)=A$. Contradiction.   Well, why the last part? Why is it that I can apply the intermediate value theorem to these values? For example, $&lt;f(c-\delta)&lt;p&lt;f(c)$, then by the theorem I know that there exists $m\in [c-\delta, c)$ such that $f(m) = p$. Same for the other intervals. But what guarantees thhat the greatest of the values between  $x\in [c-\delta, c), y\in (c, c+\delta]$ will be inside the intervals $[c-\delta), c), (c,c+\delta), [d-\delta, d)$? In Oracle, I can re-create a view with a single statement, as shown here:  CREATE OR REPLACE VIEW MY_VIEW AS SELECT SOME_FIELD FROM SOME_TABLE WHERE SOME_CONDITIONS   As the syntax implies, this will drop the old view and re-create it with whatever definition I've given.  Is there an equivalent in MSSQL (SQL Server 2005 or later) that will do the same thing? Maintenance plan for creating transaction log backups I have a database that is set to the 'Full' recovery model, and I'm creating a maintenance plan to backup the Transaction Log every 15 minutes. A full backup is then taken once every 24 hours.  I was wondering: will the maintenance plan for the transaction logs create a lot of different files every 15 minutes, or will it by default append to the same file for 24 hours?  Also: what is preferred? I couldn't find anything on this subject (or maybe I was Googling the wrong words).  Thanks for any pointers anyone can give me.  EDIT: I also see that the checkmark "Verify backup integrity" is OFF by default. Is there a risk with turning it on? It seems to be that it should be on by default, so is there a reason for not using this? Validate date format in php By default after a new user signs up, a redirect to the home page happens.  But in such case I want to redirect such user to another page like node/35.  In this node/35 I then want to display some content. Is there a way to disable the hardware on/off switch for the Wireless interface? Why is the change in Hamiltonian for an active infinitesimal canonical transformation defined the way it is? I'm trying to understand infinitesimal canonical transformations and conservation theorems (section 9.6 Goldstein ed3). My specific problem is with understanding eq 9.104,         $\partial H = H(B) - K(A^{'}) $, where $\partial H$ represents the change in the hamiltonian under an infinitesimal canonical transformation (from the active view point ofc). The issue only arises for generating functions that explicitly depend on time.  Here's what I've thought of so far. I understand what $K$ is from the passive viewpoint (or so I think), its the hamiltonian that would furnish Hamilton's equations for the transformed variables $Q=q+ \delta q$ and $P = p + \delta p$. In the specific case of the generating function being a time dependent hamiltonian, $K = H + \delta t \frac{\partial H}{\partial t} = H + \delta t\dot H$, which makes sense because once you transform the variables to what they'll be in time $\delta t$, you'll also need to add on a term that comes from the Hamiltonian being at a later time $t+ \delta t$.   In the book, this is explained as a transformation depending on time changes the hamiltonian, so $H(A) \rightarrow K(A^{'}) $. Which I sorta get. But why not for $H(B)$? And what about the case when the Hamiltonian is time dependent and it is the generating function? Is $H(B)$ at a later time then?   Note: $A$ represents the original variables, $B$ is the transformed variables in the active sense, so in the same phase space as $A$, and $A^{'}$ is the same point as A but in the transformed phase space (passive). Move all files of type to a new folder in windows 7 I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this?  if foo.py has changed:     unimport foo  &lt;-- How do I do this?     import foo     myfoo = foo.Foo() How do I construct the $SU(2)$ representation of the Lorentz Group using $SU(2)\times SU(2)\sim SO(3,1)$ ? Why is quaternion algebra 4d and not 3d? Why is  quaternion algebra 4D and not 3D?  Complex algebra is 2D and what is known as quaternion algebra jumps to 4D.    $ i^2 = j^2 = k^2 = ijk = -1 $  Using $1, i, j,$ and $k$ as the base (where complex uses $1$ and $i$ (or $j$ if you are an EE)) which results in a 4-axis space.  Why is there no 3D algebra? $\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx$ Trying to compute   I was facing: \begin{align}J=\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx\end{align}  I want to prove that $\displaystyle J=0$, or equivalently, that,  \begin{align}\int_0^1 \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx=-\dfrac{1}{2}\text{G}\end{align}  $\text{G}$ being the Catalan constant.  Read carefully please.   I know, using so-called Feynman's trick, how to prove this. I would like to obtain a proof, using only integration by parts and change of variable in simple integrals (that is, no multiple integrals) I don't know, if, under these restrictions, such computation is possible.  NB: You're probably wondering what is the link between : $\int_{0}^{\frac{\pi}4} \ln(\sin{x}+\cos{x}+\sqrt{\sin{2x}})dx$ and $J$.  The link is, for $x\in\left[0;\frac{\pi}{2}\right]$, $(\sin{x}+\cos{x}+\sqrt{\sin{2x}})(\sin{x}+\cos{x}-\sqrt{\sin{2x}})=1$ and $\sin(2x)=2\sin x\cos x$ I have a typical scientific manuscript in a LaTeX .tex file, and I need to convert it to MS Word .doc file.  The reason for having to convert to MS Word is I'm submitting the manuscript to an academic journal and they only accept MS Word (I know...)  The manuscript includes title page, figures, tables, equations (inline and in their own align environment), footnotes, bibliography, and an annex.  The tables are in their own separate tables.tex file, which I include using the \include{tables} command.  Most tables take up a whole landscape page, and were generated sing the package pdflscape.  I am using Windows 7 Professional.    My plan is to use pandoc to go from .tex to .odt, open the latter in Libre Office, and convert to .doc.  I have read a related  but it is too general.  Similarly the examples in the Pandoc  are too simple.  I have played around but I am unable to accomplish what I want.  This is surprising since converting a scientific manuscript is probably the most common use case for Pandoc. Here are some sample failures:  Example 1  I open a command line in the project folder, and execute the following:  pandoc -s document.tex -o document.odt   I get this error message:  pandoc: figure1: openFile: does not exist &lt;no such file or directory&gt;   where figure1 is the name of a figure file (e.g. figure1.png) in the project folder referenced in a line as \includegraphics[width=5.8in]{figure1}.  I suspect pandoc expects a .png extension but not sure how to provide it.  Example 2  Next I try .html, and excute the following:  pandoc -s document.tex -o document.html   The program executes fine.  I open HTML file.  Footnotes are there but figures are missing, tables are displayed as LaTeX, bibliography is missing, in-line math displays well, but math in align environment does not, section labels are displayed, and some other minor issues.  So given that mine is probably a typical use case scenario, my question is this: What commands should I use to get the .odt file I want?  I could not find a fully worked out example on the web.    Here is a specific list of errors.  I'll update how I corrected them based on community suggestions:   Figures not rendering.  Solved by adding .png extension to .tex file in \includegraphics command.  Now figures are included but they are huge, with half of each figure outside the page. No bibliography.  Solved. First, I have one huge consolidated Latex .bib file where I keep all my citations.  I manage it using .  This was giving me problems as I do not keep the cleanest .bib file in town.  So I reduced the problem by using a neat trick in JabRef that allows you to subset your master .bib file using the .aux file generated by Latex when compiling your manuscript.  In JabRef click on Tools > New Subdatabase based on AUX file.  This way I generated a much smaller biblio.bib file with only the articles referenced in my manuscript.  Running pandoc -s document.tex -o document.odt --bibliography=biblio.bib did the trick. Display math. Math in \begin{align} environment displayed in verbatim \latex;  (A partial solution is to use the  Libre Office extension.  Copy and paste the latex math code in the .odt file created by Pandoc into the equation editor, and so on.  Surely this could be built into a macro that can post-process all remaining math.)  UPDATE: Display math works very well using --mathjax extension. Inline math. Inline equation do not always render properly.  Bold math is a problem.  E.g. $\Sigma=\sigma^2\bm{I}$ displays as $\Sigma=\sigma^2\bm{I}$; Labels are displayed (e.g. section labels show as [sec:empirical] blah blah]; All tables display as raw latex. I have two rasters: a digital elevation model (DEM) and a Landsat band. The grid resolution of both is 30 m, but the grids are not coincident (see image: the dark raster on top is the DEM; the light raster underneath is the Landsat band).  I want to perform some transformation of the Landsat band so that its grid aligns perfectly with the DEM grid. I've tried resampling the Landsat band to 30 m in ArcGIS using the DEM as a Snap Raster in the Environment settings, but this does not have any effect. I've also tried clipping the Landsat band to the extent of a vector polygon (that the DEM is also clipped to), while setting the DEM as the Snap Raster, but to no avail.  I suspect this is happening because both rasters are already at the same resolution (just on different grids), but I really need their grids to be aligned to be able to do any further analysis.  Can I do this in ArcGIS Desktop? So I am running on Windows 7 (64-bit) Home Premium with 12 GB RAM (Intel Core i7 920).  I have restricted the Page File to 400MB since it was eating up a lot of space om my SSD (that is 80GB).   After that I sometimes get the "low memory"-warning, like this, except for the behold-comment:   When I get those warning I have usually a lot of RAM available; when I check Resource Manager I have over 2GB "Free" and over 2GB "Available" - usually more than that.  The diskspace on all my drives have over 10GB free.  So the question is - why does Windows complain? It actually restarted by computer (hard boot) when it happened, and as I said - lots or RAM available. When we measure the speed of a moving element we do it with the help of a reference frame. Now if we need to measure the speed of time, is it possible? Does time actually have a speed? Include sorting of accepted answer on profile I have few things on my mind:   I viewed my profile and I wanted to sort my answers by  "Accepted Answer, Votes" Wanted to know how many answers I've made that is marked as  the accepted answer. Sort by Most liked Question: I'm referring to my question who  have the most numbers of favorites. I wanted to sort the questions I created order by accepted or  unaccepted questions.    1 &amp; 2 seems useful to me but 3 &amp; 4 I don't think are that useful. But who knows, someone in this site might find it useful one day!  My POV: My answer is only sorted by Votes, I also want to see a list of accepted  answers on my profile probably not just to know how many accepted answers  I have but also to know what are the accepted answers that I have. I am reading the book Darth Plagueis, and when an assassination attempt is made on him by use of a nuclear bomb, the book states that nuclear weapons are scarcely available.   I searched briefly but found nothing on this and wondered if an explanation is available. Why would nuclear weapons be rare in a universe with such advanced technology across the board? Finder sidebar flashing text and high CPU load since El Capitan After update to OS X 10.11 I started having these bugs:   Finder sidebar text flashing  Very high CPU load:      I have Macbook Pro Retina 13" Mid 2014  I reset NVRAM.  I deleted com.apple.finder.plist, it didn't help.  Also I did this: , no longer flashes.