k****e 发帖数: 100 | 1 手头上有个软件,不过不支持表达式,比如对于:
a:=4*5
b:=2+a
t: property1=b, property2=a
只能将b和a计算出来,然后写:
t: property1=22, property2=20
我想扩展一下这个程序,模模糊糊感觉lex/yacc(没用过)或者python 的eval(用它
写
个模块,做表达式计算,然后替代)能帮上点忙。各位有什么建议么? |
|
b******u 发帖数: 81 | 2 我前一段时间用过这个办法,也是网上抄的。
public class TestCase
{
[XmlArray("TestModules")]
[XmlArrayItem("TestModule")]
public TestModules TestModules { get; set; }
}
public class TestModules : List { }
public class TestModule {}
------------------------------------------
|
|
发帖数: 1 | 3 嗯。这年头,一定要同时拿到诺贝尔医学奖,图灵奖,奥斯卡奖,不然都不好意思声称
自己是bioinformatician
具体筛选如下:
import zhuangbility
bioinformatician=[]
qianlao=[name, property1, property2, property3]
if (qianlao[1]='Nobel in Physiology or Medicine' and
###Means this qianlao is biology bigbull
qianlao[2]='Turing Award' and
###Means this qianlao is computing genius
qianlao[3]='Oscar' ):
###Means this qianlao has excellent performance skills to chui-niu-bi
bioinformatician.append(qianlao[0]) |
|