Is it possible to capture nested parenthesis so that group is concluded on same level that it was started. For example:  (A AND (B)) or (C and (D or E) or (F) and G) -&gt;   Should become groups:  1 (A AND (B)) 2 (C and (D or E) or (F) and G)    But at the moment this regex doesn't quite do the job:  \([^\(](?:[^\)])*\)
I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?
Methods of speeding up a huge DELETE FROM  with no clauses Using SQL Server 2005.  I am performing a huge DELETE FROM  with no where clauses.  It's basically equivalent to a TRUNCATE TABLE statement - except I'm not allowed to use TRUNCATE.  The problem is the table is huge - 10 million rows, and it takes over an hour to complete.  Is there any way of making it faster without:   Using Truncate Disabling or dropping indexes?   The t-log is already on a separate disk.  Any suggestions welcome! Transit Visas for South Africa Undesirable-Overstay Tourists I received an undesirable status for overstaying a SA visa while hospitalized for injuries sustained in Lesotho. I had to cross into SA from Lesotho. Now I am banned entry into SA until Feb 2016 and though I have submitted a waiver request to remove the undesirable status, I hear from some the waiver request may take 4-5 months or even take longer than the time of banishment.  I have a pre-paid safari planned in October in which I need to fly through Johannesburg to get to Botswana. The Jburg border control requires tourists to pass through SA immigration even when simply changing planes.  1) Will SA grant me "transit" access if I don't leave the airport?  2) Will SA allow me to spend a night in the airport as the layover is 12 hours>  Thanks for passing on any info. $\mathbb{Q}^{\times}$ is the group of rational number without $0$ under multiplication, and $\mathbb{Z}^{n}$ is the free abelian group of rank $n$. Show that $\mathbb{Q}^{\times}$ not isomorphic to $\mathbb{Z}^{n}$. I tried to assume that there is an isomorphism and to get a contradiction.. didn't succeed How do I change the shortcut-key of show the unity dash? I don't want to use the Super for that, I want to use Alt+Space instead. ML estimate of exponential distribution (with censored data) In Survival Analysis, you assume the survival time of a r.v. $X_i$ to be exponentially distributed. Considering now that I have $x_1,\dots,x_n$ "outcomes" of i.i.d r.v.'s $X_i$. Only some proportion of these outcomes are in fact "fully realized", i.e. the remaining observations are still "alive".   If I wanted to perform a ML estimate for the rate parameter $\lambda$ of the distribution, how can I utilize the non-realized observations in a coherent/appropriate manner? I believe they still contain useful information for the estimation.   Could someone guide me to literature on this topic? I am sure it exists. I am however having trouble finding good keywords/search terms for the topic. Why is "letter" not plural in "two letter words"? Static nested class in Java, why? javax.persistence.PersistenceException : [PersistenceUnit: vodPersistenceUnit] class or package not found As I am seeing this,  the man and boat will have different displacement from ground frame,  so there should be a net work done by friction .  The books says,  total work done by friction is zero when friction is static and internal to system. Please explain.. Why has my database connection failed? How does USB device recognition work? I'm curious how USB device recognition works in Windows. I imagine it's something like this:   When you plug in a device, it tells Windows "here's my device ID to tell you what I am" Windows looks to see if any drivers have been installed that match that device ID. The driver probably tells Windows what the device should be called - like "BlackBerry Curve" or "Canon Printer" If so, it somehow associates that device with that driver Otherwise, it looks for a matching driver online (if you let it)   Am I right? If so, that still leaves some questions.   When you install drivers, where do they go? Are they files in a folder, or do they get added to the registry? What is Windows doing when it first recognizes the device, thinks, and finally says "your new device is installed and ready to use?" Where does Windows look for missing drivers? Is it in their own database? Do device manufacturers submit drivers to Microsoft for inclusion there?   Can anybody explain how this process really works? Also, do other OSes do this differently? What does this triangle/diamond schematic symbol represent? Could someone please tell me what the symbol ringed in red represents?     I know it has ON Switch pointing to it, but the symbol has other lables in different parts of the document. How do I log every command executed by a user? I want to monitor all user's activity in my server.  Even when the user executes a shell command from some editor like vim I want to see them in the log file.  I have checked the tool acct but it is not listing the complete commands. (Please correct me if I have missed some options which does already).  Which Linux tool I should be looking at to solve this problem? How to remove warnings like `Unknown media type ...` Cardinality of cartesian product of an infinite set with N I have heard that most spam filters use a reverse DNS lookup on the originating IP address of the sending SMTP server (or something like that) as part of the verification process.  I want to make sure my emails will pass this check.  How exactly can I verify that my emails are OK?  In researching it, I've noticed that if I look at the header of a valid email message coming from Gmail, I will see something like this:  Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185])         by mx.google.com with ESMTP id 10si2346996pxi.164.2009.07.22.22.26.19;         Wed, 22 Jul 2009 22:26:19 -0700 (PDT)   When I do an nslookup on 209.85.222.18, it responds with mail-pz0-f185.google.com, which is what I would expect.  If it responded with a different domain, then I assume that would indicate a problem and it would fail the check.  Is this what the reverse DNS lookup is all about or am I barking up the wrong tree? In first.bat, I use  var5=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\ CALL scripts\vc64.bat %var5%   And in scripts\vc64.bat, I use  SET var6=%1vcvarsx86_amd64.bat CALL %var6%   But I get : 'C:\Programvcvarsx86_amd64.bat' is not internal or external command..... error.  If the path assigned to var5 has no space, then it is fine.  I tried several combination of quotations and %1vcvarsx86_amd64.bat, but no change.  How do I make it works with path with spaces?    To be more precise, suppose it is C:\a b c\  In first.bat:       SET var6=C:\a b c\  =====&gt;  '"C:\avcvarsx86_amd64.bat"' is not.....`      SET var6="C:\a b c\" ====&gt;   There should not be a b      SET var6=C:\a\ b\ c\ ====&gt;    Can't find the specified path      SET var6=C:\a b c\ + Using "%var6" ====&gt; There should not be a b     Update: Here is an example. Change a b to ab works.  call.bat in C:\  @ECHO OFF  SET var5=C:\a b\ CALL C:\1.bat "%var5%"  pause   1.bat in C:\  @ECHO OFF  SET var6=%~1Test.bat CALL %var6%  RMDIR /S C:\NoWorry   Test.bat in C:\a b Test.bat in C:\ab  @ECHO OFF  RMDIR /S C:\ThereIsNoSuchFolder Change \textwidth and \textheight in mid-document I set my \textwidth and \textheight in the preamble and would like to change both for some pages. How can this be done? E.g., the following example for \textwidth appears to work for the page number, but not for the text:  \documentclass{article}  \textwidth=5cm \textheight=5cm \begin{document} A \hfill B \eject \textwidth=10cm A \hfill B \end{document}   Output (true to scale): Should the first word after a colon be capitalized? Should the first word after a colon be capitalized? Which of the following is correct?   For example: This. For example: this. I have  $m\times n = n + n + \dots + n$    in my text right now, but I would like to put a curly brace under the \dots to emphasize that there are m,n's involved. How would I do this?