I have a regex but after the dot you can fill in just 1 letter... i want to type atleast 2 letters like test@test.com or test@test.fr but not test@test.d  /^(?:[\w\!\#\$\%\&amp;\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&amp;\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/   What is wrong?
Is there a regular expression to validate an email address in JavaScript?
I want to do this using the Math.Round function Is it true that $||a|^p - |b|^p| \le C_p|a - b|^p$ for $1 < p < \infty$? If $a, b \in \mathbb{C}$, then we have the standard triangle inequality for the difference:  $$||a| - |b|| \le |a - b|.$$  I am wondering if this inequality generalizes to exponents greater that one.     My question is, for $1 &lt; p &lt; \infty$, does there exists a constant $C_p$ such that $||a|^p - |b|^p| \le C_p|a - b|^p$ for all $a, b \in \mathbb{C}$?   I am aware of the "standard" triangle inequality for $p &gt; 1$:  $$|a +b|^p \le 2^{p}(|a|^p + |b|^p),$$  and that $2^p$ may not be sharpest constant possible. If I try to use this estimate to prove, say, that $|a|^p - |b|^p \le C_p |a - b|^p$, I get stuck with an extra term that I'm not sure what to do with.  $$|a|^p - |b|^p \le 2^p|a -b|^p + (2^p -1)|b|^p.$$  A resolution on this matter is greatly appreciated. Why use a dedicated light meter instead of the one built into the camera? How to keep the console window open in Visual C++? I'm starting out in Visual C++ and I'd like to know how to keep the console window.  For instance this would be a typical "hello world" application:   int _tmain(int argc, _TCHAR* argv[]) {     cout &lt;&lt; "Hello World";     return 0; }   What's the line I'm missing? I had two drives partitioned the same and running two RAID partitions on each.  One died and I replaced it under warranty for the same model.  While trying to partition it, the first partition can only start on sector 2048, instead of 63 that was before. Drive have different geometry as previous and remaining ones. (Fewer heads/more cylinders)  Old drive:  $ sudo fdisk -c -u -l /dev/sdb   Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000aa189     Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *          63   174080339    87040138+  83  Linux /dev/sdb2       174080340   182482334     4200997+  82  Linux swap / Solaris /dev/sdb3       182482335  3907024064  1862270865   fd  Linux raid autodetect   Remanufactured drive received from warranty:  $ sudo fdisk -c -u -l /dev/sda  Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d0b5d     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048  ...   Why is that? How to check if sed has changed a file How do I change the login manager's keyboard layout? I have a netbook with an AZERTY layout. I've changed it to "bépo" to try it, but now I've reset it to a french layout.  While all the apps have taken the change into account, Ubuntu's login manager still uses bépo, making entering passwords a challenge. I've enabled the virtual keyboard for the time being so that I could login again.  I don't remember what I had done in the first place to switch the login screen to bépo, but now I can't switch it back.    EDIT : In the keyboard settings page, if I click "use system defaults", then everything is in bépo ! Where is this different keyboard layout set ?  ANOTHER EDIT : Here's what did not work :   Changing the layout in settings using the "use system defaults" checkbox in settings sudo dpkg-reconfigure keyboard-configuration changing it in Xconf adding a line in /etc/lightdm/lightdm.conf  sudo dpkg-reconfigure locales slaming head against desk dpkg-reconfigure lightdm sudo gsettings set org.gnome.libgnomekbd.keyboard layouts "['fr']" combinations of the above     Is it possible to relaunch the keyboard configuration tool that's in ubuntu's setup ? The thing has automatic layout detection and it changes the setting everywhere. Storage for Eldritch Horror Is there an optimal strategy for storing Eldritch Horror cards and tokens so that game play is facilitated.   I am not looking for answers that including "zip bags" and other things to keep the game element safer while is storage. Although, a strategy that works well for both cases will clearly be superior to one that only works for game play.  I am not limiting this to commercial solutions. I am quiet happy to build your custom made solution if you release the specification/plans of course!  Although, it it requires a 3D printer, more power to you. Dual-boot boot menu does not show up after installing Ubuntu 15.10 alongside Windows 10 I have installed Ubuntu 15.10 alongside Windows 10 with UEFI. To install Ubuntu, I chose the option install alongside Windows 10 or something similar to this. Then I created a new partition for Ubuntu and installed it. After installation, the boot menu did not show up. Initially I thought Ubuntu has not been installed, but when I plugged in the USB drive and wanted to install Ubuntu I saw an option of reinstalling Ubuntu on my machine. So, I found out that Ubuntu is installed. Pressing F8 and F12 also does not help. Can anyone help me bring up the GRUB boot menu? In Windows, I also entered the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in cmd, but still the boot menu does not show up.  Reply (Himanshu) : Just boot in bios and, if you can, add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi. No need for live PCB or anything. Move the boot option to top. This is for dell GUI bios but I assume it works for all. Or you may want to see  or , where you can enable Windows Boot Loader for one boot or forever as you wish, and boot Ubuntu from it. If you want now, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead. (Not enough reputation to answer properly btw.) One of the achievements for the Thieves Guild says "Restore the Thieves Guild to its former glory."  Brynjolf doesn't say anything to me, I can't seem to find Karliah, and as far as I can tell, I am finished with the plotline quests for the Thieves Guild. All I have left available are repeatable quests from Vex and Delvin.  How can I get this achievement? How can I sound proof bathroom walls? I'm trying to figure out the best, least intrusive way of sound proofing the walls of a bathroom. The bathroom shares a wall with my bedroom, and my 3 yea old's bedroom. The main problem is the sound of water running (plus every bump on the counter and everything) echos loud and clear through the wall into my sons room.  I found  and it seems like a good choice. Another option is adding another layer fo drywall with something like  between them. But all the walls and ceilings in the house are textured. So replacing just one or two walls in a room is just not possible.   This is the layout of the two rooms. I've added red box around the wall with the most noise.   Is there anything else I'm missing here that I could do to dampen the noise short of tearing the bathroom apart? In C#, can I convert a string value to a string literal, the way I would see it in code? I would like to replace tabs, newlines, etc. with their escape sequences. If this code: Console.WriteLine(someString);  produces: Hello World!  I want this code: Console.WriteLine(ToLiteral(someString));  to produce: \tHello\r\n\tWorld!\r\n Determining true mean from noisy observations I have a large set of data points of the form (mean, stdev). I wish to reduce this to a single (better) mean, and a (hopefully) smaller standard deviation.  Clearly I could simply compute $\frac{\sum data_{mean}}{N}$, however this does not take in to account the fact that some of the data points are significantly more accurate than others.  To put it simply, I wish to preform a weighted average of these data points, but do not know what the weighting function should be in terms of the standard deviation. Run script as root at login (no sudoer user, shell session) Much like /etc/profile and ~/.profile but ran by root instead of the user is doing login. /etc/rc.local runs after boot but I need running the script before login. The user is not a sudoer one.   Thanks! I want to upgrade my Ubuntu 13.04 to Ubuntu 13.10. I'm unable to do via GUI.   [ The reason why I'm unable to do so:  Via software updater, I proceed ahead and click upgrade (for upgrading my OS). I authenticate by providing my password. Then it proceeds and downloads upgrade tool. That time only (while downloading the tool) error message comes "system program problem detected". It then doesn't proceed ahead and I click to report the problem ]  So, I tried via command line but here also I couldn't succeed upgrading my OS.  For the same I ran   $ sudo apt-get update   Then I ran  $ sudo apt-get dist-upgrade   And then:  ravbholua@ravbholua-Aspire-5315:~$ sudo do-release-upgrade Checking for a new Ubuntu release Get:1 Upgrade tool signature [198 B]                                                                                                  Get:2 Upgrade tool [1,135 kB]                                                                                                         Fetched 1,135 kB in 6s (32.9 kB/s)                                                                                                    authenticate 'saucy.tar.gz' against 'saucy.tar.gz.gpg'  gpg exited 2 Debug information:    gpg: Signature made Friday 01 November 2013 10:34:27 AM IST using DSA key ID 437D05B5 gpg: Can't check signature: public key not found  Authentication failed Authenticating the upgrade failed. There may be a problem with the network or with the server.  ravbholua@ravbholua-Aspire-5315:~$    Please suggest how to go ahead and upgrade my OS. Are all algebraic integers with absolute value 1 roots of unity? I have the following sentence:     If T had still been alive, there is the great possibility that either T or C ...   My teacher says that the word "then" must appear after the comma, but I think that it's implied and unnecessary. Who is right? I do not have much experience in table design. My goal is to create one or more product tables that meet the requirements below:   Support many kinds of products (TV, Phone, PC, ...). Each kind of product has a different set of parameters, like:   Phone will have Color, Size, Weight, OS... PC will have CPU, HDD, RAM...  The set of parameters must be dynamic. You can add or edit any parameter you like.   How can I meet these requirements without a separate table for each kind of product? Limiting number of lines in textarea I'm looking for a javascript that can limit the number of lines (by line I mean some text ended by user pressing enter on the keyboard) the user is able to enter in textarea. I've found some solutions but they simply don't work or behave really weird. The best solution would be a jquery plugin that can do the work - something like , but it should be able to limit text line count not character count. From 8th June there's been a  period for people entering the UK. From 10th July, travellers from  via a travel-corridor. If more countries are added to the list of exemptions then the date for each country will be later than the 10th July. If a traveller entered the UK from a country that is not on the exempt list and that country is added to the exempt list prior to the end of the 14 day self-isolation period does the self-isolation period end early? For example, if an individual entered the UK from France on the 5th July, should they remain in isolation for 14 days or does the isolation end on the 10th when France is added to the list of exempt countries?