I was thinking too complicated the slicing in the  I want to include (a,b), not [a,b] like this don_crissti's command:  sed '/begin{document}/,/end{document}/!d;/end{document}/q' data.tex   So I do not want to include \begin{document} and \end{document} in the output.  How can you having an open interval in the output?
I'm going to submit form using cURL, where some of the contents is come from other file, selected using sed  If param1 is line matching pattern from other file using sed, below command will works fine:  curl -d param1="$(sed -n '/matchpattern/p' file.txt)" -d param2=value2 http://example.com/submit   Now, go to the problem. I want show only text between 2 matching pattern excluding the matching pattern itself.  Lets say file.txt contains:  Bla bla bla firstmatch It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. secondmatch The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.   Currently, lots of "beetween 2 matching pattern" sed command won't remove firstmatch and secondmatch.  I want the result to become:  It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
Find probability using distribution function method I don't see the statistics information that's supposed to be on the status bar running along the bottom of the main window towards the right in version 2.9. I've working LDAP authentication with the following setup   AuthName            "whatever"  AuthType            Basic  AuthBasicProvider   ldap  AuthLDAPUrl         "ldap://server/OU=SBSUsers,OU=Users,OU=MyBusiness,DC=company,DC=local?sAMAccountName?sub?(objectClass=*)"  Require ldap-group  CN=MySpecificGroup,OU=Security Groups,OU=MyBusiness,DC=company,DC=local   This works, however I've to put all users I want to authenticate into MySpecificGroup. But on LDAP server I've configured that MySpecificGroup also contains the group MyOtherGroup with another list of users.  But those users in MyOtherGroup are not authenticated, I've to manually add them all to MySpecificGroup and basically can't use the nested grouping. I'm using Windows SBS 2003.  Is there a way to configure Apache LDAP to do this? Or is there a problem with possible infinite recursion and thus not allowed? Remote Linux server to remote linux server dir copy. How? What is the best way to copy a directory (with sub-dirs and files) from one remote Linux server to another remote Linux server? I have connected to both using SSH client (like Putty). I have root access to both. New installation – TeX editor says: "Error: Could not start the command" I just downloaded and installed Texmaker. I've never used any (La)TeX before.  When I click the Run button with an arrow next to "Quick build" I get an error saying "Could not start the command". Why? What do I need to do? Implementing a Custom Subscription Center in Salesforce Marketing Cloud Has anyone implemented a custom subscription center using landing pages? The example one from the documentation doesn't seem to be working. I would really like to just customized the out of the box one but the amp script is hidden when I view source. Does anyone have and tips/tricks for creating a sub center?  Thanks! I am making an Android game that is only in portrait screen orientation.  It works great when I run it on my phone, but when I run it on a tablet, even though the screen size is bigger, all of the bitmaps are the same size. Is there any way to make the bitmaps stay the same proportion even on different size screens? I have spent a whole day trying to solve the following problem. Please help if you know how to do this.  I am using natbib (\usepackage[sort&amp;compress,square,comma]{natbib}), and my current citation style looks like [1-4], [5, 8-9].  What is the easiest way to change the citation style to [1]-[4] and [5],[8]-[9]? How do I get the feature id after featureAdded signal (PyQGIS)? I'm trying to make an edit form in QGIS (Python code) ,and i want after feature drawing to get the id, and the feature to be selected. Do you have any ideas to do that?  Tried so far:  self.iface.activeLayer().featureAdded.connect(self.myfonction)  def myfonction(self):      for feat in self.iface.activeLayer().getFeatures():         self.iface.activeLayer().setSelectedFeatures([feat.id()]) Is the universe finite or infinite? Chrome asks for password to unlock keyring on startup In Google Chrome, when I go to a login page, a window pops up asking to "Enter password for keyring 'default' to unlock". In most cases, whether I click Cancel or enter my password, the login form gets auto filled anyway.  How do I get rid of the popup? I want it to auto login each time, not ask for my system password. The dialog box never appears for any other apps. Pluralization rule for "five-year-old children", "20 pound note", "10 mile run" I want the QED symbol to be 1 line lower at the end of proof I have a simple question.     over centuries / for centuries   what is the difference?  Thank you. Ch.3 #7. Prove that the convergence of $\sum a_n$ implies the convergence of $$\sum \frac{\sqrt{a_n}}{n},$$ if $a_n \geq 0$.      My attempt. If $\sum a_n$ is convergent, then by the root test, $\lim_{n \rightarrow \infty} sup \sqrt[n]{|a_n|} &lt; 1$. This means $|a_n|^{1/n} &lt; 1$. Because $a_n \geq 0$, this means $a_n ^{1/n} &lt; 1$. Now apply the root test to $\sum \frac{\sqrt{a_n}}{n}$ by considering $$\lim_{n \to \infty} sup \sqrt[n]{|\frac{\sqrt{a_n}}{n}|}.$$ $$\sqrt[n]{|\frac{\sqrt{a_n}}{n}|} = \frac{\sqrt{{a_n}^{\frac{1}{n}}}}{\sqrt[n]n}.$$ Because  $a_n ^{1/n} &lt; 1$, certainly the numerator on the left-hand side of the equation above is $&lt;1$. And because $n$ tends to $\infty$, and $n &gt; 1 \rightarrow \sqrt[n]n &gt; 1,$ the denominator is $&gt;1$. Therefore the limit is $&lt;1$ and the root test implies that $\sum \frac{\sqrt{a_n}}{n}$ converges.     If there are any errors in my proof, I think they come from 1) my assumption of the converse of the root test theorem and 2) my misunderstanding of $\lim_{n\to\infty} sup$. Thanks in advance for your help. Statistics  () In Q1 of 2012 - 0.0134 such comments per question (~1.33%) In Q2 of 2012 - 0.0167 such comments per question (~1.66%) In Q3 of 2012 - 0.0169 such comments per question (~1.68%) In Q4 of 2012 - 0.0193 such comments per question (~1.92%) In Q1 of 2013 - 0.0223 such comments per question (~2.22%)  The vast majority of these questions need serious help.  Unfortunately, there is a growing trend towards abuse Along with the good, comes some bad -- as usual in life. These comments are bad when  Posting &quot;what have you tried&quot; multiple times per question is severely obnoxious Posting &quot;what have you tried&quot; when the user has clearly shown that they have tried to solve it on their own  It is becoming increasingly common to see &quot;what have you tried?&quot; comments in these scenarios. Some examples     Workarounds Flagging Comments - It is considered a good thing to be liberal with comment flagging -- that helps us clean up after the fact. &quot;Too Chatty&quot; is a no-brainer here. Unfortunately, that only cleans up after the damage has been done. All signs point toward the continued increase of the trend of using &quot;what have you tried&quot; comments. I spend a lot of time editing and cleaning up bad questions. This trend came up on my radar toward the end of last year and it is getting worse. So, I thought at the very least that I'd raise some awareness. Gravity in 2d space and inverse linear law In our three-dimensional universe, gravity obeys the inverse square law. In a four-dimensional universe, gravity would be expected to obey the inverse cube law et cetera.  In a two-dimensional universe, one would similarly expect gravity to obey an inverse linear law. I've seen it claimed that this is not actually true, when you work it out according to general relativity there would actually be no gravity at all in such a universe. Is this true? If so, is there a layman's explanation of why? Is it related to the fact that gravitational potential wells would be infinitely deep?  Would electrostatic forces follow the same law as gravity?  If there existed infinitely long strings in our universe, would they have the same gravitational effect as point particles in a 2d universe? Add Fake Display when No Monitor is Plugged In I have an Ubuntu 14.04 server that has no external monitor connected.  I use NoMachine to remote control the machine.  When I do so, the Unity/Gnome interface doesn't see any monitors connected, so I can only use 800x600 when connecting with NoMachine.  If I plug in a monitor, I can set the resolution to whatever size the NoMachine window is on the remote computer.  Is there a way to create a "fake" monitor device on Ubuntu so I can set a desktop resolution in Unity/Gnome? Transit visa for Indian citizen traveling through Hong Kong Black screen on boot after AMDGPU-Pro install (16.04) I have been having some screen freezing issues on my new Ubuntu 16.04 system, and have been in the troubleshooting process for this issue. I thought it was a graphics driver problem, as I am running an AMD R9 380x card which was supposed to be fully supported by the open-source AMDGPU driver preinstalled with 16.04, but after looking around online, many people seem to have issues with. I thought the answer would be to install the recently released AMDGPU-Pro driver , following the instructions from . However, when I reboot I am getting a black screen. Is there an easy way to revert my changes back? My machine was semi-functional with the freezing issue but now with no video at all is useless to me. How to proceed?