How to do perform "contains" in Excel - sql

Cell A contains users email address and B contains domain. (ex: email as a#gmail.com, domain is gmail. email as b#yahoo.com, domain is yahoo etc).
I want to find out domain and the email address matching or not. I am not quite sure how to perform this in excel.

use Search and Isnumber:
=ISNUMBER(SEARCH(B1,A1))

Using find and search :
=IFERROR(IF(FIND("#",A1)+1=SEARCH(B1,A1),TRUE,FALSE),FALSE)

Related

How to get displayName (Name, Surname) from external organization smtp address in Outlook API?

all, and thanks for your support.
I have a list of e-mails (ex: johndoe#company1.com, maryjane#company2.com) and need their DisplayTo names.
By "DisplayTo" I mean the name that appears after the first e-mail is sent ("ABC" in red).
So it should be something like "John Doe" or "Jane, Mary", which is how future e-mails to them appear (only the first one appears as name#company.com).
The Address Catalog only has internal company e-mails. I could not find a way to get this information in Outlook API documentation, is there a way to do this?
Thanks a million!
Pass the SMTP address to Namespace.CreateRecipient (returns Recipient object). Call Recipient.Resolve, then use Recipient.AddressEntry.GetExchangeUser.FirstName/LastName/etc (error / null checking omitted).

postgres fulltext index for email

I want get lei4#gmail.com by searching lei4 or gmail.com.
The first one only have token: email.
What I want is like the second one
Can we parse the email to email, asciiword and host token? any ideas will help.
I already read the tsearch2 guide, reference, etc. can't find the solution.
A simple solution would be to transform email addresses into local-part at domain-part before feeding them to the TS parser.
Since at is a stop word in english, it will be ignored.
=> select to_tsvector('english','lei4 at gmail.com');
to_tsvector
------------------------
'gmail.com':3 'lei4':1
So both lei4 and gmail.com are going to be found in this tsvector.
As a side note, lei+4#gmail.com is a valid email address and the TS parser is wrong in tokenizing it into four parts.

MVC user's full name in Url, how to handle duplicates

I want to setup the following url in my MVC4 website, using the user's full name in the url:
http://www.myapp.com/profile/steve-jones
I have setup the following route in Global.asax:
routeCollection.MapRoute(
"profile", "profile/{userName}",
new { controller = "myController", action = "profile", userName = string.Empty
});
And I can take the parameter 'steve-jones' and match it to a user with matching name. My only problem though is, what if there is more than one 'Steve Jones', how can I handle this?
Does anyone know of a workaround/solution to this so that I can use a user's full name as part of the url and still be able to retrieve the correct user in the controller method?
Am I forced into including the user's id with the url (something that I do not want to appear)?
The usual way of handling this is by appending a number when creating the profiles. So if "steve-jones" is already a name in the database, then make the user's display name "steve-jones2". You basically have to insist that all profile urls are unique, which includes updating any existing database and account creation code.
Alternatively (and/or additionally), if two same names are found then have the script reroute to a disambiguation page where the user is presented with links and snippet of profile info of the many existing Steve Joneseses so they can go to the full correct profile.
Another way of handling it is by giving all user profiles an additional numeric code on the end. At my university all logins are based on name, so they give everyone pseudo-random 3-digit extensions so that they are safe as long as they don't get 1000 people with the exact same names :)
Some people might be happier being steve-jones-342 if there is no steve-jones or steve-jones1, if you're concerned.

How to know a domain name server in vb.net?

I want a vb.net function. We give domain name, it gives the name servers and the IP.
What would the code be?
I know I can use webclient to scrap various whois sites. They don't like that and put password. I want the "good" way to do it.
Say google.com's name server is ns1.google.com I want to know what's the name server of google.com.
For example:
If we go to http://who.is/whois/google.com/
We will see that google.com has ns1.google.com ns2.google.com ns3.google.com and ns4.google.com
I want a function say FindNS("Google.com") to yield "ns1.google.com"
System.Net.Dns.GetHostEntry("ns1.google.com").AddressList;
This will return an array of all IPs linked to the hostname you provide.

How to implement contacts/email address picker like in Apple's mail application?

when sending a mail on the iPhone/iPad you start typing the name of the recipient and list of proposals shows up. Either pick one from those, or continue typing an email address. Adding a new address turns the first one entered into a blue button like thing.
I would like to use this to allow users to select a couple of email addresses. Does anybody know if it is a standard component?
René
I dont really know if it is a standar UI control but i guess you could figure out something with the help of this video, this one uses the UI Person picker to display the persons name
http://www.alexyork.net/blog/post/Selecting-a-contact-from-the-Address-Book-with-MonoTouch.aspx
and with some modifications you could search on contact list and display a modal view with suggestions of the emails in the list
with this example you can get all the emails in the contact list
ABAddressBook ab = new ABAddressBook();
ABMutableMultiValue<string> emails = new ABMutableStringMultiValue();
foreach (ABPerson person in ab) {
ABMultiValue<string> personemails = person.GetEmails();
foreach (ABMultiValueEntry<string> item in personemails) {
emails.Add(item.Value, item.Label);
}
}
With this code you will get all the emails on the contact list in the variable "emails" now you just need to access the "emails" variable and look for the email the user is typing.
Hope this helps.
Alex