regex to validate emails which allows only these two special symbols .,- before @ symbol
How to validate an email address in JavaScript
Limit distribution of infinite sum of Bernoulli random variables I have quite a bad habit of copy-and-pasting my packages from one LaTeX document to another. Is there any way we can detect unused packages (i.e. \usepackage commands) so that they can be removed from the LaTeX document? Unable to install rJava in R 3.0 in Ubuntu 13.04 How can I create a Windows bootable USB stick using Ubuntu? I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu? I  and while on other sites I did not get a 'Reputation Notification' to explain that I was given 2 upvotes for my answer - yet if I manually check my Profile here at meta.SE my total Reputation is in agreement with the amount there.  I'm not knowledgeable about the intercommunication between the servers and sites but I would explain it this way: Super User either failed to send or other sites failed to receive the message the I had a reputation update on Super User.  I should have received either two green star trophies (🏆) of 10 reputation each or one of 20; depending on when I returned to one of the Stack Exchange / Stack Overflow / Super User / etc. sites.  Here's a screenshot showing no reputation change notification for Super User:    Here's a screenshot of my Profile over at Super User showing that I was silently credited:    I'm bringing this up on Meta.SE in case the communication is broken between more sites than just Super User and everywhere else. In my game, XP needed to reach the next level is Current Level × Level Threshold.  Given that, how can I get my current level from the total XP ever earned?    For example:  Level Threshold = 50 Current Level = 1   Starting at level 1, I would need (1 × 50) = 50 XP to get to level 2, and so on.  Level 1: 50 XP needed to reach level 2 Level 2: 100 more XP needed to reach level 3 Level 3: 150 more XP needed to reach level 4   In other words, the progression table is as follows:  Level 1: 0 XP to 49 XP Level 2: 50 XP to 149 XP  Level 3: 150 XP to 299 XP Level 4: 300 XP to 499 XP   If I have 300 XP, I'll just reached level 4. How can I calculate that generally? Can I recover a file from /dev/null? Added activities, now names and labels and strings aren't registering Android Manifest file I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist? How do I back up AWS S3 and EBS to a non-Amazon provider? We've centered most of our operations on AWS, and love the ease of use there. However, every once in a while, the paranoid side of my brain wonders ?  Within the Amazon ecosystem, we have a pretty good backup plan: We keep most static data in S3. EBS volumes are snapshotted nightly. However, true paranoia would mean backing up to a provider outside the Amazon ecosystem. How do you handle doing this? I'm especially interested in backing up EBS snapshots and S3 contents. Bonus points for backing up RDS. What is the best way to globally change the amount of vertical space between items in list environments? Double Sideband Suppressed Carrier modulator List I am using ring modulator for DSB-SC  am modulation in a transmitter circuit. Can anyone please tell me about more DSB SC modulator for am modulation? I want to know which one to use where? Composition of two functions - Bijection I keep going around in circles with this problem:  Given the functions $f:X\to Y$ and $g:Y\to Z$, if $g\circ f:X\to Z$ is bijective, then prove $f$ must be one-to-one and $g$ must be onto. I was able to prove this without difficulty. However the second part of the problem has me stumped:  a) Find functions $f,g$ where $g\circ f$ is bijective but $f$ fails to be onto.  b) Find functions $f,g$ where $g\circ f$ is bijective but $g$ fails to be one-to-one.  My attempt for (a): Let $f:\mathbb{R}\to \mathbb{R}^+$ be defined by $f(x)=e^x$ and $g:\mathbb{R}^+\to \mathbb{R}$ be defined by $g(x)=\ln(x)$. Then $g\circ f(x)=g(f(x))=g(e^x)=\ln(e^x)=x$ which is bijective, $g$ is onto and $f$ fails to be onto... or so I thought. Upon closer inspection $f$ $\underline{is}$ onto for the given codomain $\mathbb{R}^+$.  And now I'm stuck in a rut. Anyone out there have any hints? Prove recursively defined sequence converges I would like some advice on how to solve problems like the following: Let $(x_n)$ be a sequence defined by $x_1= 3$ and $x_{n+1} = \frac{1}{4-x_n}$. Prove that the sequence converges.  My strategy is to use the Monotone Convergence Theorem, but I am having trouble showing that the sequence is decreasing and bounded below. Here's my work so far:  Decreasing: The first 4 values are $3,1,1/3,3/11$, so let's assume $x_n \leq x_{n-1} \leq \ldots \leq x_1$. Want to show $x_{n+1} \leq x_n$. We have $x_{n+1} = \frac{1}{4-x_n}$. I want to have an upper bound for the RHS, but can't find one and don't really know where to go from here.  Bounded below: I wanted to show that all values are positive, but if we assume $x_n &gt; 0$, that doesn't rule out $x_{n+1}$ from being negative. I'm getting an error in WSL while trying to use .  I followed all the install steps successfully on Windows 10 x64 using the steps at , then Ubuntu for Windows with GitHub desktop .  But I'm blocked at the latest steps.  It's where I trying to download or train the model in Windows. Using for example the Ubuntu Linux prompt, I navigate manually to the appropriate place and type a following command like the one below (I also tried in su mode)  bash pretrained_models/download_pix2pix_model.sh facades_label2photo   I get an immediate error, always the same, similar to these:  root@Azure:/mnt/c/Users/vincent/Downloads/vision/pytorch-CycleGAN-and-pix2pix# bash pretrained_models/download_pix2pix_model.sh facades_label2photo pretrained_models/download_pix2pix_model.sh: line 2: $'\r': command not found Note: available models are edges2shoes, sat2map, and facades_label2photo pretrained_models/download_pix2pix_model.sh: line 4: $'\r': command not found ]pecified [facades_label2photo pretrained_models/download_pix2pix_model.sh: line 6: $'\r': command not found mkdir: cannot create directory ‘./checkpoints/facades_label2photo\r_pretrained\r’: No such file or directory pretrained_models/download_pix2pix_model.sh: line 10: $'\r': command not found WARNING: timestamping does nothing in combination with -O. See the manual for details.  : No such file or directoryhphoto pretrained_models/download_pix2pix_model.sh: line 12: $'\r': command not found pretrained_models/download_pix2pix_model.sh: line 13: $'\r': command not found   Any idea? How to theme the maintenance mode page? What would be the best practice for theming the maintenance mode page in Drupal 7? Is there anything in the physics that enforces the wave function to be $C^2$? Are weak solutions to the Schroedinger equation physical? I am reading the beginning chapters of Griffiths and he doesn't mention anything. TeXShop and Mac preview crashing when opening latex/beamer built pdfs After updating to Sierra 10.12.4 last week, TeXShop crashes:   when opening an existing .tex document that has a pdf associated to it immediately after compiling a new document, i.e. as soon as a pdf is created.   Furthermore, preview crashes opening almost any pdf that has been created with TeXShop. There is virtually nothing on the internet about it, and the only solution seems to be a complete reinstall of MacOSX (so as to reinstall the supposedly broken preview), which I'd like to avoid if at all possible.  Someone else has described a similar issue, but has not received any responses ().  I would be very grateful for some help, as I can neither produce work, nor look at any at the moment. Many thanks! As a follow up to my other , I would like to know whether the following is possible:  I have $20,000 in my brokerage account The price of a call option with $300 strike price is $5.00 (1 contract = 100 shares) I buy 20 contracts of these $300 calls (cost is 20 * 5 * 100 = $10,000) The price of the underlying goes up, making my option in-the-money  I decide to exercise my options. Exercising my calls means that I buy 20 * 100 = 2,000 shares of the underlying at $300 per share. However, I only have $10,000 left in my brokerage account and am unable to pay for the shares (2,000 * 300 = $600,000). What now? How does this work? Do brokers recognize that my position is profitable, and buy and sell the underlying for me as soon as I exercise my calls? In other words, do I need to worry about being able to pay for the shares of the underlying if I decide to exercise my options? Can I just take my profit without bothering with the shares at all? Sockets: Discover port availability using Java