I have a requirement to do a field validation using regEx. The requirement is not to have any special characters. It is working for me for a single white space, but not for multiple white spaces. It does not work if there is a white space at the beginning. Can you please help me with this?  This is what I used:  ^(\w+ ?)*$
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?
LaTeX figures side by side How can I echo a newline in a batch file? How can you you insert a newline from your batch file output?  I want to do something like:  echo hello\nworld   Which would output:  hello world Can ribosomes read ssDNA? My question is whether translation can be done, either naturally or artificially, through a ribosome reading (single-stranded) DNA directly. If not, I would like to know what allows ssRNA to be translated but not ssDNA. In The Matrix Revolutions, when Neo and Trinity are trying to get to the Machine City, when the Machines launch weapons against them, Neo is able to destroy some of the incoming weapons. This is in the real world at this point, not in the Matrix.  How does Neo have any powers against the machines outside of the Matrix? Addendum: I'm looking for in universe answers only.  I would think that would be obvious, but I'm adding this after an answer that is essentially, &quot;It's a movie...&quot; Prove that for all sets A and B, A ∩ B = ∅ implies ( A ∪ B ) - B = A In the next proof we avail ourselves of the next lemma: For all sets A and B, ( A ∪ B ) - B = A. Proof: Let A and B be arbitrary sets and let x ∈ ( A ∪ B ) - B. x ∈ ( A ∪ B ) - B ⇔ x ∈ ( A ∪ B ) ∧ x ∉ B ⇔ ( x ∈ A ∨ x ∈ B ) ∧ x ∉ B ⇔ ( x ∈ A ∧ x ∉ B ) ∨ ( x ∈ B ∨ x ∉ B) For p ∧ ~ p ≡ F and p ∧ q ⇒ p where p and q are prepositions, ( x ∈ A ∧ x ∉ B ) ∨ ( x ∈ B ∨ x ∉ B ) ⇔ x ∈ A ∨ F By modus tollendo ponens, x ∈ A ∨ F ⇔ x ∈ A So then, x ∈ ( A ∪ B ) - B ⇔ x ∈ A And ( A ∪ B ) - B = A Therefore, the statement for all sets A and B, A ∩ B = ∅  implies ( A ∪ B ) - B = A is true trivially. Is this proof right? At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file.   The sample I came up with is essentially something like:  &lt;INVENTORY&gt;    &lt;ITEM serialNumber="something" location="something" barcode="something"&gt;       &lt;TYPE modelNumber="something" vendor="something"/&gt;     &lt;/ITEM&gt; &lt;/INVENTORY&gt;   The other team said that this was not industry standard and that attributes should only be used for meta data. They suggested:  &lt;INVENTORY&gt;    &lt;ITEM&gt;       &lt;SERIALNUMBER&gt;something&lt;/SERIALNUMBER&gt;       &lt;LOCATION&gt;something&lt;/LOCATION&gt;       &lt;BARCODE&gt;something&lt;/BARCODE&gt;       &lt;TYPE&gt;          &lt;MODELNUMBER&gt;something&lt;/MODELNUMBER&gt;          &lt;VENDOR&gt;something&lt;/VENDOR&gt;       &lt;/TYPE&gt;    &lt;/ITEM&gt; &lt;/INVENTORY&gt;   The reason I suggested the first is that the size of the file created is much smaller. There will be roughly 80000 items that will be in the file during transfer. Their suggestion in reality turns out to be three times larger than the one I suggested. I searched for the mysterious "Industry Standard" that was mentioned, but the closest I could find was that XML attributes should only be used for meta data, but said the debate was about what was actually meta data.  After the long winded explanation (sorry) how do you determine what is meta data, and when designing the structure of an XML document how should you decide when to use an attribute or an element? This is similar to , but I believe it's a bit different*.  Sites like GMail support a preference that pushes all traffic through the SSL edition of the site rather than the plain-text protocol.   For sites that don't offer such preferences (or ones that may, but I have been unable to find, like facebook), is there a way using only the browser (perhaps with a plugin or addon) to always try SSL first, and fall-back to plain-text iff SSL fails?  Is that solution available on Windows, Mac OS X, and Linux? Just one?     * The previous question was looking for external applications that would accomplish this goal. Best way to run scheduled tasks Today we have built a console application for running the scheduled tasks for our ASP.NET website. But I think this approach is a bit error prone and difficult to maintain. How do you execute your scheduled task (in an windows/IIS/ASP.NET environment)  Update:   Examples of tasks:   Sending email from an email-queue in the database Removing outdated objects from the database Retrieving stats from Google AdWords and fill a table in the database. Protect .NET code from reverse engineering? Obfuscation is one way, but it can't protect from breaking the piracy protection security of the application. How do I make sure that the application is not tampered with, and how do I make sure that the registration mechanism can't be reverse engineered?  Also it is possible to convert a C# application to native code, and  is too costly.  C# provides lot of features, and is the ideal language for my code, so writing the whole codebase again in C++ is out of the question.  Secure certificates can be easily removed from the signed assemblies in .NET. Can "what kind" be plural? Is it correct to say, "What kind of patents are being issued in these sophisticated times?" It seems like it should be What kind of patents is being issued..., but that sounds wrong.  What kind of patent is being issued... is correct and sounds right, but loses a little bit of the original meaning.  Is there something magic about what kind that allows it to be plural, or do people just misuse it a lot? How to rename partitions? I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error:  (Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test  (udisks-error-quark, 0))   and this happen also to any attached usb to my laptop. How does a circular lens produce rectangular shots? How can I tell how long (more or less) it will take me to complete a game? I'm going down my huge backlog of unplayed Steam games and I'm thinking the best way to tackle the list is to go through the shortest games first and then concentrate on the 20+ hour ones. I'm wondering if there's a website or something else that has an estimated amount of gameplay time for games.   Is there anything like that? What can I do to manage my phone's internal storage? I've been googling for some time now, and can't find the manual for the TikZ library calc. All I see is people using it. Where can I find the manual or some info?  Is it the same as the LaTeX package calc? The latter doesn't seem to mention TikZ in the manual. Which is the easiest way to evaluate $\int \limits_{0}^{\pi/2} (\sqrt{\tan x} +\sqrt{\cot x})$? Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland? I installed Ubuntu 17.10. Now I am having trouble with gksu:  $ gksu -dg synaptic No ask_pass set, using default! xauth: /tmp/libgksu-HgUjgQ/.Xauthority STARTUP_ID: gksu/synaptic/8760-0-alex-XPS-15-9530_TIME4974977 cmd[0]: /usr/bin/sudo cmd[1]: -H cmd[2]: -S cmd[3]: -p cmd[4]: GNOME_SUDO_PASS cmd[5]: -u cmd[6]: root cmd[7]: -- cmd[8]: synaptic buffer: -GNOME_SUDO_PASS- brute force GNOME_SUDO_PASS ended... Yeah, we're in... Unable to init server: Could not connect: Connection refused (synaptic:8767): Gtk-WARNING **: cannot open display: :1 xauth: /tmp/libgksu-HgUjgQ/.Xauthority xauth_env: (null) dir: /tmp/libgksu-HgUjgQ   If I don't use -g, the password dialog is disabled. So looks like a problem with creating a tty for root.  Any advice? I know how to successfully duplicate an object by using  bpy.ops.object.add_named(name = 'TemplateObjectName')   If the template object named 'TemplateObjectName' has animations, particle systems and modifiers attached to it, the previous call will create a duplicate object that also has those components. However, if I duplicate an object using   template_object = bpy.data.objects['TemplateObjectName'] new_object = bpy.data.objects.new('NewObjectName', template_object.data) collection.objects.link(new_object)   how do I attach the template object's animation, modifiers, particle systems...? Java Swing: Displaying images from within a Jar When running a Java app from eclipse my ImageIcon shows up just fine.  But after creating a jar the path to the image obviously gets screwed up.  Is there a way to extract an image from the jar at runtime so I can then open it up?  Or, is there a better way to do this?  I'd like to distribute a single jar file if possible. Getting full JS autocompletion under Sublime Text