@

前言:

来看这篇教程估计都是java课程设计吧,现在已经没有公司很少使用swing组件了,java主要还是开发Web方面,可以了解以下swing组件仅此而已。我们这是一个组做的课程设计,一共写了三个:window画板,解码器,计算器,我只写了计算器,所以我将计算器的代码单独发布

主函数

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*; class menu_li001 {
public static void main(String[] args) {
menu_li002 li = new menu_li002();
li.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
li.setVisible(true);
li.pack();
li.setSize(600,100); }
} class menu_li002 extends JFrame{
static int i;
public menu_li002(){
TextField f1 = new TextField(24);
new Box(BoxLayout.X_AXIS);
JPanel card=new JPanel();
CardLayout Clayout=new CardLayout();
JPanel mi = new JPanel();
JRadioButton choose02 = new JRadioButton("计算器");
JLabel calculter =new JLabel(new ImageIcon("src/calculter.jpg"));
Box h = Box.createHorizontalBox();
Box h1 = Box.createHorizontalBox();
Box vbox = Box.createVerticalBox();
ButtonGroup bg1 = new ButtonGroup();
ButtonGroup bg2 = new ButtonGroup();
ButtonGroup bg3 = new ButtonGroup();
bg2.add(choose02);
h.add(choose02);
h1.add(f1);
vbox.add(h);
vbox.add(h1);
setContentPane(vbox);
mi.add(h);
mi.add(h1);
card.add(mi);
add(card);
choose02.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
f1.setText("你选中:" + choose02.getText());
add(BorderLayout.SOUTH,calculter);
//contentPane.add(calculter);
CacultorL window=new CacultorL();
window.setSize(500,300);
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
window.pack();
window.setJMenuBar(CacultorL.menuBar);
window.setVisible(true);
bg1.clearSelection();
bg3.clearSelection();
}
});
}
}

打开界面如下图:

普通计数器

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*; public class CacultorL extends JFrame implements ActionListener{
JPanel cards;
CardLayout Clayout=new CardLayout();
JPanel cardNorth;
private final String keys[]={"%","√","x^2","1/x","CE","C","<-","/","7","8","9","*","4","5","6","-","1","2","3","+","+/-","0",".","="};
private final String Rom[]={"MC","MR","M+","M-","MS","M"};
private JButton Keys[]=new JButton[keys.length];
private JButton rom[]=new JButton[Rom.length];
static JMenuBar menuBar=new JMenuBar();
JPanel CenterPanel=new JPanel();
JPanel NorthPanel=new JPanel();
JPanel SouthPanel=new JPanel();
JTextField textField=new JTextField(17);
JTextField textFieldUp=new JTextField(17);
private double left;
private double right;
private static double result;
private String Result;
private String temp="";
private static int option;
private static String temp1="";
private static int option1=0;
private static double right1; public static void main(String[] args) throws IOException {
CacultorL window=new CacultorL();
window.setSize(500,300);
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
window.pack(); window.setVisible(true);
DataOutputStream dataOutputStream=new DataOutputStream(new FileOutputStream("src/a.dat"));
dataOutputStream.writeDouble(result);
}
public CacultorL() {
// File Datap=new File("DataIn.txt");
// FileWriter in=new FileWriter(Datap); JMenu fileItem=new JMenu(" 功能菜单");
JMenuItem card1=new JMenuItem(" 科学");
// JMenuItem card2=new JMenuItem(" 标准");
menuBar.add(fileItem);
fileItem.add(card1);
// fileItem.add(card2);
cards=new JPanel();
cards.setLayout(Clayout);
cardNorth=new JPanel();
cardNorth.setLayout(Clayout);
SouthPanel.setLayout(new GridLayout(2,1));
CenterPanel.setLayout(new GridLayout(6,4));
NorthPanel.setLayout(new GridLayout(1,6));
CenterPanel.setPreferredSize(new Dimension(250,150));
NorthPanel.setPreferredSize(new Dimension(350,70));
addRom(Rom);
for(int i=0;i<keys.length;i++) {
addKeys(keys[i],i);
}
SouthPanel.add(textFieldUp);
SouthPanel.add(textField);
add(SouthPanel,BorderLayout.NORTH);
Kcacultor a=new Kcacultor();
// add(a.center1,BorderLayout.SOUTH);
add(NorthPanel,BorderLayout.CENTER);
cards.add(CenterPanel);
cards.add(a.center1);
cardNorth.add(SouthPanel);
cardNorth.add(a.NorthPanel);
//Kcacultor.center1.setBackground(Color.BLACK);
add(BorderLayout.SOUTH,cards);
add(BorderLayout.NORTH,cardNorth);
textField.setHorizontalAlignment(JTextField.RIGHT);
textField.setEditable(false);
textFieldUp.setHorizontalAlignment(JTextField.RIGHT);
textFieldUp.setEditable(false);
card1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Clayout.next(cards);
Clayout.next(cardNorth);
textField.setText("");
textFieldUp.setText("");
temp="";
temp1="";
left=0;
right=0;
}
}); }
public void addKeys(String keys,int i){
Keys[i]= new JButton(keys);
CenterPanel.add(Keys[i]);
Keys[i].addActionListener(this);
}
public void addRom(String Rom[]){
for(int i=0;i<Rom.length;i++){
rom[i]= new JButton(Rom[i]);
NorthPanel.add(rom[i]);
}
}
@Override
public void actionPerformed(ActionEvent e) { if(e.getSource()==Keys[8]){
temp+="7";
temp1+="7";
textField.setText(temp); }else if(e.getSource()==Keys[9]){
temp1+="8";
temp+="8";
textField.setText(temp); }else if(e.getSource()==Keys[10]){
temp1+="9";
temp+="9";
textField.setText(temp); }else if(e.getSource()==Keys[12]){
temp1+="4";
temp+="4";
textField.setText(temp); }else if(e.getSource()==Keys[13]){
temp1+="5";
temp+="5";
textField.setText(temp); }else if(e.getSource()==Keys[14]){
temp1+="6";
temp+="6";
textField.setText(temp); }else if(e.getSource()==Keys[16]){
temp1+="1";
temp+="1";
textField.setText(temp);
}
else if(e.getSource()==Keys[17]){
temp1+="2";
temp+="2";
textField.setText(temp);
}
else if(e.getSource()==Keys[18]){
temp1+="3";
temp+="3";
textField.setText(temp);
}else if(e.getSource()==Keys[21]){
temp1+="0";
temp+="0";
textField.setText(temp); }
if(e.getSource()==Keys[0]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
temp1+="%";
textFieldUp.setText(temp1);
option=2;
option1=0; }else if(e.getSource()==Keys[23]){
option1++;
if(option==1){
String Right=textField.getText();
right=Double.parseDouble(Right);
result=left+right;
Result=""+result;
if(option1>1){
result=left+right1;
}
Result=""+result;
left=result;
}else if (option==2){
right=Double.parseDouble(textField.getText());
result=left%right;
Result=""+result;
}else if(option==3){
if(option1==1) {
right = Double.parseDouble(textField.getText());
result = left / right;
right1=right;
}
if(option1>1){
result=left/right1;
}
Result=""+result;
left=result;
}else if(option==4){
right=Double.parseDouble(textField.getText());
result=left*right;
Result=""+result;
if(option1>1){
result=left*right1;
}
Result=""+result;
left=result; }else if(option==5){
if(option1==1) {
right = Double.parseDouble(textField.getText());
result = left - right;
right1=right;
}
if(option1>1){
result=left-right1;
}
Result=""+result;
left=result; } try {
DataOutputStream dataOutputStream = new DataOutputStream(new FileOutputStream("src/a.dat"));
dataOutputStream.writeDouble(result);
//byte[] buffer = new byte[1024];
//dataOutputStream.write(buffer,0,8);
dataOutputStream.close(); } catch (Exception e1) {
e1.printStackTrace();
}
textField.setText(Result);
}else if (e.getSource()==Keys[1]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.sqrt(left);
Result=""+result;
temp1="√("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if(e.getSource()==Keys[2]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=left*left;
temp1="sqr("+temp1+")";
Result=""+result;
textField.setText(Result);
textFieldUp.setText(temp1);
left=result;
}else if(e.getSource()==Keys[3]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=1/left;
Result=""+result;
textFieldUp.setText(Result);
}else if(e.getSource()==Keys[4]){
textField.setText("");
temp="";
temp1="";
left=0;
right=0;
}else if(e.getSource()==Keys[19]){
left=Double.parseDouble(textField.getText());
temp1+="+";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=1;
option1=0; }else if(e.getSource()==Keys[5]){
textField.setText("");
textFieldUp.setText("");
temp="";
temp1=""; }else if(e.getSource()==Keys[7]){
left=Double.parseDouble(textField.getText());
temp1+="/";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=3;
option1=0; }else if(e.getSource()==Keys[11]){
left=Double.parseDouble(textField.getText());
temp1+="*";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=4;
option1=0; }else if(e.getSource()==Keys[15]){
left=Double.parseDouble(textField.getText());
temp1+="-";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=5;
option1=0; }else if(e.getSource()==Keys[22]){
temp1+=".";
temp+=".";
textField.setText(temp);
}else if(e.getSource()==Keys[6]){
temp1=textField.getText();
temp1=temp1.substring(0,temp1.length()-1);
temp=temp1;
textField.setText(temp1);
}else if(e.getSource()==Keys[20]){
right=Double.parseDouble(textField.getText());
right=-right;
Result=""+right;
textField.setText(Result);
temp1=temp1.substring(0,temp1.length()-2);
temp1+=textField.getText(); } } }

界面如下:

科学计算器

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Kcacultor extends JFrame implements ActionListener{
JPanel card=new JPanel();
CardLayout ClayoutNext=new CardLayout();
JPanel CenterPanelk1=new JPanel();
JPanel CenterPanelK2=new JPanel();
JPanel SouthPanel=new JPanel();
JPanel center1=new JPanel();
private double left;
private double right;
private String temp="";
private String temp1="";
private String Result;
private double result;
private int option1=0;
private int option;
private final String keys1[]={"x^2","x^y","sin","cos","tan","√","10^x","log","Exp","Mod"};
private final String keys2[]={"x^3","y√x","arcsin","arccos","arctan","1/x","e^x","In","dms","deg"};
private final String keys3[]={"↑","CE","C","<-","/","Π","7","8","9","*","n!","4","5","6","-","+/-","1","2","3","+","(",")","0",".","="};
private JButton Keys1[]=new JButton[keys1.length];
private JButton Keys2[]=new JButton[keys2.length];
private JButton Keyscenter[]=new JButton[keys3.length];
private static double right1;
JPanel NorthPanel=new JPanel();
JTextField textField=new JTextField(17);
JTextField textFieldUp=new JTextField(17);
// CacultorL b=new CacultorL();
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==Keyscenter[0]){
ClayoutNext.next(card); }else if(e.getSource()==Keyscenter[6]){
temp+="7";
temp1+="7";
textField.setText(temp);
}else if(e.getSource()==Keyscenter[7]){
temp+="8";
temp1+="8";
textField.setText(temp);
}else if(e.getSource()==Keyscenter[8]){
temp+="9";
temp1+="9";
textField.setText(temp);
}
else if(e.getSource()==Keyscenter[11]){
temp+="4";
temp1+="4";
textField.setText(temp);
}
else if(e.getSource()==Keyscenter[12]){
temp+="5";
temp1+="5";
textField.setText(temp);
}
else if(e.getSource()==Keyscenter[13]){
temp+="6";
temp1+="6";
textField.setText(temp);
}
else if(e.getSource()==Keyscenter[16]){
temp+="1";
temp1+="1";
textField.setText(temp);
}
else if(e.getSource()==Keyscenter[17]){
temp+="2";
temp1+="2";
textField.setText(temp);
}
else if(e.getSource()==Keyscenter[18]){
temp+="3";
temp1+="3";
textField.setText(temp);
}else if(e.getSource()==Keyscenter[24]){
option1++;
if(option==1){
String Right=textField.getText();
right=Double.parseDouble(Right);
result=left+right;
Result=""+result;
if(option1>1){
result=left+right1;
}
Result=""+result;
left=result;
}else if (option==2){
right=Double.parseDouble(textField.getText());
result=left%right;
Result=""+result;
}else if(option==3){
if(option1==1) { right = Double.parseDouble(textField.getText());
result = left / right;
right1=right;
}
if(option1>1){
result=left/right1;
}
Result=""+result;
left=result;
}else if(option==4){
right=Double.parseDouble(textField.getText());
result=left*right;
Result=""+result;
if(option1>1){
result=left*right1;
}
Result=""+result;
left=result;
}else if(option==5){
if(option1==1) { right = Double.parseDouble(textField.getText());
result = left - right;
right1=right;
}
if(option1>1){
result=left-right1;
}
Result=""+result;
left=result;
}else if(option==6){
right=Double.parseDouble(textField.getText());
for(int i=0;i<right;i++){
result=left*left;
}
Result=""+result;
left=result;
}else if(option==7){
right=Double.parseDouble(textField.getText());
for (int i=1;i<=right;i++){
left*=10;
}
Result=""+left;
}else if (option==8){
right=Double.parseDouble(textField.getText());
for(int i=0;i<right;i++){
result=Math.sqrt(left);
}
Result=""+result;
}
textField.setText(Result);
}else if (e.getSource()==Keyscenter[4]){
left=Double.parseDouble(textField.getText());
temp1+="/";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=3;
option1=0;
}else if (e.getSource()==Keyscenter[14]){
left=Double.parseDouble(textField.getText());
temp1+="-";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=5;
option1=0;
}else if (e.getSource()==Keyscenter[19]){
left=Double.parseDouble(textField.getText());
temp1+="+";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=1;
option1=0;
}else if (e.getSource()==Keyscenter[9]){
left=Double.parseDouble(textField.getText());
temp1+="*";
textFieldUp.setText(temp1);
textField.setText("");
temp="";
option=4;
option1=0; }else if(e.getSource()==Keyscenter[1]){
textField.setText("");
temp="";
temp1="";
right=0;
}else if(e.getSource()==Keyscenter[2]){
textField.setText("");
textFieldUp.setText("");
temp="";
temp1="";
}else if(e.getSource()==Keyscenter[3]){
temp1=textField.getText();
temp1=temp1.substring(0,temp1.length()-1);
temp=temp1;
textField.setText(temp1);
}else if(e.getSource()==Keyscenter[5]){
temp+="3.1415926535897";
temp1+="3.1415926535897";
textField.setText(temp); }else if(e.getSource()==Keyscenter[10]){
try {
left = Double.parseDouble(textField.getText());
result = 1;
for (int i = 1; i <= left; i++) {
result *= i;
}
Result = "" + result;
temp1 = "fact(" + temp1 + ")";
textField.setText(Result);
textFieldUp.setText(temp1);
}catch (Exception p){
textField.setText("溢出");
}
}else if(e.getSource()==Keyscenter[15]){
right=Double.parseDouble(textField.getText());
right=-right;
Result=""+right;
textField.setText(Result);
temp1=temp1.substring(0,temp1.length()-2);
temp1+=textField.getText();
}else if(e.getSource()==Keyscenter[23]){
temp1+=".";
temp+=".";
textField.setText(temp);
}
else if (e.getSource()==Keys1[0]){
left=Double.parseDouble(textField.getText());
//textField.setText("");
temp="";
result=left*left;
temp1="sqr("+temp1+")";
Result=""+result;
left=result;
textField.setText(Result);
textFieldUp.setText(temp1); }else if (e.getSource()==Keys1[5]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.sqrt(left);
Result=""+result;
temp1="√("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys1[1]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
temp1+="^";
textFieldUp.setText(temp1);
option=6;
}else if (e.getSource()==Keys1[2]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.sin(left);
Result=""+result;
temp1="sin("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys1[3]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.cos(left);
Result=""+result;
temp1="cos("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys1[4]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.tan(left);
Result=""+result;
temp1="tan("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys1[6]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=1;
temp1="10^"+temp1;
for(int i=0;i<left;i++){
result*=10;
}
Result=""+result;
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys1[7]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.log(left);
Result=""+result;
temp1="log("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if(e.getSource()==Keys1[8]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
temp1=temp1+"e";
textFieldUp.setText(temp1);
option=7;
}else if(e.getSource()==Keys1[9]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
temp1+="%";
textFieldUp.setText(temp1);
option=2;
option1=0;
}else if (e.getSource()==Keys2[0]){
left=Double.parseDouble(textField.getText());
//textField.setText("");
temp="";
result=left*left*left;
temp1="cube("+temp1+")";
Result=""+result;
left=result;
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[1]){
left=Double.parseDouble(textField.getText());
temp="";
temp1=temp1+"yroot";
textFieldUp.setText(temp1);
textField.setText("");
option=8;
}else if (e.getSource()==Keys2[2]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.asin(left);
Result=""+result;
temp1="arcsin("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[3]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.acos(left);
Result=""+result;
temp1="arccos("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[4]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.atan(left);
Result=""+result;
temp1="arctan("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[5]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=1/left;
Result=""+result;
textField.setText(Result);
}else if (e.getSource()==Keys2[6]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.exp(left);
Result=""+result;
temp1="e^"+temp1;
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[7]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
result=Math.log(left);
Result=""+result;
temp1="In("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[8]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
Result=""+left;
temp1="dms("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}else if (e.getSource()==Keys2[9]){
left=Double.parseDouble(textField.getText());
textField.setText("");
temp="";
Result=""+left;
temp1="degrees("+temp1+")";
textField.setText(Result);
textFieldUp.setText(temp1);
}
}
public Kcacultor(){
card=new JPanel();
card.setLayout(ClayoutNext);
NorthPanel.setLayout(new GridLayout(2,1));
CenterPanelk1.setLayout(new GridLayout(2,5));
CenterPanelK2.setLayout(new GridLayout(2,5));
SouthPanel.setLayout(new GridLayout(5,5));
NorthPanel.add(textFieldUp);
NorthPanel.add(textField);
for(int i=0;i<keys1.length;i++) {
addKeys1(keys1[i],i);
}
for(int i=0;i<keys2.length;i++) {
addKeys2(keys2[i],i);
}
for(int i=0;i<keys3.length;i++) {
addKeys3(keys3[i],i);
} card.add(CenterPanelk1);
card.add(CenterPanelK2);
SouthPanel.setPreferredSize(new Dimension(250,150));
card.setPreferredSize(new Dimension(250,70));
//CenterPanelk1.setBackground(Color.BLACK);
center1.add(card,BorderLayout.CENTER);
center1.add(SouthPanel,BorderLayout.SOUTH); center1.setLayout(new GridLayout(2,1));
add(center1,BorderLayout.SOUTH); //add(card,BorderLayout.CENTER); textField.setHorizontalAlignment(JTextField.RIGHT);
textField.setEditable(false);
textFieldUp.setHorizontalAlignment(JTextField.RIGHT);
textFieldUp.setEditable(false);
}
public void addKeys1(String keys1,int i){
Keys1[i]= new JButton(keys1);
CenterPanelk1.add(Keys1[i]);
Keys1[i].addActionListener(this);
}
public void addKeys2(String keys2,int i){
Keys2[i]= new JButton(keys2);
CenterPanelK2.add(Keys2[i]);
Keys2[i].addActionListener(this);
}
public void addKeys3(String keys3,int i){
Keyscenter[i]= new JButton(keys3);
SouthPanel.add(Keyscenter[i]);
Keyscenter[i].addActionListener(this);
}
}

通过左上角的功能菜单切换

界面如下:

注意:

如果需要单独的计算器,需要在两个计算器中添加两个输出框,我将显示框放在了主函数中。

java中用swing做一个windows计算器的更多相关文章

  1. 【Java】Swing实现一个简单的计算器

    import javax.swing.*; import java.awt.*; /** * 计算器 * @author paul * 2019.11.25 21:43 * */ public cla ...

  2. java 使用线程做一个简单的ATM存取款实例.(转)

    线程 Thread 类,和 Runable 接口 比较两者的特点和应用领域. 可以,直接继承线程Thread类.该方法编写简单,可以直接操作线程,适用于单重继承情况,因而不能在继承其他类 实现Runn ...

  3. 用swing做一个简单的正则验证工具

    直接上代码吧,因为我对swing也不熟悉,照着API一点点拼出来的. import java.awt.event.ActionEvent; import java.awt.event.ActionLi ...

  4. 在Java中用正则表达式判断一个字符串是否是数字的方法

    package chengyujia; import java.util.regex.Pattern; public class NumberUtil { /** * 判断一个字符串是否是数字. * ...

  5. Application_Start事件中用Timer做一个循环任务

    protected void Application_Start(object sender, EventArgs e) { System.Timers.Timer timer = new Syste ...

  6. IOS做一个简单计算器

    //声明非原创 步骤: 1.打开Xcode,单机Creat a new Xcode project 2.左边选择ios下Application,右边选择single view Application ...

  7. 做一个WINDOWS下破解WIFI。不须要Linux抓包!

    搬家了,没网了. 没有WIFI了! 想破解,只是没有Linux环境,不能抓包!破解! 于是自己动手开工. 在windows 下直接破解.貌似国内 还没看到.假设有了,那么请各位童鞋 提醒一下.赶急 要 ...

  8. Java Service Wrapper 使用(windows)

    1       简介 最近项目中需要做一个Windows系统服务,记录一下使用过程. Java Service Wrapper 可以将Java程序包装成系统服务,这样就可以随着系统的运行而自动运行.J ...

  9. Swing 是一个为Java设计的GUI工具包

    Swing 是一个为Java设计的GUI工具包. Swing是JAVA基础类的一部分. Swing包括了图形用户界面(GUI)器件如:文本框,按钮,分隔窗格和表. Swing提供许多比AWT更好的屏幕 ...

随机推荐

  1. angular5学习笔记(deep in 路由)

    最近接手了一个angular5的项目.项目本身是由不同的人开发的,所有代码结构风格本身就有很大不同,加上本身接触angular5也不久,之前都是使用1,所有自身压力还是很大的. 接手前几天当然是熟悉代 ...

  2. Windows安装TensorFlow

    1.下载安装Anaconda 官方地址:https://www.continuum.io/downloads/镜像地址:https://mirrors.tuna.tsinghua.edu.cn/ana ...

  3. mondrian 4.7 源码部署

    mondrian是一个开源的数据分析工程, 网上有关mondrian3.X的源码部署比较多, 有关4.X的部署较少. 目前官方推荐使用的时mondrian3.7的修订版, 可以再github上下载到最 ...

  4. PAT1088:Rational Arithmetic

    1088. Rational Arithmetic (20) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue F ...

  5. SSM-Spring-16:Spring中一些名词解释

    ------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥------------- JoinPoint(连接点):所谓连接点是指那些被拦截到的点.在spring中,这些点指的是方法,因为spri ...

  6. Ubuntu安装和卸载.bundle格式的VMware

    本文由荒原之梦原创,原文链接:http://zhaokaifeng.com/?p=628 前言: 本文中用于演示的.bundle文件是VMware-Workstation-Full-14.1.1-75 ...

  7. Android开发环境的配置2017.05.27

    关于配置Android开发环境请参考此链接:http://blog.chinaunix.net/uid-25434387-id-461933.html

  8. RCTF 2018线上赛 writeup

    苦逼的RCTF,只进行了两天,刚好第二天是5.20,出去xxx了,没法打比赛,难受.比赛结束了,还不准继续提交flag进行正确校验了,更难受. 下面是本次ctf解题思路流程 后面我解出的题会陆续更新上 ...

  9. pymysql和 SQLAlchemy在python下的使用

    #!/usr/bin/env python # -*- coding:utf-8 -*- from sqlalchemy import create_engine, Table, Column, In ...

  10. engine_init_options.go

    package ) type {         options.PersistentStorageShards = defaultPersistentStorageShards     } }