How does this Python statement "line[len('name:'):]" work
Understanding slice notation
What is the best way to remove texture from a scanned textured photo paper? I have a bunch of scanned old family photos where the photo paper has a texture. Unfortunately, the texture of the photo scans quite well. What is the best way to remove the texture?  (Photoshop CS5) How to update to the latest numpy and scipy on Ubuntu 14.04LTS On my Ubuntu 14.04LTS, for python3, I have   &gt;&gt;&gt; import numpy  &gt;&gt;&gt; import scipy  &gt;&gt;&gt; numpy.__version__  '1.8.2'  &gt;&gt;&gt; scipy.__version__  '0.13.3'   I want to update numpy and scipy to the most , I tried with the following commands  sudo pip3 install --upgrade numpy sudo pip3 install --upgrade scipy   both commands ran successfully, but the version numbers didn't change to 1.9.2 and 0.16.0 at all for both python packages (after restarting the computer). Anyone knows how to update to the most version? Thank you very much!! In Ubuntu 18.04.1, I would like to use my left Super-key only to simply open the Show Applications menu (aka Dash) like a left click on the dock-icon (with the 9 dots) does and preferably close it again without showing me any open programs.   I can open it with Super + A and even close it again with Super R, but Super L appears to do nothing at all.   In Xfce, something similar was possible by adding a custom keyboard shortcut for Super L and setting the command to xfce4-popup-whiskermenu, which would open and close a menu with favourite applications. Unfortunately, I don't know the command that opens and closes the Show Applications menu.   Is there any way to add such a shortcut in the new Gnome Shell? How to perform entity validation on code level? I have an entity that has a field attached to it and the values that user types into the field has to be globally(website) unique(compared to other entities).  I have added validation to the entity form but what if I create this entity programmatically? How can I prevent the entity to be saved into the storage?  I've noticed there is a validate method in ContentEntityBase, though not in ConfigEntityBase. Is this the place for it? If so, I could use some examples. Top of answer covered by sticky top bar after clicking direct link Why are these constructs using pre and post-increment undefined behavior? Subversion Obliterate feature I was just thinking of writing a shell script to implement the obliterate functionality in an easy to do way (externally, using the suggested way, but automated).  Here's what I had in mind:  On the client   svn list -R &gt; file-list. filter file-list in several ways like grep to create a file "files-to-delete", something like a set of grep XXX  file-list&gt;&gt;files-to-delete. transfer files-to-delete to the server using scp.   On the server   Dump the repository svnadmin dump /path/to/repos &gt; repos-dumpfile, this can be kept as a backup too. Filter the dump file, for each word in "files-to-delete", do: cat repos-dumpfile | svndumpfilter exclude $file &gt; new-dumpfile Create a new repository and load the new file to it svnadmin create new-name; svnadmin load new-name &lt; new-dumpfile   Would this work? How can it fail? Any other ideas? When a holomorphy ring is a PID? I will use the notation and language of Stichtenoth, Algebraic Function Fields and Codes.  Let $F$ be a function field over a finite field $\mathbb F_q$, $S$ a non empty set of places (possibly infinite) and $O_S$ the holomorphy ring of $S$, i.e., $O_S:=\bigcap_{P\in S} O_P$ (being $O_P$ the valuation ring of the place $P$).  Give necessary and sufficient conditions for $O_S$ to be a Principal Ideal Domain.  Many thanks in advance!  G. Run MySQLDump without Locking Tables Manganese has more unpaired electrons than Iron so why is Iron ferromagnetic Manganese paramagnetic? Manganese has five unpaired electrons, but Iron has four, then why is Iron ferromagnetic and Manganese paramagnetic? What's that property I'm missing? I'm very new to classical propositional logic, and my lecturer is using a system with the following axioms:  A1. X→(Y→X)  A2. (X→(Y→Z))→((X→Y)→(X→Z))  A3. (¬Y→¬X)→(X→Y)  Use uniform substitution and Modes Ponens (MP) as rule of inference. Deduction Theorem also allowed.  I'd like to deduce the following:  (a) X, Y ⊢ ¬(X→(¬Y)) (conjunction, but expressed in terms of NOT and IMPLIES)  (b) X→((X→Y)→Y)  (c) (X→Y)→(((¬Y)→X)→Y)  (d) (((¬Y)→X)→Y)→(X→Y)  Remark: The last two are to show that the axiom (A3) can be replaced with a different axiom:  B3. (¬Y→¬X)→(((¬Y)→X)→Y).  Solution: Bram28 proves (b) and (c) below. I demonstrate (a) and (d).  (d) is alright; first, I claim that X, ((¬Y→X)→Y) ⊢ Y.  Axiom (A1) gives ⊢X→(¬Y→X) so that ((¬Y→X)→Y)⊢X→Y by Hypothetical Syllogism (HS), which Bram28 shows to be valid.  Now that we have ((¬Y→X)→Y)⊢X→Y just apply the deduction theorem to get what we want: ⊢((¬Y→X)→Y)→(X→Y).  (a) is slightly trickier. Axiom (A1) gives ⊢ Y→(X→Y) so that X, Y ⊢ (X→Y).  Next, by part (b), we have as a theorem that ⊢X→((X→¬Y)→¬Y).  Therefore X, Y ⊢(X→¬Y)→¬Y.  But ⊢(¬¬(X→¬Y))→(X→¬Y) by DN Elim, which Bram28 shows to be valid.  By HS, X, Y ⊢(¬¬(X→¬Y))→¬Y.  By Axiom (A3) and MP, X, Y ⊢(Y→¬(X→¬Y)).  Also, rather trivially X, Y ⊢Y.  Finally by MP we conclude X, Y ⊢¬(X→¬Y) as required. Flexslider view preview working but not on actual page My block is not working for the flexslider: The images are not appearing, but the view preview does work.  I don't know if it is relevant, but a similar problem would happen with just a slideshow view, although one image would appear and it would not cycle.  Could jQuery be a problem?  The following is the actual page with the block that is not showing any images.        The following is the view preview, which works. I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it? Gaps between arrows and labels Parallel file copy from single source to multiple targets? I have a several large files on optical media I would like to copy to multiple targets - in this case I have two hard drives attached to the same computer. Is there a utility that can function like:  copy source target1 target2 ... targetN How to execute multiple statements in a MATLAB anonymous function? I'd like to do something like this:  &gt;&gt; foo = @() functionCall1() functionCall2()   So that when I said:  &gt;&gt; foo()   It would execute functionCall1() and then execute functionCall2().  (I feel that I need something like the )  EDIT:  functionCall1 and functionCall2 are not necessarily functions that return values. When is the order of convergence of Newton-Raphson greater than 2? If some function $f$ has a simple root at $x_*$ then I know that the order of convergence of the Newton-Raphson iteration is at least 2. But when is this order strictly greater than 2? Dimensioning of a technical drawing in TikZ Is there is an easy way to mark dimensions in a technical drawing with TikZ?    Is there a library or something?  Edit  I am using XeLaTeX.  Update  I chose Martin's answer because it serves me well for the moment. Ultimately the best solution would be a library that, in an easy and consistent manner, would allow to change the arrow/dimension lines styles, would support polar coordinates, would allow to choose 2 nodes and the vertical distance that you want the dimension to be typeseted etc. How can you accelerate without moving? I know this question has been asked in other forms, generally regarding the balance of forces.  This time I want to focus on motion.  I've got a laser accelerometer on my desk.  It tells me that I'm accelerating at $9.8~\rm m/s^2$.  For the first experiment I'm travelling in space.  I pick a nearby star and discover that I move about $490$ meters in $10$ seconds from that star.  For the next experiment I'm on the surface of Earth.  I measure the same acceleration with my laser accelerometer.  I pick a spot (the center of the Earth) and discover I don't move at all in $10$ seconds.  How is acceleration without motion possible? Steady-State Current I am in the process of completing some homework and have come across a question that says: "What is the steady-state current?" It is asking in reference to a circuit that includes two capacitors in parrallel and a DC source of 24V and an AC source given by $\epsilon = 20 \cos(120 \pi t)\ \text{V}$, where $t$ is in seconds. I assume that it is asking when the current is constant. Because naturally the current is not constant due to the AC source, would I just consider the DC source for this?