分享云表达式
云表达式,像任何其他云对象一样,可以在拥有 Wolfram 云许可的用户之间共享.
In[1]:=
ce = CreateCloudExpression[<|"H" -> <|"AtomicNumber" -> 1,
"AtomicMass" -> Quantity[1.00794`6., "AtomicMassUnit"],
"AtomicRadius" -> Quantity[53.`2., "Picometers"]|>,
"He" -> <|"AtomicNumber" -> 2,
"AtomicMass" -> Quantity[4.002602`7., "AtomicMassUnit"],
"AtomicRadius" -> Quantity[31.`2., "Picometers"]|>,
"Li" -> <|"AtomicNumber" -> 3,
"AtomicMass" -> Quantity[6.941`4., "AtomicMassUnit"],
"AtomicRadius" -> Quantity[167.`3., "Picometers"]|>,
"Be" -> <|"AtomicNumber" -> 4,
"AtomicMass" -> Quantity[9.012182`7., "AtomicMassUnit"],
"AtomicRadius" -> Quantity[112.`3., "Picometers"]|>,
"B" -> <|"AtomicNumber" -> 5,
"AtomicMass" -> Quantity[10.811`5., "AtomicMassUnit"],
"AtomicRadius" -> Quantity[87.`2., "Picometers"]|>|>,
"data/atoms"]
Out[1]=
让云表达式公用,使得任何人都可以阅读.
In[2]:=
SetPermissions[CloudExpression["data/atoms"], "Public"]
Out[2]=
另一个用户就可以提取所有五个原子的原子量
In[3]:=
atoms = CloudExpression[
"https://www.wolframcloud.com/objects/user-b0c28e9f-876d-4478-9d8b-\
9e7d18a9ea81/CloudExpression/data/atoms"]
Out[3]=
In[4]:=
atoms[All, "AtomicMass"]
Out[4]=