Best value for 'telephone' property in Schema.org - schema.org

I'm adding structured data to my web pages and I can't find a standard format to fill the value of "telephone" property.
I used the telephone property in different scopes: Organization, ContactPoint and Person.
Example provided from schema.org in Microdata format:
<div itemscope itemtype="http://schema.org/LocalBusiness">
<h1><span itemprop="name">Beachwalk Beachwear & Giftware</span></h1>
Phone: <span itemprop="telephone">850-648-4200</span>
</div>
Example provided from schema.org in JSON-LD format:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Organization",
"address": {
"#type": "PostalAddress",
"addressLocality": "Paris, France",
"postalCode": "F-75002",
"streetAddress": "38 avenue de l'Opera"
},
"email": "secretariat(at)google.org",
"faxNumber": "( 33 1) 42 68 53 01",
"telephone": "( 33 1) 42 68 53 00"
}
</script>
Example provided from Google (Corporate Contact)
https://developers.google.com/search/docs/data-types/corporate-contact
An internationalized version of the phone number, starting with the "+" symbol and country code (+1 in the US and Canada).
So which is the best format if my international prefix is +41 and my number is 987654321?
0041-98-7654321
(+41) 98 76 54 321
+41987654321 = Google style
or what else?
Is there a standard?

00 changes per country, that's why they introduced the +. So I'd count that out.
Different countries format numbers differently. i.e. dashes are a US thing. So I would avoid any formatting characters. They are also irrelevant to what you enter in, so if anything could break the number when auto dialling.
So I would go will just the digits people should enter:
+41987654321
Same goes with using phone numbers in links.

Related

how can i get only text in flutter using rest api

Hey all i'm getting data from rest api everything is working fine but i want only text data. anyone pls help me.
{
"description": {
"blocks": [
{
"key": "1h2pe",
"text": "Delicious, loquats are very low in calories; provide just 47 cal per 100 g, however, rich in insoluble dietary fiber, pectin. Pectin retains moisture in the colon and thus functions as bulk laxative and by this way, it helps to protect the colon mucous membrane by decreasing exposure time to toxic substances as well as binding to cancer causing chemicals in the colon.Pectin has also been shown to reduce blood cholesterol levels by decreasing its re-absorption in the colon by binding bile acids resulting in its excretion from the body.Loquat fruit is an excellent source of vitamin-A (provides about 1528 IU per 100g), and phenolic flvonoid antioxidants such as chlorogenic acid, neo-chlorogenic acid, hydroxybenzoic acid, feruloylquinic acid, protocatechuic acid, epicatechin, coumaric acids and ferulic acid. Ripen fruits have more chlorogenic acid concentrations.Vitamin A maintains integrity of mucus membranes and skin. Lab studies have shown that consumption of natural fruits rich in vitamin-A and flavonoids helps to protect from lung and oral cavity cancers.Fresh fruit is very rich in potassium and some B-complex vitamins such as folates, vitamin B-6 and niacin and contain small amounts of vitamin-C. Potassium is an important component of cell and body fluids, helps controlling heart rate and blood pressure.It is also a good source of iron, copper, calcium, manganese, and other minerals. Manganese is used by the body as a co-factor for the antioxidant enzyme, superoxide dismutase. Copper is required in the production of red blood cells. Iron is required for as a cofactor in cellular oxidation as well for red blood cell formation.",
"type": "unstyled",
"depth": 0,
"inlineStyleRanges": [],
"entityRanges": [],
"data": {}
}
],
"entityMap": {}
}
}
You need to create an Adapter class for whatever JSON you're trying to access in Dart.
In Java, they are called POJO classes.
Declare all the variables i.e., 'keys' as variables of type 'value' in a class, and use getters to access individual fields.
You can access the 'Text" data by...
void main() {
var mydata = {
"description": {
"blocks": [
{
"key": "1h2pe",
"text":
"Delicious, loquats are very low in calories; provide just 47 cal per 100 g, however, rich in insoluble dietary fiber, pectin. Pectin retains moisture in the colon and thus functions as bulk laxative and by this way, it helps to protect the colon mucous membrane by decreasing exposure time to toxic substances as well as binding to cancer causing chemicals in the colon.Pectin has also been shown to reduce blood cholesterol levels by decreasing its re-absorption in the colon by binding bile acids resulting in its excretion from the body.Loquat fruit is an excellent source of vitamin-A (provides about 1528 IU per 100g), and phenolic flvonoid antioxidants such as chlorogenic acid, neo-chlorogenic acid, hydroxybenzoic acid, feruloylquinic acid, protocatechuic acid, epicatechin, coumaric acids and ferulic acid. Ripen fruits have more chlorogenic acid concentrations.Vitamin A maintains integrity of mucus membranes and skin. Lab studies have shown that consumption of natural fruits rich in vitamin-A and flavonoids helps to protect from lung and oral cavity cancers.Fresh fruit is very rich in potassium and some B-complex vitamins such as folates, vitamin B-6 and niacin and contain small amounts of vitamin-C. Potassium is an important component of cell and body fluids, helps controlling heart rate and blood pressure.It is also a good source of iron, copper, calcium, manganese, and other minerals. Manganese is used by the body as a co-factor for the antioxidant enzyme, superoxide dismutase. Copper is required in the production of red blood cells. Iron is required for as a cofactor in cellular oxidation as well for red blood cell formation.",
"type": "unstyled",
"depth": 0,
"inlineStyleRanges": [],
"entityRanges": [],
"data": {}
}
],
"entityMap": {}
}
};
List firstList = mydata.values.toList();
List secondList = firstList[0].values.toList();
print("${secondList[0][0]["text"]}");
}

which style is most preferred in Mongodb?

In mongodb, which style is better? 1) or 2)? Can I retrieve only line name from 1) despite of getting whole record on db.record.find("line":"east")?
1.
{
"line": "east",
"station":[
{ "name": "ABC", "_id": "1", },
{ "name": "DEF", "_id": "2" }
]
}
2.
{ "line": "east", "l_id":"1"},
{"station":"ABC", "_id":"1", "l_id":"1"},
{"station":"ABC", "_id":"2", "l_id":"1"}
Note: line and station has one to many relationship.
If you are most commonly getting stations by line and often need all stations of a line alt 1 is the best. If you are commonly retrieving single stations or a subset of stations 2 is the best. Alt 2 can lead to more queries since mongo doesn't really have any relations, alt 1 can lead to larger reads and make it more difficult to keep the working set in RAM because of larger objects. Alt 1 also has a minor drawback if you change values in a station on multiple lines - then you have to update its instance in each of the line documents containg it.
To get a partial object, i.e. not all stations in alt 1, you can do a projection to filter out what you don't want. It still means reading the whole object into memory first so you wouldn't gain a lot in performance from doing that.

Use a different legend to dimension on VizFrame Chart

I would like to show a concatenation fields as axis labels on a chart, is this possible?
So, for the given data:
{d: [ {
"Category": "Vendor",
"BusinessProcess": "Create Manufacture's Part",
"Scenario": "Create Vendor - General Data",
"Role": "General",
"Average_Duration_Days": 43,
"Row_ID": "4"
},
{
"Category": "Vendor",
"BusinessProcess": "Create Vendor - General Data",
"Scenario": "Create Vendor - General Data",
"Role": "General",
"Average_Duration_Days": 38,
"Row_ID": "5"
}
I would like to use Average_Duration_Days as the measure. I would also like to show both rows and the for the label for the row show something like BusinessProcess + Role.
Is it possible to use Row_ID as the dimension and then a concatenation of the other fields as the axis label?
Here's a simple code bin:
http://jsbin.com/yifejik/edit?js,output
You can use the attribute 'value' as the selector for your Bars and 'displayValue' as the label. I used a formatter to combine two values.
See jsbin:
http://jsbin.com/wumozevimi/edit?js,output
You could also add a second dimension and include it into your categoryAxis-Feed.

mongodb export from wide format to long format

the mongodb documents structures are like:
No1.
"id" : 1,
"article": "go hiking and bbq",
"category": [
"travel",
"hiking",
"bbq"
]
No2.
"id" : 2,
"article": "I love cat and travel",
"category": [
"pet",
"cat",
"travel"
]
when i use mongoexport to export it to csv format, it will give me something like:
id article category
1 go hiking and bbq ["travel", "hiking", "bbq"]
2 I love cat and travel ["pet", "cat", "travel"]
which is "wide format" data structure
SO, I wonder if it's possible if it's possible to export as LONG FORMAT, I want to OPEN the category array, repeat each article per category. something like:
id article category
1 go hiking and bbq "travel"
1 go hiking and bbq "hiking"
1 go hiking and bbq "bbq"
2 I love cat and travel "pet"
2 I love cat and travel "cat"
2 I love cat and travel "travel"
or if mongodb do not have this function, is there any tools that could help me to transfer the exported csv file from wide format to long format? thanks
==== updated, Solutions here====
thx wizard. update mongodb up to 2.6.x.
first aggregate to a new collection, then export that collect
refer here

how to add or cancatenate string in a HTML string in iphone app

I have html string which i want to load in web view but i want that there are some values which i am getting as result so i want to add them also in this at run time like
I have a string belwo i want this value to be added with line
so that it should display Number of dogs that visit clinic ? 12 like this
NSString*dogspermonth=12;
Number of dogs that visit clinic? <br>
NSString*htmlString=#"<HTML>
<HEAD>
<TITLE>JAMSHED ALI</TITLE>
</HEAD>
<BODY background="InsideBackgroundPage2.png">
<H6><font color="white">Cerenia Motion Sickness<br>
Model</br>Report
<p>Inputs</p>
<br>
Number of dogs that visit clinic? <br>
Number of dogs with motion sickness <br>
Dogs treated with (per year): <br>
Cerenia <br>
Other prescription drugs<br>
Other means<br>
Other the counter drugs<br>
<p>
Average cost to client for Cerenia prescription<br>
Clinic markup<br><br>
Average number of dogs treated for car sickness<br>
Total number of dogs treated for car sickness<br>
Dogs treated with Cerenia<br>
Dogs treated with other drugs or interventions<br>
<br>
Profit for each Cerenia prescription<br>
Annual Profit earned from Cerenia treatment<br>
Potential annual profit increase from using Cerenia to treat all dogs with motion sickness<br>
Maximum annual profit if all dogs with car sickness were treated with Cerenia<br>
</BODY>
</head>";
first of all
NSString*dogspermonth=12; //is wrong
NSString *dogspermonth=#"12"; //is correct if u want string else
NSInteger dogspermonth = 12; //will suffice
next u can use stringWithFormat like:
NSString *htmlString= [NSString stringWithFormat:#"<HTML>
<HEAD>
<TITLE>JAMSHED ALI</TITLE>
</HEAD>
<BODY background="InsideBackgroundPage2.png">
<H6><font color="white">Cerenia Motion Sickness<br>
Model</br>Report
<p>Inputs</p>
<br>
Number of dogs that visit clinic? %#<br> //%# if string //%d if integer
Number of dogs with motion sickness <br>
Dogs treated with (per year): <br>
Cerenia <br>
Other prescription drugs<br>
Other means<br>
Other the counter drugs<br>
<p>
Average cost to client for Cerenia prescription<br>
Clinic markup<br><br>
Average number of dogs treated for car sickness<br>
Total number of dogs treated for car sickness<br>
Dogs treated with Cerenia<br>
Dogs treated with other drugs or interventions<br>
<br>
Profit for each Cerenia prescription<br>
Annual Profit earned from Cerenia treatment<br>
Potential annual profit increase from using Cerenia to treat all dogs with motion sickness<br>
Maximum annual profit if all dogs with car sickness were treated with Cerenia<br>
</BODY>
</head>", dogspermonth];
hope it helps. happy coding :)