当前位置:网站首页>[database connection] - excerpt from training
[database connection] - excerpt from training
2022-07-24 05:09:00 【terrific51】
This note is mainly about using java Connect mysql database , Realize the addition, deletion, modification and query of the database .
The picture shows the general framework of the experiment :
Running results :
Code and explanation of each part :
1. DBconnector
package Dao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DBconnector {
//java Connect to database
private static final String DBDRIVER = "com.mysql.cj.jdbc.Driver"; // Drive string
private static final String DBURL = "jdbc:mysql://localhost:3306/grate";// Connect URL
private static final String DBUSER = "root"; // user name
private static final String DBPASSWORD = "123456"; // password
public static Connection getConnection() {
Connection conn = null;
// Abnormal judgment
try {
Class.forName(DBDRIVER);// The load driver
// Get the connection
conn = (Connection) DriverManager.getConnection(DBURL, DBUSER, DBPASSWORD);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(" Abnormal driver loading ");
}
catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(" Abnormal connection ");
}
return conn;
}
}
2. Add_users( increase )
package Dao_users;
import Dao.DBconnector;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Add_users extends JDialog implements ActionListener{
/*
* implements Serializable , For Cross Version translation
*/
private static final long SerialVersionUID =1L;
private JPanel jp1,jp2; // Situation distribution panel .
JLabel JL=new JLabel(" Add student information ",JLabel.CENTER);// Create master label
//JLabel JTextField
JLabel JLSno= new JLabel(" Student number :");
JTextField JTSno= new JTextField();
JLabel JLSname= new JLabel(" full name :");
JTextField JTSname= new JTextField();
JLabel JLSsex= new JLabel(" Gender :");
JTextField JTSsex= new JTextField();
JLabel JLSage= new JLabel(" Age :");
JTextField JTSage= new JTextField();
JLabel JLSdept= new JLabel(" college :");
JTextField JTSdept= new JTextField();
// Three buttons
JButton JB1=new JButton(" add to ");
JButton JB2=new JButton(" Reset ");
JButton JB3=new JButton(" sign out ");
// picture
ImageIcon image=new ImageIcon("D:\\ Little spongebobsquarepants .png");
JLabel label=new JLabel(image);
// Create connection data method
String sql="";
// Create a constructor
public Add_users()
{
Container c = this.getContentPane();
jp1 = new JPanel();
// Set window size
this.setSize(700,450);
this.setLocationRelativeTo(null);
this.setVisible(true);
// add to
this.setTitle(" Add student information ");
this.setLayout(null);// Set the window layout manager to null, use setBounds() Method to set the component location
//JL.setFont(new Font(" Song style ",Font.PLAIN,30));
//JL.setBounds(100,40,200,40);
//jp1.add(JL);
// Layout
JLSno.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSno.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSno.setBounds(50,50,100,30);
this.add(JLSno);
JTSno.setBounds(150,50,150,30);
this.add(JTSno);
JLSname.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSname.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSname.setBounds(370,50,100,30);
this.add(JLSname);
JTSname.setBounds(470,50,150,30);
this.add(JTSname);
JLSsex.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSsex.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSsex.setBounds(50,125,100,30);
this.add(JLSsex);
JTSsex.setBounds(150,125,150,30);
this.add(JTSsex);
JLSage.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSage.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSage.setBounds(350,125,120,30);
this.add(JLSage);
JTSage.setBounds(470,125,150,30);
this.add(JTSage);
JLSdept.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSdept.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSdept.setBounds(200,200,100,30);
this.add(JLSdept);
JTSdept.setBounds(300,200,150,30);
this.add(JTSdept);
// Three buttons
JB1.setFont(new Font(" In black ", Font.PLAIN, 30));
JB2.setFont(new Font(" In black ", Font.PLAIN, 30));
JB3.setFont(new Font(" In black ", Font.PLAIN, 30));
JB1.setBounds(80,320,120,40);
this.add(JB1);
JB1.addActionListener(this);
JB2.setBounds(280,320,120,40);
this.add(JB2);
JB2.addActionListener(this);
JB3.setBounds(480,320,120,40);
this.add(JB3);
JB3.addActionListener(this);
// picture
this.setLayout(null);
this.add(label);
label.setBounds(0,0,700,450);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e)
{
dispose();
}
});
}
public void actionPerformed(ActionEvent e) {
if(e.getSource()==JB1)
{
users users=new users();// Instantiate objects
users.setSno(JTSno.getText());
users.setSname(JTSname.getText());
users.setSsex(JTSsex.getText());
users.setSage(JTSage.getText());
users.setSdept(JTSdept.getText());
sql="select * from student where Sno='"+users.getSno()+"'";
//sql="select * from student where Sno=123";
// Connect to database
DBconnector conn=new DBconnector();
Connection con=conn.getConnection();
// establish Statement object
try {
Statement stmt=(Statement) con.createStatement();
ResultSet rs= (ResultSet) stmt.executeQuery(sql);
System.out.println("OK!");
if(rs.next())
{
JOptionPane.showMessageDialog(null," The student number already exists ");
rs.close();
}
else{
sql="insert into student(Sno,Sname,Ssex,Sage,Sdept) "
+ "values('"+users.getSno()+"','"+users.getSname()+"','"+users.getSsex()+"','"+users.getSage()+"','"+
users.getSdept()+"');";// String type put sql A double quotation mark and a single quotation mark are unified in the statement . Pay attention to the semicolon .
int i=stmt.executeUpdate(sql);
if(i>0)
{
JOptionPane.showMessageDialog(null," Add success ");
}
else{
JOptionPane.showMessageDialog(null," Add failure ");
}
}
} catch (SQLException e1) {
e1.printStackTrace();
}
}
else if(e.getSource()==JB2)
{
JTSno.setText(null);
JTSname.setText(null);
JTSsex.setText(null);
JTSage.setText(null);
JTSdept.setText(null);
}
else if(e.getSource()==JB3)
{
this.setVisible(false);
}
}
public static void main(String[] args) {
new Add_users();
}
}
3. Delete_users( Delete )
// Delete... According to student number
package Dao_users;
import Dao.DBconnector;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Delete_users extends JFrame implements ActionListener{
private static final long serialVersionUID=1L;
ImageIcon image=new ImageIcon("D:\\ Little spongebobsquarepants .png");
JLabel label=new JLabel(image);
// title
JLabel JL=new JLabel(" Delete basic information ",JLabel.CENTER);
//
JLabel JLSno= new JLabel(" Student number :");
JTextField JTSno= new JTextField();
JButton JB1=new JButton(" Delete ");
JButton JB2=new JButton(" Reset ");
JButton JB3=new JButton(" sign out ");
String sql="";
// Define the constructor
public Delete_users()
{
// Settings window
this.setTitle(" Delete student information ");
this.setSize(700,450);
this.setLocationRelativeTo(null);
this.setLayout(null);
this.setVisible(true);
this.setLayout(null);
this.add(label);
label.setBounds(0,0,700,260);
// Set topic information
JL.setForeground(Color.red);
JL.setFont(new Font(" Song style ",Font.PLAIN,19));
JL.setBounds(150,30,200,40);
this.add(JL);
//
JLSno.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSno.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSno.setBounds(200,280,100,30);
this.add(JLSno);
JTSno.setBounds(300,280,150,30);
this.add(JTSno);
// Three buttons
JB1.setFont(new Font(" In black ", Font.PLAIN, 30));
JB2.setFont(new Font(" In black ", Font.PLAIN, 30));
JB3.setFont(new Font(" In black ", Font.PLAIN, 30));
JB1.setBounds(80,340,120,40);
this.add(JB1);
JB1.addActionListener(this);
JB2.setBounds(280,340,120,40);
this.add(JB2);
JB2.addActionListener(this);
JB3.setBounds(480,340,120,40);
this.add(JB3);
JB3.addActionListener(this);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e)
{
dispose();
}
});
}
public void actionPerformed(ActionEvent e) {
if(e.getSource()==JB1)
{
users users=new users();// Instantiate objects
users.setSno(JTSno.getText());
sql="select * from student where Sno="+users.getSno();
DBconnector conn=new DBconnector();
Connection con=conn.getConnection();
try {
Statement stmt=(Statement) con.createStatement();
ResultSet rs=(ResultSet) stmt.executeQuery(sql);
if(rs.next())// If the query result exists
{
sql="delete from student where Sno="+users.getSno();
int n=stmt.executeUpdate(sql);// to update
if(n>0)JOptionPane.showMessageDialog(null, " Delete successful ");
else JOptionPane.showMessageDialog(null, " Delete failed ");
}
else
{
rs.close();
JOptionPane.showMessageDialog(null, " This student does not exist ");
}
} catch (SQLException e1) {
e1.printStackTrace();
}
}
else if(e.getSource()==JB2)
{
JTSno.setText(null);
}
else
{
this.setVisible(false);// Hide the current window
}
}
public static void main(String[] args) {
new Delete_users();
}
}
4. Get_users( check )
package Dao_users;
import Dao.DBconnector;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Vector;
public class Get_users extends JFrame{
private static final long serialVersionUID = 1L;
// Store all information
Vector all=new Vector();
// Store header information vector
Vector tablehead=new Vector();
JLabel JL=new JLabel(" Query students' basic information ",JLabel.CENTER);
JScrollPane jsl=new JScrollPane();// Set the scroll panel
JLabel JLSno= new JLabel(" Student number :");
JTextField JTSno= new JTextField();
JLabel JLSname= new JLabel(" full name :");
JTextField JTSname= new JTextField();
JLabel JLSsex= new JLabel(" Gender :");
JTextField JTSsex= new JTextField();
JLabel JLSage= new JLabel(" Age :");
JTextField JTSage= new JTextField();
JLabel JLSdept= new JLabel(" college :");
JTextField JTSdept= new JTextField();
// Define construction method
// Establish a database connection
String sql="";
public Get_users()
{
//this.setLayout(null);
//this.add(label);
//label.setBounds(100,100,1000,700);
// Database query statements
sql="select * from student;";
// Connect to database
DBconnector conn=new DBconnector();
Connection con=(Connection) conn.getConnection();
ResultSet rs=null;
Statement stmt;
try {
stmt = (Statement) con.createStatement();
rs=(ResultSet) stmt.executeQuery(sql);
tablehead.add(" Student number ");
tablehead.add(" name ");
tablehead.add(" Gender ");
tablehead.add(" Age ");
tablehead.add(" college ");
while(rs.next())
{
// Create objects
users users=new users();
users.setSno(rs.getString("Sno"));
users.setSname(rs.getString("Sname"));
users.setSsex(rs.getString("Ssex"));
users.setSage(rs.getString("Sage"));
users.setSdept(rs.getString("Sdept"));
Vector vc=new Vector();
vc.add(users.getSno());
vc.add(users.getSname());
vc.add(users.getSsex());
vc.add(users.getSage());
vc.add(users.getSdept());
System.out.println(vc);
// Put it all in vc Collection
all.add(vc);
}
JTable JT=new JTable(all,tablehead);
JT.setRowHeight(20);// Set table row height
JT.setEnabled(false);// The Settings table is not editable
jsl.setViewportView(JT);// Displayed in the scroll panel
this.add(jsl,BorderLayout.NORTH);
//this.add(JL); add to
this.setTitle(" Check all student information ");
this.setSize(700,450);
this.setLocationRelativeTo(null);
this.setVisible(true);
} catch (SQLException e1) {
e1.printStackTrace();
}
addWindowListener(new WindowAdapter() {// Set the window listener
@SuppressWarnings("unused")
public void windowsClosing(WindowEvent e)
{
dispose();
}
});
}
public void actionPerformed(ActionEvent e) {
}
public static void main(String[] args) {
new Get_users();
}
}
5. Update_users( Change )
package Dao_users;
import Dao.DBconnector;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Update_users extends JFrame implements ActionListener {
private static final long SerialVersionUID =1L;
JLabel JLSno= new JLabel(" Student number :");
JTextField JTSno= new JTextField();
JLabel JLSname= new JLabel(" full name :");
JTextField JTSname= new JTextField();
JLabel JLSsex= new JLabel(" Gender :");
JTextField JTSsex= new JTextField();
JLabel JLSage= new JLabel(" Age :");
JTextField JTSage= new JTextField();
JLabel JLSdept= new JLabel(" college :");
JTextField JTSdept= new JTextField();
// Three buttons
JButton JB1=new JButton(" add to ");
JButton JB2=new JButton(" Reset ");
JButton JB3=new JButton(" sign out ");
ImageIcon image=new ImageIcon("D:\\ Little spongebobsquarepants .png");
JLabel label=new JLabel(image);
// Create database statement object
String sql="";
public Update_users()
{
// Set window position and size , And add a title
this.setSize(700,450);
this.setLocationRelativeTo(null);
this.setVisible(true);
this.setTitle(" Modify student information ");
// Set window manager to empty
this.setLayout(null);
//
JLSno.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSno.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSno.setBounds(50,50,100,30);
this.add(JLSno);
JTSno.setBounds(150,50,150,30);
this.add(JTSno);
//
JLSname.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSname.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSname.setBounds(370,50,100,30);
this.add(JLSname);
JTSname.setBounds(470,50,150,30);
this.add(JTSname);
//
JLSsex.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSsex.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSsex.setBounds(50,125,100,30);
this.add(JLSsex);
JTSsex.setBounds(150,125,150,30);
this.add(JTSsex);
//
JLSage.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSage.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSage.setBounds(350,125,120,30);
this.add(JLSage);
JTSage.setBounds(470,125,150,30);
this.add(JTSage);
JLSdept.setFont(new Font(" In black ", Font.PLAIN, 30));
JTSdept.setFont(new Font(" In black ", Font.PLAIN, 30));
JLSdept.setBounds(200,200,100,30);
this.add(JLSdept);
JTSdept.setBounds(300,200,150,30);
this.add(JTSdept);
// Three buttons
JB1.setFont(new Font(" In black ", Font.PLAIN, 30));
JB2.setFont(new Font(" In black ", Font.PLAIN, 30));
JB3.setFont(new Font(" In black ", Font.PLAIN, 30));
JB1.setBounds(80,320,120,40);
this.add(JB1);
JB1.addActionListener(this);
JB2.setBounds(280,320,120,40);
this.add(JB2);
JB2.addActionListener(this);
JB3.setBounds(480,320,120,40);
this.add(JB3);
JB3.addActionListener(this);
this.setLayout(null);
this.add(label);
label.setBounds(0,0,700,450);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e)
{
dispose();
}
});
}
// Button event
public void actionPerformed(ActionEvent e) {
if(e.getSource()==JB1)
{
users users=new users();// Instantiate objects
users.setSno(JTSno.getText());
users.setSname(JTSname.getText());
users.setSsex(JTSsex.getText());
users.setSage(JTSage.getText());
users.setSdept(JTSdept.getText());
// Database query statements
sql="select * from student where Sno="+users.getSno();
// Connect to database
DBconnector conn=new DBconnector();
Connection con=conn.getConnection();
try {
Statement stmt=(Statement) con.createStatement();
ResultSet rs=(ResultSet) stmt.executeQuery(sql);
if(rs.next())
{
sql="update student set Sname='"+users.getSname()+"',Ssex='"+users.getSsex()+"',Sage='"+
users.getSage()+"',Sdept='"+users.getSdept()+"' where Sno ="+users.getSno();
int n=stmt.executeUpdate(sql);
if(n>0)
{
JOptionPane.showMessageDialog(null," The update is successful ");
}
else
{
JOptionPane.showMessageDialog(null, " Update failed ");
}
}
else
{
JOptionPane.showMessageDialog(null, " This student number does not exist ");
}
} catch (SQLException e1) {
e1.printStackTrace();
}
}
else if(e.getSource()==JB2)
{
JTSno.setText(null);
JTSname.setText(null);
JTSsex.setText(null);
JTSage.setText(null);
JTSdept.setText(null);
}
else if(e.getSource()==JB3)
{
this.setVisible(false);
}
}
public static void main(String[] args) {
new Update_users();
}
}
6. users
package Dao_users;
public class users {
// Transfer various data
public String getSno() {
return Sno;
}
public void setSno(String sno) {
Sno = sno;
}
public String getSname() {
return Sname;
}
public void setSname(String sname) {
Sname = sname;
}
public String getSsex() {
return Ssex;
}
public void setSsex(String ssex) {
Ssex = ssex;
}
public String getSage() {
return Sage;
}
public void setSage(String sage) {
Sage = sage;
}
public String getSdept() {
return Sdept;
}
public void setSdept(String sdept) {
Sdept = sdept;
}
// Privatization
// Student number
private String Sno;
// full name
private String Sname;
// Gender
private String Ssex;
// Age
private String Sage;
// college
private String Sdept;
public users() {
}
}
// Main interface code
7. employee
package Main;
import Dao_users.Add_users;
import Dao_users.Delete_users;
import Dao_users.Get_users;
import Dao_users.Update_users;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class employee extends JFrame implements ActionListener{
// Create four buttons
private static final long serialVersionUID = 1L;
JButton JB1=new JButton();
JButton JB2=new JButton();
JButton JB3=new JButton();
JButton JB4=new JButton();
ImageIcon image=new ImageIcon("D:\\ Little spongebobsquarepants .png"); // Insert the picture displayed on the interface
JLabel label=new JLabel(image);
String name1 = null;
public employee(String name) // Constructor adds content
{
// title
name1 = name;
this.setTitle(" Student interface management ");
this.setBackground(Color.DARK_GRAY); // Interface font color
this.setLayout(null);
this.setSize(800,800); // Run window size
this.setLocationRelativeTo(null);
this.setVisible(true);
// Personal information inquiry
JB1.setText(" Student information inquiry ");
JB1.setFont(new Font(" In black ", Font.PLAIN, 20));// Font settings
JB1.setBounds(120,420,200,40);// Button position and size settings
JB1.addActionListener(this);
this.add(JB1);
// Personal achievement query
JB2.setText(" Delete student information ");
JB2.setFont(new Font(" In black ", Font.PLAIN, 20));
JB2.setBounds(350,420,200,40);
JB2.addActionListener(this);
this.add(JB2);
// Change Password
JB3.setText(" Student information added ");
JB3.setFont(new Font(" In black ", Font.PLAIN, 20));
JB3.setBounds(120,540,200,40);
JB3.addActionListener(this);
this.add(JB3);
JB4.setText(" Student information modification ");
JB4.setFont(new Font(" In black ", Font.PLAIN, 20));
JB4.setBounds(350,540,200,40);
JB4.addActionListener(this);
this.add(JB4);
// Set picture size
this.setLayout(null);
this.add(label);
label.setBounds(0,0,700,400);
addWindowListener(new WindowAdapter() {
public void windowClosing (WindowEvent e)
{
dispose();
}
});
}
// Press the button to transfer the information from the corresponding page
@Override
public void actionPerformed(ActionEvent e) {
// Query information
if(e.getSource()==JB1)
{
new Get_users();
}
// Delete the information
else if(e.getSource()==JB2)
{
new Delete_users();
}
// Add information
else if(e.getSource()==JB3)
{
new Add_users();
}
// Change information
else if (e.getSource()==JB4)
{
new Update_users();
}
}
public static void main(String[] args) {
String name = "111";
new employee(name);
}
}


The modified interface :
边栏推荐
- The opening ceremony of the 2022 Huawei developer competition in China kicked off!
- Memorandum 2022
- What programmer is still being grabbed by the company at the age of 35? Breaking the "middle-aged crisis" of programmers
- Yolov7 -- brief introduction of the paper
- Do you want to have a robot that can make cartoon avatars in three steps?
- Summary of common errors in wechat applet cloud development
- Zhaoyi innovation gd25wdxxk6 SPI nor flash product series comes out
- EMQX 简单使用
- Infineon launched the world's first TPM security chip with post quantum encryption technology for firmware update
- Uniapp learning
猜你喜欢
![[postgraduate entrance examination vocabulary training camp] day 10 - capital, expand, force, adapt, depand](/img/9a/a218c46806cf286f0518a72809e084.png)
[postgraduate entrance examination vocabulary training camp] day 10 - capital, expand, force, adapt, depand

一文带你深入浅出C字符串函数和内存函数

In his early 30s, he became a doctoral director of Fudan University. Chen Siming: I want to write both codes and poems

XML schema

postgresql:在Docker中运行PostgreSQL + pgAdmin 4

Chiitoitsu (expected DP)

Middle aged crisis, workplace dad who dare not leave, how to face life's hesitation
![Codeforce:d2. remove the substring (hard version) [greedy string + subsequence]](/img/c1/320e0349e2edda0eb420ed018aa831.png)
Codeforce:d2. remove the substring (hard version) [greedy string + subsequence]

Drools development decision table

明星逆市入局的NFT,如何能走出独立行情?
随机推荐
Recursive cascade network: medical image registration based on unsupervised learning
)的低字节来反馈给应用层或者成多种格式文档:
Sword finger offer special assault edition day 7
All sections need to be able to have a problem system port, the first subscript. Many machines become
Globally and locally consistent image completion paper notes
Yolov7 -- brief introduction of the paper
PHP修改配置文件的两种方法
Technical team: improve team effectiveness, starting from never doing three things
Heavy! The 2022 China open source development blue book was officially released
Chapter VI more supervision training
[Huang ah code] Introduction to MySQL - 3. I use select *, and the boss directly rushed me home by train, but I still bought a station ticket
What is the sandbox technology in the data anti disclosure scheme?
Hcip day 3 - mGRE experiment
Update C language notes
Crazy God redis notes 09
Context encoders: feature learning by painting paper notes
Markov random field: definition, properties, maximum a posteriori probability problem, energy minimization problem
Using a* heuristic search to solve maze routing problem
1. There is a fractional sequence: 2/1, 3/2, 5/3, 8/5, 13/8,... Program to sum the first 20 items of this sequence.
Jetson设备 faild to download repository information使用小技巧记录