Removing string(s) within delimiter chars from another string C#
My regex is matching too much. How do I make it stop?
Why should I declare a virtual destructor for an abstract class in C++? I know it is a good practice to declare virtual destructors for base classes in C++, but is it always important to declare virtual destructors even for abstract classes that function as interfaces? Please provide some reasons and examples why. Analysis's output vs analysis output vs output of the analysis Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function? How to circumvent using an out parameter in an anonymous method block? The following method does not compile. Visual Studio warns "An out parameter may not be used within an anonymous method". The WithReaderLock(Proc action) method takes a delegate void Proc().  public Boolean TryGetValue(TKey key, out TValue value) {     Boolean got = false;     WithReaderLock(delegate     {         got = dictionary.TryGetValue(key, out value);     });     return got; }   What's the best way to get this behavior? (Please refrain from providing advice on threadsafe dictionaries, this question is intended to solve the out parameter problem in general). What hardware does Ubuntu Touch support? With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss &amp; Oli: We are making this the master question for all future "Will this work on &lt;insert random tablet/phone/device here&gt;?!" questions File list command line (hidden and subfolders) I have a Gary Fisher bike (wahoo I believe). I think it's considered the entry level Fisher mountain bike.  Could I put on disc brakes as opposed to using the standard  brakes on this bike?  Standard brakes are the rim brakes.   Thanks Carlos Selecting an ID with a colon in it with jQuery I am using 15.04.   So I'm working with git and I installed the standard version. I set up the ssh keys and was able to clone one of my repositories to the correct folder. Everything was working great and then I decided it was a good idea to install more packages. I ran sudo apt-get install git-all. I'm looking at error codes now having to deal with upstart.  start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused No apport report written because the error message indicates its a followup error from a previous failure. dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of git-daemon-run:  git-daemon-run depends on runit; however:   Package runit is not configured yet.  dpkg: error processing package git-daemon-run (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  runit  git-daemon-run E: Sub-process /usr/bin/dpkg returned an error code (1)   This is what happens when I even update/upgrade my system. At this point all I'm looking to do is be able to install software and update my current software. Is there any way I can potentially reverse this issue or at least correct it?   Edit: Thankfully this issue was solved only a day or two after it happened. The accepted answer worked perfectly and took care of my issue The problem is this:      Suppose $I \subseteq R$ is a nilpotent ideal and there is $r \in R$ with $r \equiv r^2 \pmod I$. Show $r \equiv e \pmod I$ for some $e \in R$ idempotent.   I have spent a few hours rolling around in abstracta with no destination. I believe that if I could write down a concrete example of this, the example could guide me through the abstract definitions and show me where to look for an idempotent in $R$. I have looked at 2x2 matrices and could not find any such examples. Might anybody have one? find all $(x,y,z)$ such that $27^{3x^2 + 2y}+27^{3y^2 + 2z}+27^{3z^2 + 2x}=1$ Find all ($x,y,z$) such that $$ 27^{3x^2 + 2y}+27^{3y^2 + 2z}+27^{3z^2 + 2x}=1$$  I am a high school student and would appreciate it if anyone could solve it using high school mathematics. here is what I have tried till now: $$ 3x^2 +2y &lt; 0 $$ (this can also be said for the other 3 equation. it also means that x,y,z&lt;0) $$ -2y&gt;3x^2 $$ $$ 4y^2&gt;9x^2 $$ ( -2y and 3x^2 are both positive) $$ 3y^2&gt;27/4 x^2 $$ $$ -2z&gt;3y^2&gt;27/4 x^4 $$ $$ 4z^2 &gt; 729/16 x^8 $$ $$ 3z^2&gt; 2187/64 x^8 $$ $$ -128/2187&lt;x^7 $$ $$ -2/3 &lt; x $$ $$ -2/3&lt; x,y,z &lt; 0 $$ i tried this but as you can see didn't do much good Is there a way to have a copy of any message sent from a Gmail account sent to another address?  I've got any messages coming to my address copied to another (see  for one solution, setting up filters is another), but I haven't yet found a way to have outbound messages automatically copied.  Is there a way? Export nodes from Drupal 4? I am looking into updating a Drupal 4 site. The Node Export module does not seem to have a release suitable for Drupal 4. Can anyone recommend an alternative module or procedure?  The site is running Drupal 4.6.3. Limit of $\left(1-\frac{1}{n^2}\right)^n$ Show that the cardinality of $\mathbb N$ is the same as the cardinality of $\mathbb N \times \mathbb N$ Show that $| \mathbb N | = | \mathbb N \times \mathbb N |$, i.e., the cardinality  of $\mathbb N$ is the same as the cardinality of $\mathbb N \times \mathbb N$.   How do I show it using the Fundamental Theorem of Arithmetic and the Schröder–Bernstein Theorem? Solving $\sqrt{x+5} = x - 1$ How can I drive 12v LEDs from my Arduino Nano? Background I am building a scale RC helicopter and ordered a bunch of 3mm LEDs to give it some nice navigation and strobe lights which I plan to drive with an Arduino Nano. Problem is that I goofed and didn't notice that the LEDs are 12v until they arrived.  I know that the Arduino Nano can accept 12V on pin 30, but I think the voltage output on any of the &quot;D&quot; or &quot;A&quot; pins is always 5v (correct??). Question If the voltage output of the Arduino pins is 5v, then how can I drive the 12v LEDs using the Arduino, or is it impossible? How can I add an application to the GNOME window manager? The GNOME on-board documentation covers only the things anyone can easily guess. I have an application for that I can only start from the command line. Not that I mind using a terminal but ...  Anyway, how do I add the command (and preferably a nice logo) to GNOME WM? Best way to add KeyEvents and faster Quit facing difficulty to create dynamic xpath for City field of UTest website I am beginner in automation field, I am trying to automated one of the module, I have tried many different XPATH to fetch proper XPATH for City field o UTest site. Im trying to automate registration module as one of my assignment. I have tried my different xpath example below:  //xpath="//body/div[@class='pac-container pac-logo']/div/span[2]/span" //div[@class='pac-item']/span[3] //div[@class='pac-item']/span //div[@class='pac-container pac-logo']/div/span[2]/../span[3]   the following code written:  //xpath to send data in field @FindBy(xpath="//input[@placeholder='Enter a location']") WebElement city;  //xpath for list to appear @FindBy(xpath="div[@class='pac-item']/span") List&lt;WebElement&gt; City;  public void EnterSignupTwo(String CiTy) throws Exception {     city.clear();     city.sendKeys(CiTy);     Thread.sleep(3000);     System.out.println("the size of List " +City.size());//printing list size      for(int i=0; i&lt;City.size(); i++ ) {         String cities = City.get(i).getText(); //storing list element in String         System.out.println("Converted value of city :"+cities); //print of total list      if(cities.contains(CiTy)) //if parameterized match with Available then click     {         System.out.println("enter specific value of city :"+City.get(i).getText());         City.get(i).click();         break;     } }   kindly refer the