I want to filter an array that only contains emails,   I did this   emails = emails.filter((x)=&gt;(x !== (undefined || null || '')))   that delete the empty value, but can accept a value that is not an email.
291
Is there a regular expression to validate an email address in JavaScript?
11957
For example, if passed the following:  a = []   How do I check to see if a is empty?
41634
Can anyone explain why the predicate all is true for an empty set? If the set is empty, there are no elements in it, so there is not really any elements to apply the predicate on? So it feels to me it should be false rather than true.
90332
I'm looking for some interesting applications of ultrafilters and also everything of interest involving ultrafilters. Do you know some applications or interesting things involving ultrafilters?  I'm at the beginning, so I'd prefer some applications that also a beginner could read.
82914
I have some dynamic SOQL code in which I'd like to identify whether a method argument is a collection or a single value:  SObject[] query(SObjectType sobType, String field, Object data) {     // Want to know if data is a collection e.g. set or list     // that requires an "in" or a single value that requires     // an "=" in the query. (May also need to use separate bind variables.) }   I note that the sort of check shown immediately below seems to require an exact match for the type of the collection (Id in this case to return true) which is not what I want:  Object o = new Set&lt;Id&gt;(); System.debug(o instanceof Set&lt;Id&gt;);   Is there a simple way to make this determination?  (Yes there are various other ways to code this; checking first to see if there is a direct solution.)  PS  Looks like great caution is needed when using .
29559
How do I remove all attributes which are undefined or null in a JavaScript object?  (Question is similar to  for Arrays)
12142
I was going to make a filter for the &quot;&quot; by excluding some sites from it.  I noticed  which talks about &quot;negative filtering&quot; but does not explain how one can do it or if it is possible.  There does not seem to be a way to do this, though.  On the filter page, my only options are:  So how can I do &quot;All sites except [list]&quot;? It would also be nice if this could include similar functionality with the meta checkbox.  Something like &quot;All main &amp; meta sites except...&quot;
26779
Lets say I have an array like this:  string [] Filelist = ...   I want to create an Linq result where each entry has it's position in the array like this:  var list = from f in Filelist     select new { Index = (something), Filename = f};   Index to be 0 for the 1st item, 1 for the 2nd, etc.  What should I use for the expression Index= ?
96988
I'm trying to write an Android app that requires users to select a value from a list of potentially hundreds. They're likely to know the item they're selecting to asking them to filter by typing seems like a sensible approach.  I've searched high and low but I can't find a standard way of doing this.  A spinner is no good and it takes too long to go through the list of values  An autocomplete box is no good as I need users to be contrained to only selecting items from my list.
40905
In Gmail, the inbox view only contains mail which has not been archived. I'm looking for a particular conversation I had with someone a while ago to find a quote, but I can't remember the exact topic or person I was emailing. I know it has been archived but I cannot find a way of viewing only archived email—it appears I have to browse through many months of All Mail in order to find that particular conversation.  Is there a more effective way of viewing only archived mail?
43371
PHP has the habit of evaluating (int)0 and (string)"0" as empty when using the empty() function. This can have unintended results if you expect numerical or string values of 0. How can I "fix" it to only return true to empty objects, arrays, strings, etc?
9942
Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work.
47072
We have a view for a type of node that includes a Private File.  We cannot see a way to add an exposed filter, such as "Contains any word", and have it filter based on the file's name.  Are we missing something obvious?
113761
Email searches in Outlook 2013 work as expected. I am trying to refine it by excluding certain folders by default. I was hoping I could uncheck certain folders in Control Panel > Indexing Options > Outlook. Unfortunately, the checkbox is for Outlook itself. I can either search Outlook or not. There is no refinement beyond that. Is there another way to exclude searching of specific folders?
38112
Here's the scenario...    if (entry.Properties["something"].Value != null)   attribs.something = entry.Properties["something"].Value.ToString();   While effective and working correctly, this looks ugly to me.  If I don't check for a null before performing the ToString() then it throws an exception if the property was null.  Is there a better way to handle this scenario?  Much appreciated!
56341
Is there a way to search for question which contains a specific tag (or set of tag), but no other tags.  For example if I wanted to have only pure [php] questions I would input in the search filed the following:  ![php]   Or for question only concerning html and css I would input:  ![html+css]  Is there already such a feature hidden in the SO Engine? If not, with the high number of question in SO, I feel like it would be a good feature.
79732
I am receiving emails that has been copied to a several email addresses. For example, an email is copied to engineering.myorg@gmail.com and marketing.myorg@gmail.com and I have subscribed to these two email groups; hence I am getting these emails. And there are some other emails those are only sent to marketing.myorg@gmail.com.   Let's say that I have created two filters, and some email belong to both of these groups. I need to filter the emails that exclusively are sent to marketing.myorg@gmail.com to delete those at once.  How can I do this?  Note: The actual mail groups are in format of mail-group@myorg.com; because, our organization is using gmail application for email.