Get current Location Value under Regional language setting in c++ - c++

Want to extract country name from the control panel->region and language->location current location value
i have tried following function of win32
GetLocaleInfo(returns culture)
GetSystemDefaultLCID (returns language).
Also looked at the GetGeoInfo
but not able to extract the country name.
I hope i am clear with my question

Its available by:
Get a GEOID by calling GetUserGeoID() with GEOCLASS_NATION
Pass the GEOID to GetGeoInfo() along with GEO_FRIENDLYNAME to fetch the string in the language specified in LangId (GetUserDefaultLCID() for the current)

Related

How can I get all the information from an address that has multiple Places_id

I send a HTTP request, with only the address, I do not know the name of the place/company. I get a Place Id, but it does not give me any additional information. However, if I send an HTTP request with the same address, and the name of the building/company, I get another place id, at the same location, but here I get all the additional info that Places provides.
But I have to find the place only by the address. Does anyone have any suggestions on how to make this work, or how do I get the name of the building at the address out, Places does not give out a name when I only enter the address.
This is the input with the name and address, from the location
These additional infos I get to the Place ID, at name + address
This is the input with only the address, from the location
These additional infos I get to the Place ID,from only the address
The screenshot you provided shows that you have set the fields parameter to only get the name, business_status and place id. I suggest you take a look here to see the list of available data/fields that can be retrieved.
I am not entirely sure what Places SKU/requests you are making, but removing the fields parameter will allow you to retrieve all the data. Do note that you will be billed accordingly for Contact and Atmosphere Data. Basic Data is free of charge.
Lastly, place ids are unique, and each address can only have one. You may want to make use of Place Autocomplete to see a list of suggested addresses and check which one you are looking for. After which, you can pass its place id to a Place Details request to get information on that place.

How can I specify address in facebook place search

If I want to find places near some address in facebook graph search search, given than I know it's street, zip, what is the syntax for the query to graph api?
If I call https://graph.facebook.com/v2.7/search?type=place I get following error:
(#100) Must specify location or address or search query for place search
I know, that it is possible to specify location in a form of latitude/longitude, but with lat/lon it does not return all places (maybe because some of them do not have lat/lon specified in location).
The error says 'location or address'. What is the syntax for specifying address in a form of street/zip? Is that possible at all?
You must specify a query string for search using q=your_search_query
Search query needs to be a string
https://graph.facebook.com/v2.7/search?type=place&q=bangalore&access_token=your_token works for me
You can specify lat/lng using center parameter
https://graph.facebook.com/v2.7/search?center=37.76,-122.427&q=coffee&type=place&access_token=your_token
Source: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.7#search

In Oracle Apex 5 I want to link to an Interactive Report and set a filter RequestID = #RequestID#

I am trying to link a column from an Interactive Report to another Interactive Report in Apex 5. I want to set the filter in the later one with a value from the first one. I used a column of type Link then clicked on Target button to set the page number like this:
It doesn't work. I read there are other ways, I could use an URL link and build the URL to pass the parameters using a package but if I used this, how can I bind it to the link?
Normally you'll need to specify the operator to be used in the link - documentation:
Developing Reports > Editing Interactive Reports in Page Designer > Linking to Interactive Reports
Snippet concerning setting up a link:
To create a filter, use the following itemNames and itemValues syntax:
IR[region static ID]<operator>_<target column alias>
Consider the following example:
IR[EMP]C_ENAME:KING
Meaning that if you want to place a filter on your report where the column REQUEST_ID matches a given value, you'd need the equals operator syntax:
IREQ_REQUESTID:#REQUEST_ID#
However, using
IR_REQUESTID:#REQUEST_ID#
should also work, as the EQ operator is the default operator.
Also consider other issues: do you have more than one IR on the page? You'll need to reference the correct one. Is your generated link correct? Inspect it!
I found what was causing the filter not to work. I was trying to filter a column of type "link". It doesn't work when it's a "link", but it does when it's "plain text". So now you know. Here's how it's looking...
For me it works like this:
I created an Item (display only)(source type: null) on the second page with the second IR.
In the first IR in the Column Attributes set a Link Text and the Target and Page number (like you did already). In the Name part put your Item that you just created and for the Value put the column name in which are the values for your filter (like #Request_ID'#).
Then again on the second page with the second IR you will put something like this in the Region Source:
select REQUEST_ID,
REQUEST_NUMBER,
NAME,
FIRST_NAME,
COMPANY,
COUNTRY,
TYPE,
RQ_IS_ARCHIVE,
RQ_ID_TO
from REQUEST
where REQUEST_ID = :P20_REQUEST_ID
The :P20_REQUEST_ID is the Item that you created on that second page.
You passed the value from the Request_ID column from the first page in to the Item on the second page, there you used it then as a condition.
Hope this helps you...

tracking traffic source from cookie

I want to establish lookup table macro depending on content of utm_z cookie.
For example if user have in utm_z cookie specific value (for example abc) my lookup table macro need to return specific value.
I made 1 party cookie variable returning value from utm_z cookie. This variable return for example '125233995.1441192396.4.2.utmcsr=aa|utmccn=cc|utmcmd=aa|utmctr=aaa|utmcct=bb
I can not use regular expresions in Lookup table macro.
It's hard to answer without knowing which value you want to get, but you can use a custom javascript variable to extract the value via regex (e.g. something like .*utmcsr(=.*?)\|.* to get the utmcsr value) from your cookie variable and then pass the the variable with the extracted value to the lookup table.
So the first party cookie variable feeds into the custom javascript variable to extract the value which in turn feeds into the lookup table to return the value you want.

SharePoint UserData and the ;# Syntax in returned data

Can a SharePoint expert explain to me the ;# in data returned by the GetListItems() call to the Lists web service?
I think I understand what they are doing here. The ;# is almost like a syntax for making a comment... or better yet, including the actual data (string) and not just the ID. This way you can use either, but they are nicely paired together in the same column.
Am I way off base? I just can't figure out the slighly different use. For example
I have a list with:
ows_Author
658;#Tyndall, Bruno
*in this case the 658 seems to be an ID for me in a users table somewhere*
ows_CreatedDate (note: a custom field. not ows_Created)
571;#2009-08-31 23:41:58
*in this case the 571 seems to be an ID of the row I'm already in. Why the repetition?*
Can anyone out there shed some light on this aspect of SharePoint?
The string ;# is used as a delimiter by SharePoint's lookup fields, including user fields. When working with the object model, you can use SPFieldLookupValue and SPFieldUserValue to convert the delimited string into a strongly-typed object. When working with the web services, however, I believe you'll need to parse the string yourself.
You are correct that the first part is an integer ID: ID in the site user list, or ID of the corresponding item in the lookup list. The second part is the user name or value of the lookup column.
Nicolas correctly notes that this delimiter is also used for other composite field values, including...
SPFieldLookupValueCollection
SPFieldMultiColumnValue
SPFieldMultiChoiceValue
SPFieldUserValueCollection
The SPFieldUser inherits from the SPFieldLookup which uses the ;# notation. You can easily parse the value by creating a new instance of the SPFieldLookupValue class:
string rawValue = "1;#value";
SPFieldLookupValue lookupValue = new SPFieldLookupValue(rawValue);
string value = lookupValue.LookupValue; // returns value