我是groovy新手。我試圖在groovy中分割json對象中的值,但我似乎找不到解決方案。請在下面找到 def inputFile = new File("C:\\graph.json")
def InputJSON = new JsonSlurper().parseFile(inputFile,'UTF-8')
InputJSON.each{println i
我做了兩個隨機數從0到3 a=0;
b=3;
A=round(a+(b-a)*rand(1,1000));
B=round(a+(b-a)*rand(1,1000));
然後我他們中的每兩位補充。然後我將其轉換爲二進制文件。 SUM = A + B;
binarySum = dec2bin(SUM);
,因爲我想算的轉變,我寫這樣的代碼: s = 1;
for i = 1:100
case1 = """ do some test
here"""
case2 = """ do some test2
here"""
print(case1.split("some")[1].split('\n|,')[0])
既不\n也不,在這裏工作。 輸出應該 test
但它給我 test,
here