Where is Contact Type stored? (google/ phone) - contacts

I am trying to find where Contact type ( Google/Phone) is stored and how to access it. I thought I could access the class in the android.provider.contacts.contact.commonDatakinds package. However i could not find any information on the data field. Any help on contactscontact data field documentation and Contact Type would be greatly appreciated

Maybe you can query to RawContacts's content_uri with Rawcontacts.ACCOUNT_NAME and RawContacts.ACCOUNT_TYPE to get it.

Related

how to filter Collection (Firebase) by uid in swift

I'm having problems trying to get one specific value from Firebase.
I'm using .whereField('uid', isEqualsTo: "givenID") in Collection("something") but I'm not getting any response. I know in Flutter the field is 'uid' but for some reason in swift isn't the same. I'll appreciate your help maybe with the name of the field or another way to bring the value with the given id in Firebase.
Useful information
Swift 5
XCODE 11.4.1
I found a "solution". Create a field in my Collection called "id" and assigning it with the same id from the document. Now I can just
db.collection("yourCollection").whereField("id", isEqualsTo: "givenID").
Not the best solution, but a solution is a solution.
UPDATE
I found it.
db.Collection("yourCollection").document("GivenID")
This bright you the subCollection
And that's all

How to query from ListColumn[String] in cassandra using phantom

I am new to cassandra (started learning on my own interest few days back) and looking for help for the below problem.
I have a Cassandra table "User" and a ListColumn "interests extends ListColumn[String]".
Now, I want to fetch all users with an interest, say "playing".
like: select from user where interests.contains("playing")!
I scanned through the ListColumn api but not able to find any. Also, searched in google but no such helpful posts.
Any help guys please... Thanks in Advance :)
So there is contains among operators and here is an example how to use it. It looks like that it should work as any other operator, so just go for database.userTable.select.where(_.interests contains "playing").fetch() - of course, depending on your conventions.
This is possible with a secondary index on a collection column, which only works with a Set column, and not with a List.
Bottom line:
object interests extends SetColumn[String](this) with Index[Set[String]]
And then you can execute the following:
select.where(_.interests contains "test").fetch()
You can also use multiple restrictions if you allow filtering.
select.where(_.interests contains "test")
.and(_.interests contains "test2")
.allowFiltering()
.fetch()
The above will only match if both interests are found in a record.

Facebook API - Custom Audience from contact data

does any one has experience with using Custom Audience API in order to create audience for contact data of people outside of U.S.?
Part of the API which i refer to is: https://developers.facebook.com/docs/marketing-api/reference/custom-audience/users/
As you can see, documentation lacks of explanation in what format should be data for COUNTRY field provided. Also I don't know how to format data for ST field if the country is outside of US. Should I use some region name or just leave it blank?
I uploaded 1000 users and nobody has been recognized so I suppose that I just did not format data properly.
Sample request: payload={"schema":["FN","LN","CT","ST","COUNTRY"],"is_raw":true,"data":[["adam","nowak","wroclaw","","poland"]]}&access_token=____&format=json
As you can see I left state field blank, and provided country in English translation and lower caps. It is possible that valid value is e.g. PL a not "poland". Also any information about what should be filled in state field would help me a lot.
Thanks in advance.

Validating SSN,Email and Phone number in Postgres

Could anyone help me on how to perform validation on SSN, Email, phone through a stored procedure in Postgresql?
Thanks.
A stored procedure doesn't look like the right solution. Use a domain with a check constraint using pattern matching. There is an example on the CREATE DOMAIN reference page. For email address checking, consider http://wiki.postgresql.org/wiki/Email_address_parsing.

sp_trace_setfilter column datatypes

Anyone know where i can find a list of the columns for setting the trace filter, i know the system id number as i got this off of MSDN but i need the list with all of the data types but i cant seem to find it anywhere...
They are listed in the BooksOnline on the sp_ trace_setevent page:
link