var re = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/; var email = document.forms["checkout"]["email"].value; if (re.test(email.value)) {     return true; } else {     alert("Invalid email address");     return false; }   I have tried quite a few email regex suggestions on this site but when the function is called it always throws the alert. Not even simple email address are coming back valid. What am I doing wrong?
Is there a regular expression to validate an email address in JavaScript?
Distributing elements across a list of lists Benefits of Toad houses I have a few red Toads and a Toad is just hanging out in town. I see an option to buy a red Toad house, ostensibly for him. Are there any added benefits of purchasing this or are the colored Toad houses just cosmetic? How can I move an installed game from one Steam library folder to another? I use (and have it much bigger) drive D: to store all my user data and games, but I have installed the Steam client on drive C:. When I was installing a first game (Warhammer 40000), I've chosen to place my library folder on drive D: and the game went there.  But now as I've got installed the second game (Portal), I can see that it was put on drive C: despite to the choice I've done previously. When I open Steam - Settings - Downloads + Cloud - Steam library folders, I can see both installation places in the list. Can I merge them into one?  I would even agree to use the default drive C: library (as I've replaced it with a symlink already). When I press to remove one library it says it can only remove empty ones. What's better to use in PHP for appending an array member,  $array[] = $value;   or  array_push($array, $value);   ?  Though the manual says you're better off to avoid a function call, I've also read $array[] is much slower than array_push(). What are some clarifications or benchmarks? Decode Base64 data in Java What does the "static" modifier after "import" mean? When used like this:  import static com.showboy.Myclass;  public class Anotherclass{}   what's the difference between import static com.showboy.Myclass and import com.showboy.Myclass? I have an object with two solidify modifiers added, but the modifiers are not visible in the view pane. How can I see the applied modifiers. This is in Blender 2.91 I understand that the Announcer badge can be earned if the question is visited 25 times.  But is this only when I share a link to this question in one of my answers, or can I also share the link (with my user id somewhere to count the accesses) somewhere else, maybe Facebook? What are reaching fouls in the NBA? Probability of correctly guessing 12 zodiac signs without replacement I just watched  where someone assigns a zodiac sign to twelve different individuals. There is one of each sign.  My question, Guessing at random, (this was not quite at random), what number of people are you expected to guess correctly? And with what probability are you expected to guess a given number of people correctly?  i.e. What are the odds of getting 1, 2, 3, 4, etc. correct. Bmp to jpg/png in C# What is the purpose of the word 'self'? The question I am working on is, &quot;Consider the following. (a) Find the angular speed of Earth's rotation about its axis. rad/s (b) How does this rotation affect the shape of Earth?&quot;  I am fully capable of solving part (a); however, I am not sure how to describe the effect earth's rotation on its shape. I tried to search my textbook for the answer, but could not find anything. Is there an actual effect on the shape? What happens if light/particles exceeded the speed of light for a particular medium? How to implement a tree data-structure in Java? How do I pass a string into subprocess.Popen (using the stdin argument)? Can I define keyboard shortcuts using the Super key? How would I create an arch? A word that says a person is both female and your friend It's often confusing for me to talk about my friends, especially my female friends. This is because in Dutch there are words for both male ("vriend") and female ("vriendin") friends. In English however, there's as far as I know only the word friend, which can mean both a male or a female friend.  For this reason I was wondering if there is a word to say a person is both female and a friend. How to get status start_date and end_date from status_track table? I have two tables:   things:  +------+----------------+------------+ | id   | current_status | created_at | +------+----------------+------------+ | 7770 | active         | 2016-08-09 | +------+----------------+------------+  thing_status_tract:  +----------+-------------+-----------+---------------------+ | thing_id | status_from | status_to | changed_at          | +----------+-------------+-----------+---------------------+ |     7770 | incomplete  | inactive  | 2016-08-09 16:26:22 | |     7770 | inactive    | active    | 2016-08-10 12:31:04 | +----------+-------------+-----------+---------------------+    I need data in the following form. This table has a status and its corresponding start and end timestamp for a particular thing_id:  +----------+-------------+---------------------+---------------------+ | thing_id | status      | status_start_date   | status_end_date     | +----------+-------------+---------------------+---------------------+ |     7770 | incomplete  | 2016-08-09 00:00:00 | 2016-08-09 16:26:22 | |     7770 | inactive    | 2016-08-09 16:26:22 | 2016-08-10 12:31:04 | |     7770 | active      | 2016-08-10 12:31:04 | now()               | +----------+-------------+---------------------+---------------------+   How to do that with a SQL query?