I need to replace a string in 14th to 20th position in a file with input value  String = A2245 4764ABC0000342  string to be replace = 0000342 with 0000992  I tried using sed but did not work.
How can I find and replace specific words in a text file using command line?
After deleting all nodes, how do I reset the node ID to start from 1 again? I generated tons of dummy content for testing, and then deleted them all.  As nid is auto-increment, newly created node will have a nid of last created nid +1.  How can I make nid start from 1 again? $Q_8$ is isomorphic to a subgroup of $S_8$, but not isomorphic to a subgroup of $S_n$ for $n\leq 7$. Question is to prove that :     $Q_8$ is isomorphic to a subgroup of $S_8$, but not isomorphic to a subgroup of $S_n$ for $n\leq 7$.   I see that $Q_8$ is isomorphic to subgroup of $S_8$ by left multiplication action.  Hint given was to prove that stabilizer of any point contains $\{\pm 1\}$.  To prove Cayley's theorem, stating any group is isomorphic to a subgroup of $S_n$ we take action of given group on a set $A$ having same cardinality.  with that motivation I want to check if there is a Isomorphism then there is a map from $G\times A \rightarrow A$. i.e., $G$ gives a permutation group $S_A$.  I tried in same manner. Suppose $Q_8$ is isomorphic to subgroup of $S_n$ with $n\leq 7$  then it should come from a group action of $Q_8$ on a set of cardinality atmost 7.   Suppose $Q_8$ acts on a set $A$ with possible cardinality at most 7.  $stab(a)=\{g\in Q_8 : g.a=g \forall a\in A \}$  $cl(a)=\{g.a : g\in Q_8\}$  I know number of elements in class of $a$ equals to index of stabilizer.  As $cl(a)=\{g.a : g\in Q_8\}\in A$ i.e., $cl(a)\subseteq A$ and as $|A|\leq 7$ i see that $|cl(a)|\leq 7$.  But, $|cl(a)|=|Q_8:stab(a)|$ for any element $a\in A$.  So, $|Q_8:stab(a)|=|cl(a)|\leq 7$ for all $a\in A$.   So, $stab(a)$ should be non trivial subgroup of $Q_8$ if not then $|Q_8:stab(a)|=8$  non trivial subgroup (proper) of $Q_8$ contains $\{\pm1\}$.  So, In the worst case, $\{\pm 1\}\subseteq stab(a)$ for all $a\in A$.  As $Ker(\eta)=\cap_{a\in A}stab(a)$ (where $\eta$ is the action of $Q_8$ on $A$)   we see that $\{\pm 1\}\subseteq Ket(\eta)$ which means that $Ker(\eta)$ is non trivial.  thus there is no isomorphism (coming from $\eta$) between $Q_8$ and any subgroup of $S_7$.  I would be thankful if someone can check whether my approach is correct or if there is any other simple possible way.  P.S : Usually what i do to see whether two groups are isomorphic or not is to check for cardinality, abelian property, no of elements with same order and so on. But I was having no idea when i fail in all these ways. With this Group actions i could see possibility for getting a precise conclusion on Isomorphisms.I would like to Thank Mr. Jyrki Lahtonen (a user of Math.SE) who made me to get used to Group actions.  P.S $2$: If any thing is wrong in my idea, it is entirely my fault, and if anything is correct in this whole credit should go to Mr. Jyrki Lahtonen Question about arithmetic–geometric mean We have two sequences: $$a_{n+1}=\sqrt{a_nb_n}$$ $$b_{n+1}=\frac{a_n+b_n}{2}$$ I need to prove that those are making Cantor's Lemma.(At the end I shold get that: $\lim_{n\to \infty}a_n=\lim_{n\to \infty}b_n$ by Cantor's Lemma)  Any ideas how?  Thank you. ffmpeg - how to apply filters without losing quality $$e^{i} = e^{i2\pi/2\pi} = (e^{2\pi i})^{1/(2\pi)} = 1^{1/(2\pi )} = 1$$  Obviously, one of my algebraic manipulations is not valid. How are classical optics phenomena explained in QED (Snell's law)? How is the following classical optics phenomenon explained in quantum electrodynamics?   Reflection and Refraction   Are they simply due to photons being absorbed and re-emitted? How do we get to Snell's law, for example, in that case?  Split by request: See the other part of this question . I’m making a little movie with using multiple computers. I can't use the network so I've divided the frames of the animation over the computers. Unfortunately now there are frames missing. What I'd like to do is using 1 machine to render all the missing frames. For example: 4-24-35-64-143 but ideally in such a way that I don't have to re-start blender multiple times. Is this possible somehow? Elastic IP address on EC2 instance interface without 1:1 NAT $f \in L^1$, but $f \not\in L^p$ for all $p > 1$ "Find an $f \in [0,1]$ such that $f \in L^1$ but $f \not\in L^p$ for any $p &gt; 1$."  I've thought about doing something like $$f(x) = \frac{1}{x}$$ where $|f|^p = \frac{1}{x^p}$ doesn't converge when $p &gt; 1$.  But this function isn't itself in $L^1$.  Could someone please give me a hint for how to solve this problem?  I wish there were a situation where you had convergence on the closed half disc $[0,1]$ and divergence on $(1, \infty)$, rather than my current predicament where I have convergence on the open half-disc $[0, 1)$ and divergence on $[1, \infty)$. Are there any way to execute a query inside the string value (like eval) in PostgreSQL? The buttons on the modal dialog box for leaving a page with unsaved changes are confusing If you are editing a question and decide to close the tab/window/whatever, SO opens up a dialog box asking you if you are sure. The buttons for this dialog are "OK" and "Cancel". However, what these map to is not entirely obvious. It would make more sense to change them to action words describing what they do. For example, it could be "Close this Question" and "Stay Here". This would eliminate the need to explain which button does what in the dialog itself and require less work from the user. Difference between live and neutral wires In domestic electrical circuits, there are 3 wires - live, earth and neutral. What is the difference between the live and neutral wires?  As there is AC supply, it means that there are no fixed positive and negative terminals. Current rapidly switches direction. Does that not mean that both the live and neutral wires carry the same amount of current, alternatively? Why is the neutral wire called 'neutral'? Cardinal of quotient rings of gaussian integers. It is known that $\mathbb{Z}[i]$ is a PID and that $\mathbb{Z}[i]/(a+bi)\mathbb{Z}[i]$ is finite for all $(a,b) \in \mathbb{Z}^2\backslash \{(0,0)\}$.  My question :      Is there any result on the cardinal of  $\mathbb{Z}[i]/(a+bi)\mathbb{Z}[i]$ ? Coefficient changes sign when adding a variable in logistic regression I'm stuck in a problem of mapping numbers from one range to another. I want to calculate popularity of a web page based on the number of page hits on a scale of 10. The problem is total number of web pages are around 41,00,000 and the web pages for which page visit is given are only 1,70,000. Also, the page visit for a web page is between 20,000 and 1.  Now, I'll try to rephrase the above problem in more mathematical problem, I have 41,00,000 objects for which I need to calculate some factor "po". Out of these 41,00,000 objects, 1,70,000 objects contain some number 20,000 &lt;=y &lt;= 1. Now how can I calculate "po" for each object on scale of 10.  The data mostly looks like,  O1: 20,000 O2: 17,000 O3: 16,000 . . . . . . . O19: 334 O20: 300 . . . . . . . On: 1 and so on......   Mostly, objects have page visits = 1.  I tried calculating page visit for each object/maximum page visit for an object but that gives me very small values(like 1/20,000 is a very small number). I want my resulatant po values to be at some distance from one another so that I can differentiate between them.  Can anyone please suggest me some solution ?  Thanks I am trying to put a server together to install Ubuntu. I bought an Intel S1200v3RPS motherboard and plugged an Intel Xeon E3 processor into it. I purchased a 1U chassis from Supermicro with a power supply.  The power supply does not have a 5-pin cable to the motherboard's Auxiliary Power Supply socket. A bit of research did not give any definite answer on the need for the 5-pin connection. The motherboard does not power on and the CPU fan is off. I tested the power supply on a desktop Intel motherboard and it works fine.   I would like to buy a new power supply but could not find one which expressly stated that it comes with the 5-pin aux power supply cable. Any recommendations on a power supply unit for this motherboard would be helpful. Any comments on the problem would be greatly appreciated. I'd like to prove a nice property of a stochastic integral with respect to Brownian motion.   Let $(H_t)_{t\geq0}$ be a progressive and bounded process that is continuous at $0$ and $B$ a standard Brownian motion. Then  $\frac{1}{B_{\varepsilon}}\int_{0}^{\varepsilon}H_s\mathbb{d}B_s\rightarrow H_0$ as $\varepsilon\rightarrow0$ in probability.   Anyone got some hints ? I'm really puzzled and I don't know where to start.   EDIT_2.0. Applying Ito-Isometry might be a bit tricky. This Brownian Motion in the denominator kinda troubles me :/ Splitting a string into words and punctuation I'm trying to split a string up into words and punctuation, adding the punctuation to the list produced by the split.  For instance:  &gt;&gt;&gt; c = "help, me" &gt;&gt;&gt; print c.split() ['help,', 'me']   What I really want the list to look like is:  ['help', ',', 'me']   So, I want the string split at whitespace with the punctuation split from the words.  I've tried to parse the string first and then run the split:  &gt;&gt;&gt; for character in c: ...     if character in ".,;!?": ...             outputCharacter = " %s" % character ...     else: ...             outputCharacter = character ...     separatedPunctuation += outputCharacter &gt;&gt;&gt; print separatedPunctuation help , me &gt;&gt;&gt; print separatedPunctuation.split() ['help', ',', 'me']   This produces the result I want, but is painfully slow on large files.  Is there a way to do this more efficiently? Electrical potential energy stored in vacumm for a single point charge? I have come to know the electrostatic potential energy in vacuum is given by $${\frac{1}{2}} \epsilon_0\int d^3x {E^2} $$ and this energy  is due to the mutual electrostatic coulomb potential energy. So only a single point charge in space also contributes to some electrostatic potential energy according to $${\frac{1}{2}} \epsilon_0 \int d^3x {E^2} $$  as due to a single point charge also we have an electric field at every point in space. Now I am not getting it physically, why should there be any Coulomb energy in this case as there is no other charge to provide the electrostatic coulomb potential energy? Combinatorial Proof Question: Vandermonde convolution identity I'm really iffy on combinatorial proofs in general and now that there is a sum, it's just confused me even more. Can someone try and walk me through this proof?  $$ \binom{m + n}{r} = \sum_{k=0}^r \binom{m}{k}\binom{n}{r - k} $$