How to check if the sed command replaced some string?
How to check if sed has changed a file
Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner. bash: start multiple chained commands in background I'm trying to run some commands in paralel, in background, using bash. Here's what I'm trying to do:  forloop {   //this part is actually written in perl   //call command sequence   print `touch .file1.lock; cp bigfile1 /destination; rm .file1.lock;`; }   The part between backticks (``) spawns a new shell and executes the commands in succession. The thing is, control to the original program returns only after the last command has been executed. I would like to execute the whole statement in background (I'm not expecting any output/return values) and I would like the loop to continue running.  The calling program (the one that has the loop) would not end until all the spawned shells finish.  I could use threads in perl to spawn different threads which call different shells, but it seems an overkill...  Can I start a shell, give it a set of commands and tell it to go to the background? SVN Error - Not a working copy Recently our svn server was changed and we did a svn switch.  Since the working copy had a huge amount of unversioned resources, the working copy got locked and we started switching folder by folder for all folders under svn, which works perfectly fine.  But at the top most level of the repository, when I try to update files, I get the svn: Working copy '.' locked error and cleanup is not helping either. When I do cleanup, I get errors like these - svn: 'content' is not a working copy directory  Fresh checkout is NOT an option at all. Are there any other ways to cleanup and release the locks and do the switch completely ?  EDIT:  The last paragraph in JesperE's answer     If you get a "not a working copy" when   doing a recursive "svn cleanup" my   guess is that you have a directory   which should be a working copy (i.e.   the .svn directory at the toplevel   says so), but it is missing its own   .svn directory. In that case, you   could try to just remove/move that   directory and then do a local update   seems to be the solution to the problem in the repository. I have identified those folders and did a fresh checkout of those specific folders alone and wow, the locks are released in the subsequent cleanup! Thanks a lot JesperE !!  But, I still cannot figure out the svn switch error which now reads something like,     svn: The repository at   'svn://repourl/reponame/foldername'   has uuid 'm/reponame', but the WC   has 'b5b39681-0ff6-784b-ad26-2846b9ea8e7d'   Any ideas ? A matrix and its transpose have the same set of eigenvalues/other version: $A$ and $A^T$ have the same spectrum Let $ \sigma(A)$ be the set of all eigenvalues of $A$. Show that $ \sigma(A) = \sigma\left(A^T\right)$ where $A^T$ is the transpose matrix of $A$. There is a part of my paper where I use the distributive property and it might not be clear to the reader to see the operation result (I'm using in proposional logic for a proof). The logic equation (part of) is: $$ (l_{1}) \vee \big( (p \vee q) \wedge (\neg p \vee q) \wedge (p \vee \neg q) \wedge (\neg p \vee \neg q)\big) $$ $$ (l_{1} \vee p \vee q) \wedge (l_{1} \vee \neg p \vee q) \wedge (l_{1} \vee p \vee \neg q) \wedge (l_{1} \vee \neg p \vee \neg q) $$  So I was wondering if there is a way to represent this operation like a 'shower' (see another example in pic ). Maybe there is some hidden magic mathmode command or pkg for this. At last we can also rely on tikz. Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster? I have an HP laptop with with a Core-i5 450m processor and an ATI Radeon 5650 1GB graphics card. When I played crysis warhead on my system its temprature went up to 82° c. Is it safe to play games up to this temperature level? Sometimes it takes too long for the network manager to update to see new wireless AP. Is it possible to change the time interval between checks? Is there a single word that describes both Witches and Wizards? In the Harry Potter world, there's the term "muggle" for people with no magical abilities, "muggle-born" for those with magical abilities who's parents are muggles and "squib" for those with no magical abilities who's parents are magical.  But is there any collective term for all magical people (as opposed to wizards for males and witches for females)?  I don't recall seeing any word that refers to all men and women and children with magical abilities, and it's the only group left without noun or collective noun to describe them. Does "no larger than" imply shapability? How does one know when to use a gerund or an infinitive? Quantum levitation, flux pinning -- basically, when a superconductor floats above a permanent magnet, is really fascinating. But does the strength of the magnetic field influence the superconductor's height? And what relationship/formula suggests this?  For example, if I had a coil wrapped around a metal object and then ran a small current through it, a small magnetic field would be generated and a superconductor exposed to it would float about it at some height that I put it on.  But what if I increased the current, so that the magnetic field also increased? What happens to the superconductor? Does its height change? Or does it just get harder to "pull out" of its levitating state? Add days to JavaScript Date How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay? Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X&gt;  t)$. Although how useful integrating that is, I really have no idea. A get() like method for checking for Python attributes If I had a dictionary dict and I wanted to check for dict['key'] I could either do so in a try block (bleh!) or use the get() method, with False as a default value.  I'd like to do the same thing for object.attribute. That is, I already have object to return False if it hasn't been set, but then that gives me errors like     AttributeError: 'bool' object has no attribute 'attribute' Can I load a .NET assembly at runtime and instantiate a type knowing only the name? Is it possible to instantiate an object at runtime if I only have the DLL name and the class name, without adding a reference to the assembly in the project? The class implements a interface, so once I instantiate the class, I will then cast it to the interface.  Assembly name:     library.dll    Type name:      Company.Project.Classname     EDIT: I dont have the absolute path of the DLL, so Assembly.LoadFile won't work. The DLL might be in the application root, system32, or even loaded in the GAC. Legendre's formula counts the number of positive integers less than or equal to a number $x$ which are not divisible by any of the first $a$ primes: $$\begin{align} &amp;\phi(x,a)=\lfloor x \rfloor-\sum_{p_i\le a}\left\lfloor \dfrac{ x }{(p_i)}\right\rfloor+\sum_{p_i&lt;p_j\le a}\left\lfloor\dfrac{ x}{(p_ip_j)}\right\rfloor-\sum_{p_i&lt;p_j&lt;p_k\le a}\left\lfloor \dfrac{x}{(p_ip_jp_k)}\right\rfloor+\dots \end{align}$$ then $\pi(x)=\phi\bigl(x,\pi (\sqrt{x})\bigr)+\pi (\sqrt{x})-1$ as given .  My question is, why does $\bigl\lfloor\phi(x,\lfloor\sqrt{x}\rfloor)+\sqrt{x}-1\bigr\rfloor$ also equal $\pi(x)?$ at least one element fixed by all the group $G$ is a p-group and $S$ is a set that $G$ acts on. p does not divide $|S|$. Why is there at least one element $a\in S$ such that $|O(a)|=1$, or in other words, $G_a=G$?  I tried to ask this question yesterday but did not word it right, so the one who helped me claim that this part is clearly true and I really do not understand why, and I couldn't get a straight answer for the past day.   Any of you are welcome to vote to delete this question (after some discussion with me about the problem I hope), but I just really want to know why it is "clearly true, because I still couldn't reason it right. Multiple monitors, multiple workspaces? I connected my laptop to my LCD. Using the laptop display hotkey I can switch between different modes - only laptop monitor on, only LCD monitor on, both on and display the same view, both on and the desktop is stretched (divided).  But, I'm looking for something else - I would like to have two workspaces, one visible on the laptop monitor and the other on the LCD.  Is that possible? Should I use center or centering for figures and tables? What is the correct way to center figures and tables (figure, table)?  \begin{center} ... \end{center}   or   \begin{centering} ... \end{centering}