java SWT實現最簡單的加法器

2021-06-12 07:11:57 字數 928 閱讀 6089

練練手~~

從這裡學的

難點:怎樣把輸入字串轉換成double型

import org.eclipse.swt.swt;

public class test catch (exception e)

} /**

* open the window.

*/public void open()

} }/**

* create contents of the window.

*/protected void createcontents()

});

b1.setbounds(0, 10, 80, 27);

b1.settext("begin");

t1 = new text(shell, swt.border);

t1.setbounds(7, 65, 73, 23);

t2 = new text(shell, swt.border);

t2.setbounds(155, 65, 73, 23);

t3 = new text(shell, swt.border);

t3.setbounds(304, 65, 73, 23);

label lblnewlabel = new label(shell, swt.none);

lblnewlabel.setbounds(123, 68, 61, 17);

lblnewlabel.settext("+");

label lblnewlabel_1 = new label(shell, swt.none);

lblnewlabel_1.setbounds(259, 68, 61, 17);

lblnewlabel_1.settext("=");

}}

最簡單的IdentityServer實現 Api

建立asp.net core web api專案identityserver.easydemo.api 2引用identityserver4.accesstokenvalidation 3新增介面檔案identitycontroller.cs,用於測試授權 如果你直接訪問http localhost...

ARM彙編實現簡單的加法運算

對於初學者來說,這個程式還是能學到很多東西的。另外,對要學彙編的同學說一句,就算是選修課做作業,也不要覺 得幾行就寫完很容易,光在紙上寫,實際執行的時候語法問題上還是很多的。我做這個作業用的是keil的realview mdk測 試,arm9平台。題目 將記憶體中從0x400800開始的100個字資...

tensoflow實現最簡單的分類

import numpy as np import tensorflow as tf import random import pickle from collections import counter import nltk from nltk.tokenize import word toke...