当前位置: 首页 > news >正文

安卓小练习-校园闲置交易APP(SQLite+SimpleCursorAdapter适配器)

环境:

SDK:34

JDK:20.0.2

编写工具:Android Studio 2022.3.1


整体效果(视频演示):

小练习-闲置社区APP演示视频-CSDN直播


部分效果截图:


整体工作流程:

1.用户登录(没有账号就注册)

2.输入正确密码登录,错误不可登录

3.进入后的主页面包含个人中心、闲置社区、闲置发布、闲置删除四部分

4.个人中心可以注销用户,闲置发布用于发布闲置(闲置发布后在闲置社区显示)

5.删除闲置(输入发布商品的id即可对该商品进行删除)


实现方法:

1.在数据库中创建两个数据表用于保存个人信息和商品信息

2.所有操作都结合SQLite数据库的增、删、查、改

3.记录当前用户的原理:登录成功后将当前用户信息保存在一个自定义类中(该类中创建了相关静态变量并创建了get、set方法,以便于登录成功后通过set赋值,在进入个人中心后通过get获取

4.闲置社区的展示:通过列表展示。这个列表采用了SimpleCursorAdapter适配器自定义布局(该适配器用数据库查询结果的游标作为数据源,但在使用该适配器时数据表中_id列名是必须存在的)

5.该小练习没有添加可以发布图片的模块(可以把选取的图片先转成base64格式再转成二进制存入数据库,读取时再通过二进制转base64再转成图片即可)


整个工程截图:

 


数据库设计:

数据库名:AppData

数据库表名:

1.用户表User(列名:学号、密码、姓名、手机号码)

2.商品表commodity(列名:商品ID、商品名称、商品发布者、商品价格、联系方式)

用户表User建表语句:

create table User(stu_id integer primary key,passwd varchar(20),name varchar(20),phone integer(20));

商品表commodity建表语句:

create table commodity(_id integer primary key,c_name varchar(20),cr_name varchar(20),c_price integer(20),c_phone integer(20));

 整体设计中遇到的小问题:

1.移除过多的信息

2.由于使用SimpleCursorAdapter适配器,以数据库查询结果作为数据源,故必须数据表中必须要有一个列名为_id


项目使用到的背景素材: 


 整个项目的源码:

 MyDBOpenHelper.java(创建数据库、创建表的类)

package com.campus.app.DB;import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;import androidx.annotation.Nullable;public class MyDBOpenHelper extends SQLiteOpenHelper {public static final String name = "AppData.db";//定义数据库名称public static final int version = 1;//定义数据库版本public MyDBOpenHelper(@Nullable Context context) {super(context, name, null, version);}@Overridepublic void onCreate(SQLiteDatabase sqLiteDatabase) {//编写建表语句//1.用户表User(列名:学号、密码、姓名、手机号码)sqLiteDatabase.execSQL("create table User(stu_id integer primary key,passwd varchar(20),name varchar(20),phone integer(20));");//2.商品表(列名:商品ID、商品名称、商品发布者、商品价格、联系方式)sqLiteDatabase.execSQL("create table commodity(_id integer primary key,c_name varchar(20),cr_name varchar(20),c_price integer(20),c_phone integer(20));");}@Overridepublic void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {}
}

 Data_Login.java(接受保存当前登录用户的自定义类)

package com.campus.app;import java.util.ArrayList;//接受保存登录后的参数类
//并创建get、set方法用于其他类给当前类的变量赋值或者获取该类变量的值
public class Data_Login {private static String id ="";//保存学号(常量)private static String pwd ="";//保存密码(常量)public String getId() {return id;}public void setId(String id) {this.id = id;}public String getPwd() {return pwd;}public void setPwd(String pwd) {this.pwd = pwd;}
}

Deleteidle.java(删除闲置活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;import com.campus.app.DB.MyDBOpenHelper;public class Deleteidle extends AppCompatActivity {//删除闲置//创建对象private TextView shangpinid;private Button shanchuanniu;private MyDBOpenHelper myDBOpenHelper;  //定义数据库帮助类对象private SQLiteDatabase db; //定义一个可以操作数据库的对象@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_deleteidle);initView();//调用将对象与控件绑定方法btnShanchu();//调用当点击“删除”按钮的实现方法}private void btnShanchu() {//创建当点击“删除”按钮的实现方法shanchuanniu.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {myDBOpenHelper = new MyDBOpenHelper(Deleteidle.this); //实例化数据库帮助类db = myDBOpenHelper.getWritableDatabase();//打开数据库写权限db.delete("commodity","_id=?",new String[]{shangpinid.getText().toString()});//输入框输入的id给数据库查询后删除Toast.makeText(Deleteidle.this, "已为你删除该商品!", Toast.LENGTH_SHORT).show();finish();}});}private void initView() {//创建将对象与控件绑定方法shangpinid = findViewById(R.id.shangpinid);shanchuanniu = findViewById(R.id.shanchuanniu);}
}

IdleCommunity.java(闲置社区活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.CursorAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.SimpleCursorAdapter;
import android.widget.Toast;import com.campus.app.DB.MyDBOpenHelper;import java.util.ArrayList;
import java.util.List;public class IdleCommunity extends AppCompatActivity {//闲置社区//创建对象ListView list_view_Idle;private MyDBOpenHelper myDBOpenHelper;  //定义数据库帮助类对象private SQLiteDatabase db; //定义一个可以操作数据库的对象@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_idle_community);initView();//调用将对象与控件绑定方法simpleCAP();//调用准备数据(从数据库中获取数据)+添加到适配器(SimpleCursorAdapter适配器,该适配器用数据库查询数据作为数据源)方法}private void simpleCAP() {//创建准备数据(从数据库中获取数据)+添加到适配器(SimpleCursorAdapter适配器,该适配器用数据库查询数据作为数据源)方法myDBOpenHelper = new MyDBOpenHelper(IdleCommunity.this); //实例化数据库帮助类db = myDBOpenHelper.getReadableDatabase();//打开数据库读权限Cursor cursor = db.rawQuery("select * from commodity",null);if (cursor.moveToNext()){//使用SimpleCursorAdapter适配器//这个游标查询到的数据中必须有一个列名为_id否则会报错,所以写sql语句的时候必须要查到_id。显不显示这个id到无所谓//参数:上下环境、布局文件ID、数据库查询结果的Cursor对象、数据库表中的列名、布局文件中对应的组件ID、行为CursorAdapter adapter = new SimpleCursorAdapter(IdleCommunity.this,R.layout.listview_css,cursor,new String[]{"cr_name","_id","c_name","c_price","c_phone"},new int[]{R.id.lv_css_crname,R.id.lv_css_c_id,R.id.lv_css_c_name,R.id.lv_css_c_price,R.id.lv_css_cr_phone},CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);//绑定适配器(将适配器绑定到可视化组件上)list_view_Idle.setAdapter(adapter);}}private void initView() {//创建将对象与控件绑定方法list_view_Idle = findViewById(R.id.list_view_Idle);}
}

LogOn.java(登录活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;import android.annotation.SuppressLint;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;import com.campus.app.DB.MyDBOpenHelper;public class LogOn extends AppCompatActivity {//登录//创建对象public EditText et_id,et_pwd;public Button bt_login;public TextView tv_register;private MyDBOpenHelper myDBOpenHelper;  //定义数据库帮助类对象private SQLiteDatabase db; //定义一个可以操作数据库的对象Data_Login d1 = new Data_Login();//实例化用于保存登录的传参类(创建对象)用于主页个人中心的参数,临时保存到Data_Login@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_log_on);initView();//调用将对象与控件绑定方法btnRegister();//调用当点击“没有账号,去注册”的实现方法btnLogin();//调用点击登录按钮的实现方法}private void btnLogin() {//创建点击登录按按钮后的方法bt_login.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {myDBOpenHelper = new MyDBOpenHelper(LogOn.this); //实例化数据库帮助类db = myDBOpenHelper.getReadableDatabase();//打开数据库读权限//获取界面上的学号和密码String stuid= et_id.getText().toString();String pwd = et_pwd.getText().toString();//对用户名和密码进行判断if(stuid.equals("") || pwd.equals("")){//如果没有输入学号或者密码Toast.makeText(LogOn.this, "学号和密码不能为空", Toast.LENGTH_SHORT).show();}else {//从数据库中进行查询Cursor cursor = db.rawQuery("select * from User where stu_id=? and passwd=?",new String[]{stuid,pwd});if (cursor.moveToNext()){@SuppressLint("Range") String gid = cursor.getString(cursor.getColumnIndex("stu_id"));@SuppressLint("Range") String gpwd = cursor.getString(cursor.getColumnIndex("passwd"));if(stuid.equals(gid) && pwd.equals(gpwd))//如果与数据库中的学号和密码匹配{//提示登录成功Toast.makeText(LogOn.this, "登录成功!", Toast.LENGTH_SHORT).show();//带参数传递临时保存到Data_Logind1.setId(gid);d1.setPwd(gpwd);//跳转到主页,关闭自身部分Intent it = new Intent(LogOn.this,MainActivity.class);startActivity(it); //跳转到主页finish();//关闭自身}}else {Toast.makeText(LogOn.this, "用户名或者密码错误,登陆失败!", Toast.LENGTH_SHORT).show();et_id.setText("");et_pwd.setText("");}}}});}private void btnRegister() {//创建当点击“没有账号,去注册”的实现方法tv_register.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {//跳转到注册页面,关闭自身页面startActivity(new Intent(LogOn.this,Register.class));//finish();}});}private void initView() {//创建将对象与控件绑定方法et_id = findViewById(R.id.et_id);et_pwd = findViewById(R.id.et_pwd);bt_login = findViewById(R.id.bt_login);tv_register = findViewById(R.id.tv_register);}}

MainActivity.java(登录成功后的主页面活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import androidx.viewpager2.widget.ViewPager2;import android.content.Intent;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;import java.util.ArrayList;
import java.util.List;public class MainActivity extends AppCompatActivity {//主页///创建对象LinearLayout ly_PersonalCenter;//个人中心LinearLayout ly_IdleCommunity;//闲置社区LinearLayout ly_Releaseidle;//发布闲置LinearLayout ly_Deleteidle;//删除闲置@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);initView();//调用将对象与控件绑定方法btnPersonalCenter();//调用点击个人中心布局区域时的实现方法btnIdleCommunity();//调用点击闲置社区布局区域时的实现方法btnReleaseidle();//调用点击发布闲置布局区域时的实现方法btnDeleteidle();//调用点击删除闲置布局区域时的实现方法}private void btnDeleteidle() {//创建点击删除闲置布局区域时的实现方法ly_Deleteidle.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {//实现页面跳转(当前页面跳转到删除闲置)startActivity(new Intent(MainActivity.this,Deleteidle.class));}});}private void btnReleaseidle() {//创建点击发布闲置布局区域时的实现方法ly_Releaseidle.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {//实现页面跳转(当前页面跳转到发布闲置)startActivity(new Intent(MainActivity.this,Releaseidle.class));}});}private void btnIdleCommunity() {//创建点击闲置社区布局区域时的实现方法ly_IdleCommunity.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {//实现页面跳转(当前页面跳转到闲置社区)startActivity(new Intent(MainActivity.this,IdleCommunity.class));}});}private void btnPersonalCenter() {//创建点击个人中心布局区域时的实现方法ly_PersonalCenter.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {//实现页面跳转(当前页面跳转到个人中心)startActivity(new Intent(MainActivity.this,PersonalCenter.class));}});}private void initView() {//创建将对象与控件绑定的方法ly_PersonalCenter = findViewById(R.id.ly_PersonalCenter);ly_IdleCommunity = findViewById(R.id.ly_IdleCommunity);ly_Releaseidle = findViewById(R.id.ly_Releaseidle);ly_Deleteidle = findViewById(R.id.ly_Deleteidle);}
}

PersonalCenter.java(个人中心活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;import android.annotation.SuppressLint;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;import com.campus.app.DB.MyDBOpenHelper;public class PersonalCenter extends AppCompatActivity {//个人中心//绑定控件private TextView tv_welcome;private TextView xuehao,mima,xingming,shoujihaoma;private Button xiugaixinxi,yongjiuzhuxiao;private MyDBOpenHelper myDBOpenHelper;  //定义数据库帮助类对象private SQLiteDatabase db; //定义一个可以操作数据库的对象Data_Login d1 = new Data_Login();//实例化用于获取登录保存的临时传参。用于主页个人中心。@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_personal_center);initView();//调用将对象与控件绑定方法dataloginGet();//调用获取登录保存的临时传参方法,并将该参数传给文本框,用来显示谁登陆了dataView();//调用各个文本框的默认值方法(数据库通过当前id查找该用户信息,接着赋给各个文本框)btnYjzx();//调用点击了永久注销按钮的方法}private void btnYjzx() {//创建点击了永久注销按钮的方法yongjiuzhuxiao.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {myDBOpenHelper = new MyDBOpenHelper(PersonalCenter.this); //实例化数据库帮助类db = myDBOpenHelper.getWritableDatabase();//打开数据库写权限db.delete("User","stu_id=?",new String[]{d1.getId()});Toast.makeText(PersonalCenter.this, "注销成功!期待你的下次登录!", Toast.LENGTH_SHORT).show();startActivity(new Intent(PersonalCenter.this,LogOn.class));finish();}});}private void dataView() {//创建各个文本框的默认值方法(数据库通过当前id查找该用户信息,接着赋给各个文本框)myDBOpenHelper = new MyDBOpenHelper(PersonalCenter.this); //实例化数据库帮助类db = myDBOpenHelper.getReadableDatabase();//打开数据库读权限Cursor cursor = db.rawQuery("select * from User where stu_id =?", new String[]{d1.getId()});if (cursor.moveToNext()){@SuppressLint("Range") String pxuehao = cursor.getString(cursor.getColumnIndex("stu_id"));//通过id差得的学号赋给变量pxuehao@SuppressLint("Range") String pmima = cursor.getString(cursor.getColumnIndex("passwd"));//同上道理 这里表示密码@SuppressLint("Range") String pxingming = cursor.getString(cursor.getColumnIndex("name"));//同上道理 这里表示姓名@SuppressLint("Range") String pshoujihaoma = cursor.getString(cursor.getColumnIndex("phone"));//同上道理 这里表示手机号码xuehao.setText(pxuehao);mima.setText(pmima);xingming.setText(pxingming);shoujihaoma.setText(pshoujihaoma);}}private void dataloginGet() {//创建获取登录保存的临时传参方法,并将该参数传给文本框,用来显示谁登陆了tv_welcome.setText("ID:"+d1.getId());}private void initView() {//创建将对象与控件绑定方法tv_welcome = findViewById(R.id.tv_welcome);xuehao = findViewById(R.id.xuehao);mima = findViewById(R.id.mima);xingming = findViewById(R.id.xingming);shoujihaoma = findViewById(R.id.shoujihaoma);yongjiuzhuxiao = findViewById(R.id.yongjiuzhuxiao);xiugaixinxi = findViewById(R.id.xiugaixinxi);}
}

 Register.java(注册活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;import android.content.ContentValues;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;import com.campus.app.DB.MyDBOpenHelper;public class Register extends AppCompatActivity {//注册//创建对象public EditText et_id_register,et_pwd_register,et_name_register,et_phone_register;public Button bt_register_register;private MyDBOpenHelper myDBOpenHelper;  //定义数据库帮助类对象private SQLiteDatabase db; //定义一个可以操作数据库的对象@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_register);initView();//调用将对象与控件绑定方法btnRegister();//调用当点击“注册”按钮的实现方法}private void btnRegister() {//创建当点击“注册”按钮的实现方法bt_register_register.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {myDBOpenHelper = new MyDBOpenHelper(Register.this); //实例化数据库帮助类db = myDBOpenHelper.getWritableDatabase();//打开数据库写权限ContentValues cv = new ContentValues();//创建一个Content Values对象来保存一行数据//将从各个输入框中的信息保存cv.put("stu_id",et_id_register.getText().toString());cv.put("passwd",et_pwd_register.getText().toString());cv.put("name",et_name_register.getText().toString());cv.put("phone",et_phone_register.getText().toString());if(et_id_register.getText().toString().equals("") || et_pwd_register.getText().toString().equals("") || et_name_register.getText().toString().equals("") ||  et_phone_register.getText().toString().equals("")){Toast.makeText(Register.this, "全部都需要填写", Toast.LENGTH_SHORT).show();}else {db.insert("User",null,cv);//使用insert方法添加数据Toast.makeText(Register.this, "注册成功", Toast.LENGTH_SHORT).show();//提示注册成功//跳转到登录页面,关闭自身页面startActivity(new Intent(Register.this,LogOn.class));finish();}}});}private void initView() {//创建将对象与控件绑定方法et_id_register = findViewById(R.id.et_id_register);et_pwd_register = findViewById(R.id.et_pwd_register);et_name_register = findViewById(R.id.et_name_register);et_phone_register = findViewById(R.id.et_phone_register);bt_register_register = findViewById(R.id.bt_register_register);}}

 Releaseidle.java(发布闲置活动类)

package com.campus.app;import androidx.appcompat.app.AppCompatActivity;import android.annotation.SuppressLint;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;import com.campus.app.DB.MyDBOpenHelper;public class Releaseidle extends AppCompatActivity {//发布闲置//创建对象private EditText r_shangpinid,r_shangpinmingcheng,r_shangpinjiage;private Button r_fabuanniu;private MyDBOpenHelper myDBOpenHelper;  //定义数据库帮助类对象private SQLiteDatabase db; //定义一个可以操作数据库的对象Data_Login d1 = new Data_Login();//实例化用于获取登录保存的临时传参。这里使用用于主页个人中心的参数。@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_releaseidle);initView();//调用将对象与控件绑定方法btnFabu();//调用当点击“发布”按钮的实现方法}private void btnFabu() {//创建当点击“发布”按钮的实现方法r_fabuanniu.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {myDBOpenHelper = new MyDBOpenHelper(Releaseidle.this); //实例化数据库帮助类db = myDBOpenHelper.getWritableDatabase();//打开数据库写权限ContentValues cv = new ContentValues();//创建一个Content Values对象来保存一行数据//将从各个输入框中的信息保存cv.put("_id",r_shangpinid.getText().toString());cv.put("c_name",r_shangpinmingcheng.getText().toString());cv.put("cr_name",d1.getId().toString());//将当前登录的姓名作为发布者姓名cv.put("c_price",r_shangpinjiage.getText().toString());//通过当前ID查得手机号Cursor cursor = db.rawQuery("select * from User where stu_id =?", new String[]{d1.getId()});if (cursor.moveToNext()){@SuppressLint("Range") String pshoujihaoma = cursor.getString(cursor.getColumnIndex("phone"));//同上道理 这里表示手机号码cv.put("c_phone",pshoujihaoma);//将手机号写入数据库}if(r_shangpinid.getText().toString().equals("") || r_shangpinmingcheng.getText().toString().equals("") || r_shangpinjiage.getText().toString().equals("")){Toast.makeText(Releaseidle.this, "全部都需要填写", Toast.LENGTH_SHORT).show();}else {db.insert("commodity",null,cv);//使用insert方法添加数据Toast.makeText(Releaseidle.this, "发布成功!可以前往闲置社区查看了!", Toast.LENGTH_SHORT).show();//提示注册成功//关闭自身页面finish();}}});}private void initView() {//创建将对象与控件绑定的方法、r_fabuanniu = findViewById(R.id.r_fabuanniu);r_shangpinid = findViewById(R.id.r_shangpinid);r_shangpinmingcheng = findViewById(R.id.r_shangpinmingcheng);r_shangpinjiage = findViewById(R.id.r_shangpinjiage);}
}

activity_deleteidle.xml(删除闲置页面布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".Deleteidle"android:orientation="vertical"android:background="@drawable/login_bg"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="删除闲置"android:textSize="45sp"android:gravity="center"android:layout_marginTop="30dp"/><EditTextandroid:id="@+id/shangpinid"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:hint="请输入要删除的商品ID"android:textSize="30sp"android:layout_marginTop="30dp"/><Buttonandroid:id="@+id/shanchuanniu"style="@style/Widget.Material3.Button.ElevatedButton.Icon"android:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="35sp"android:layout_marginTop="30dp"android:text="删除" />
</LinearLayout>

 activity_idle_community.xml(闲置社区页面布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".Deleteidle"android:orientation="vertical"android:background="@drawable/login_bg"><ListViewandroid:id="@+id/list_view_Idle"android:layout_width="match_parent"android:layout_height="match_parent"/></LinearLayout>

activity_log_on.xml(登录页面布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@drawable/login_bg"android:orientation="vertical"tools:context=".LogOn"><EditTextandroid:id="@+id/et_id"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="学号"android:inputType="text"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:layout_marginTop="188dp"android:textSize="35sp" /><EditTextandroid:id="@+id/et_pwd"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="密码"android:textSize="35sp"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:layout_marginTop="10dp"android:inputType="textPassword" /><Buttonandroid:id="@+id/bt_login"style="@style/Widget.Material3.Button.ElevatedButton"android:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="35sp"android:layout_marginTop="20dp"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:text="登录" /><TextViewandroid:id="@+id/tv_register"android:layout_width="match_parent"android:layout_height="wrap_content"android:text="没有账号,去注册"android:textAlignment="center"android:textColor="#FFFFFF"android:layout_marginTop="10dp"android:textSize="20sp" /></LinearLayout>

activity_main.xml(用户登录成功后的页面布局) 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".MainActivity"android:orientation="vertical"android:background="@drawable/login_bg"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_gravity="center"android:layout_weight="1"android:gravity="center"><LinearLayoutandroid:id="@+id/ly_PersonalCenter"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_margin="10dp"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageViewandroid:layout_width="116dp"android:layout_height="110dp"app:srcCompat="@android:drawable/ic_menu_manage" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="个人中心"android:textSize="40sp" /></LinearLayout><LinearLayoutandroid:id="@+id/ly_IdleCommunity"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_margin="10dp"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageViewandroid:layout_width="116dp"android:layout_height="110dp"app:srcCompat="@android:drawable/ic_menu_search" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="闲置社区"android:textSize="40sp" /></LinearLayout></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_gravity="center"android:layout_weight="1"android:gravity="center"><LinearLayoutandroid:id="@+id/ly_Releaseidle"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_margin="10dp"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageViewandroid:layout_width="116dp"android:layout_height="110dp"app:srcCompat="@android:drawable/ic_menu_share" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="发布闲置"android:textSize="40sp" /></LinearLayout><LinearLayoutandroid:id="@+id/ly_Deleteidle"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_margin="10dp"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageViewandroid:layout_width="116dp"android:layout_height="110dp"app:srcCompat="@android:drawable/ic_menu_delete" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="删除闲置"android:textSize="40sp" /></LinearLayout></LinearLayout></LinearLayout></LinearLayout>

activity_personal_center.java(个人中心页面布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".PersonalCenter"android:orientation="vertical"android:background="@drawable/login_bg"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><ImageViewandroid:layout_width="94dp"android:layout_height="100dp"android:layout_marginLeft="50dp"android:layout_marginTop="30dp"android:layout_marginBottom="30dp"app:srcCompat="@mipmap/ic_launcher_round" /><TextViewandroid:id="@+id/tv_welcome"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginTop="45dp"android:textSize="30sp"android:layout_marginLeft="10dp"android:text="欢迎~"/></LinearLayout><Viewandroid:layout_width="match_parent"android:layout_height="1dp"android:background="?android:attr/listDivider" /><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="学号:"android:textSize="20sp"/><EditTextandroid:id="@+id/xuehao"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:textSize="30sp"android:text="学号" /><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="20sp"android:layout_marginTop="10dp"android:text="密码:" /><EditTextandroid:id="@+id/mima"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:textSize="30sp"android:text="密码" /><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="20sp"android:text="姓名:"android:layout_marginTop="10dp"/><EditTextandroid:id="@+id/xingming"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:textSize="30sp"android:text="姓名" /><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="手机号码:"android:textSize="20sp"android:layout_marginTop="10dp"/><EditTextandroid:id="@+id/shoujihaoma"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:textSize="30sp"android:inputType="text"android:text="手机号码" /><Buttonandroid:id="@+id/xiugaixinxi"style="@style/Widget.Material3.Button.ElevatedButton"android:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="30sp"android:text="修改信息" /><Buttonandroid:id="@+id/yongjiuzhuxiao"style="@style/Widget.Material3.Button.ElevatedButton"android:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="30sp"android:text="永久注销" /></LinearLayout>

activity_register.xml(注册页面布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:background="@drawable/login_bg"android:orientation="vertical"tools:context=".LogOn"><EditTextandroid:id="@+id/et_id_register"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="学号"android:inputType="text"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:layout_marginTop="30dp"android:textSize="35sp" /><EditTextandroid:id="@+id/et_pwd_register"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="密码"android:textSize="35sp"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:layout_marginTop="10dp"android:inputType="textPassword" /><EditTextandroid:id="@+id/et_name_register"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="姓名"android:textSize="35sp"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:layout_marginTop="10dp"android:inputType="text" /><EditTextandroid:id="@+id/et_phone_register"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="手机号码"android:textSize="35sp"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:layout_marginTop="10dp"android:inputType="number" /><Buttonandroid:id="@+id/bt_register_register"style="@style/Widget.Material3.Button.ElevatedButton"android:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="35sp"android:layout_marginTop="20dp"android:layout_marginLeft="30dp"android:layout_marginRight="30dp"android:text="注册" /></LinearLayout>

activity_releaseidle.xml(发布闲置页面布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".Deleteidle"android:orientation="vertical"android:background="@drawable/login_bg"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="发布闲置"android:textSize="45sp"android:gravity="center"android:layout_marginTop="30dp"/><EditTextandroid:id="@+id/r_shangpinid"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:hint="请输入要发布的商品ID"android:textSize="30sp"android:layout_marginTop="30dp"/><EditTextandroid:id="@+id/r_shangpinmingcheng"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:hint="请输入要发布的商品名称"android:textSize="30sp"android:layout_marginTop="30dp"/><EditTextandroid:id="@+id/r_shangpinjiage"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:inputType="text"android:hint="请输入要发布的商品价格"android:textSize="30sp"android:layout_marginTop="30dp"/><Buttonandroid:id="@+id/r_fabuanniu"style="@style/Widget.Material3.Button.ElevatedButton.Icon"android:layout_width="match_parent"android:layout_height="wrap_content"android:textSize="35sp"android:layout_marginTop="30dp"android:text="发布" />
</LinearLayout>

listview_css.xml(自定义每一个子列表的样式布局)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"tools:context=".LogOn"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="发布者:"android:layout_marginLeft="30dp"android:layout_marginTop="30dp"android:textSize="35sp" /><TextViewandroid:id="@+id/lv_css_crname"android:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="crname"android:layout_marginTop="30dp"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="商品ID:"android:layout_marginLeft="30dp"android:textSize="35sp" /><TextViewandroid:id="@+id/lv_css_c_id"android:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="c_id"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="商品名称:"android:layout_marginLeft="30dp"android:textSize="35sp" /><TextViewandroid:id="@+id/lv_css_c_name"android:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="c_name"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="商品价格:"android:layout_marginLeft="30dp"android:textSize="35sp" /><TextViewandroid:id="@+id/lv_css_c_price"android:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="c_price"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="联系方式:"android:layout_marginLeft="30dp"android:textSize="35sp" /><TextViewandroid:id="@+id/lv_css_cr_phone"android:layout_width="wrap_content"android:layout_height="wrap_content"android:hint="cr_phone"android:textSize="35sp" /></LinearLayout></LinearLayout>


总结:

1.代码存在一些BUG

2.个人中心的修改信息功能没有写(添上即可)

3.没有上传图片和展示图片的功能(可以把选取的图片先转成base64格式再转成二进制存入数据库,读取时再通过二进制转base64再转成图片即可) 

4.有有一些命名不规范,布局方面不是很美观 

相关文章:

安卓小练习-校园闲置交易APP(SQLite+SimpleCursorAdapter适配器)

环境&#xff1a; SDK&#xff1a;34 JDK&#xff1a;20.0.2 编写工具&#xff1a;Android Studio 2022.3.1 整体效果&#xff08;视频演示&#xff09;&#xff1a; 小练习-闲置社区APP演示视频-CSDN直播 部分效果截图&#xff1a; 整体工作流程&#xff1a; 1.用户登录&…...

Pycharm 如何更改成中文版| Python循环语句| for 和 else 的搭配使用

&#x1f308;write in front&#x1f308; &#x1f9f8;大家好&#xff0c;我是Aileen&#x1f9f8;.希望你看完之后&#xff0c;能对你有所帮助&#xff0c;不足请指正&#xff01;共同学习交流. &#x1f194;本文由Aileen_0v0&#x1f9f8; 原创 CSDN首发&#x1f412; 如…...

智合同是怎么审合同的?

#智合同#审合同#AI#深度学习#自然语言处理#知识图谱 智合同采用深度学习、自然语言处理、知识图谱等人工智能技术&#xff0c;为企业提供专业的合同相关的智能服务。其服务包含&#xff1a;合同智能审查、合同要素智能提取、合同版本对比、合同智能起草、文本一致性对比、广告…...

使用Httpclient来替代客户端的jsonp跨域解决方案

最近接手一个项目&#xff0c;新项目需要调用老项目的接口&#xff0c;但是老项目和新项目不再同一个域名下&#xff0c;所以必须进行跨域调用了&#xff0c;但是老项目又不能进行任何修改&#xff0c;所以jsonp也无法解决了&#xff0c;于是想到了使用了Httpclient来进行服务端…...

测试工具Jmeter:设置中文界面

首先我们打开Jmeter所在的文件&#xff0c;进入bin目录&#xff0c;打开Jmeter.properties&#xff1a; 打开后找到languageen&#xff1a; 改为zh_CN: 保存关闭&#xff0c;然后再打开Jmeter&#xff1a; 英文并不会显得高级&#xff0c;能做到高效的性能测试才是高级的。...

K8s攻击案例:RBAC配置不当导致集群接管

01、概述 Service Account本质是服务账号&#xff0c;是Pod连接K8s集群的凭证。在默认情况下&#xff0c;系统会为创建的Pod提供一个默认的Service Account&#xff0c;用户也可以自定义Service Account&#xff0c;与Service Account关联的凭证会自动挂载到Pod的文件系统中。 …...

运行hive的beelin2时候going to print operations logs printed operations logs

运行hive的beelin2时候going to print operations logs printed operations logs 检查HiveServer2的配置文件hive-site.xml&#xff0c;确保以下属性被正确设置&#xff1a; <property><name>hive.async.log.enabled</name><value>false</value>…...

从 MySQL 到 DolphinDB,Debezium + Kafka 数据同步实战

Debezium 是一个开源的分布式平台&#xff0c;用于实时捕获和发布数据库更改事件。它可以将关系型数据库&#xff08;如 MySQL、PostgreSQL、Oracle 等&#xff09;的变更事件转化为可观察的流数据&#xff0c;以供其他应用程序实时消费和处理。本文中我们将采用 Debezium 与 K…...

六.聚合函数

聚合函数 1.什么是聚合函数1.1AVG和SUM函数1.2MIN和MAX函数1.3COUNT函数 2.GROUP BY2.1基本使用2.2使用多个列分组2.3GROUP BY中使用WITH ROLLUP 3.HAVING3.1基本使用3.2WHERE和HAVING的区别 4.SELECT的执行过程4.1查询的结构4.2SELECT执行顺序4.3SQL执行原理 1.什么是聚合函数…...

Eclipse_03_如何加快index速度

1. ini配置文件 -Xms&#xff1a;是最小堆内存大小&#xff0c;也是初始堆内存大小&#xff0c;因为堆内存大小可以根据使用情况进行扩容&#xff0c;所以初始值最小&#xff0c;随着扩容慢慢变大。 -Xmx&#xff1a;是最大堆内存大小&#xff0c;随着堆内存的使用率越来越高&a…...

scrapy的入门和使用

scrapy的入门使用 学习目标&#xff1a; 掌握 scrapy的安装应用 创建scrapy的项目应用 创建scrapy爬虫应用 运行scrapy爬虫应用 scrapy定位以及提取数据或属性值的方法掌握 response响应对象的常用属性 1 安装scrapy 命令:     sudo apt-get install scrapy 或者&#x…...

yolov5单目测距+速度测量+目标跟踪(算法介绍和代码)

要在YOLOv5中添加测距和测速功能&#xff0c;您需要了解以下两个部分的原理&#xff1a; 单目测距算法 单目测距是使用单个摄像头来估计场景中物体的距离。常见的单目测距算法包括基于视差的方法&#xff08;如立体匹配&#xff09;和基于深度学习的方法&#xff08;如神经网…...

flink 读取 apache paimon表,查看source的延迟时间 消费堆积情况

paimon source查看消费的数据延迟了多久 如果没有延迟 则显示0 官方文档 Metrics | Apache Paimon...

无人机在融合通信系统中的应用

无人驾驶飞机简称“无人机”&#xff0c;是利用无线电遥控设备和自备的程序控制装置操纵的不载人飞行器&#xff0c;现今无人机在航拍、农业、快递运输、测绘、新闻报道多个领域中都有深度的应用。 在通信行业中&#xff0c;无人机广泛应用于交通&#xff0c;救援&#xff0c;消…...

MySQL库的操作

目录 创建数据库创建数据库案例字符集和校验规则查看系统默认字符集以及校验规则查看数据库支持的字符集查看数据库支持的字符集校验规则校验规则对数据库的影响 操纵数据库查看数据库修改数据库删除数据库数据库备份和恢复表的备份和恢复查看连接情况 创建数据库 创建数据库的…...

服务器解析漏洞有哪些?IIS\APACHE\NGINX解析漏洞利用

解析漏洞是指在Web服务器处理用户请求时&#xff0c;对输入数据&#xff08;如文件名、参数等&#xff09;进行解析时产生的漏洞。这种漏洞可能导致服务器对用户提供的数据进行错误解析&#xff0c;使攻击者能够执行未经授权的操作。解析漏洞通常涉及到对用户输入的信任不足&am…...

Https图片链接下载问题

1. 获取方法 入参是一个Url, 和一个随机的名称. 返回值是MultipartFile, 这里因为我这里需要调接口传到服务器, 这里也可以直接通过inputStream进行操作. 按需修改 /*** 通过Url获取文件** param url* param fileName 随机产生一个文件名, 可以是uuid等* return* throws Excep…...

Wireshark在移动网络中的应用

第一章&#xff1a;Wireshark基础及捕获技巧 1.1 Wireshark基础知识回顾 1.2 高级捕获技巧&#xff1a;过滤器和捕获选项 1.3 Wireshark与其他抓包工具的比较 第二章&#xff1a;网络协议分析 2.1 网络协议分析&#xff1a;TCP、UDP、ICMP等 2.2 高级协议分析&#xff1a;HTTP…...

Leetcode 1901. 寻找峰值 II(Java + 列最大值 + 二分)

题目 1901. 寻找峰值 II 一个 2D 网格中的 峰值 是指那些 严格大于 其相邻格子(上、下、左、右)的元给你一个 从 0 开始编号 的 m x n 矩阵 mat &#xff0c;其中任意两个相邻格子的值都 不相同 。找出 任意一个 峰值 mat[i][j] 并 返回其位置 [i,j] 。你可以假设整个矩阵周边…...

RabbitMQ 消息持久化

默认情况下&#xff0c;exchange、queue、message 等数据都是存储在内存中的&#xff0c;这意味着如果 RabbitMQ 重启、关闭、宕机时所有的信息都将丢失。 RabbitMQ 提供了持久化来解决这个问题&#xff0c;持久化后&#xff0c;如果 RabbitMQ 发送 重启、关闭、宕机&#xff…...

云原生核心技术 (7/12): K8s 核心概念白话解读(上):Pod 和 Deployment 究竟是什么?

大家好&#xff0c;欢迎来到《云原生核心技术》系列的第七篇&#xff01; 在上一篇&#xff0c;我们成功地使用 Minikube 或 kind 在自己的电脑上搭建起了一个迷你但功能完备的 Kubernetes 集群。现在&#xff0c;我们就像一个拥有了一块崭新数字土地的农场主&#xff0c;是时…...

【根据当天日期输出明天的日期(需对闰年做判定)。】2022-5-15

缘由根据当天日期输出明天的日期(需对闰年做判定)。日期类型结构体如下&#xff1a; struct data{ int year; int month; int day;};-编程语言-CSDN问答 struct mdata{ int year; int month; int day; }mdata; int 天数(int year, int month) {switch (month){case 1: case 3:…...

树莓派超全系列教程文档--(62)使用rpicam-app通过网络流式传输视频

使用rpicam-app通过网络流式传输视频 使用 rpicam-app 通过网络流式传输视频UDPTCPRTSPlibavGStreamerRTPlibcamerasrc GStreamer 元素 文章来源&#xff1a; http://raspberry.dns8844.cn/documentation 原文网址 使用 rpicam-app 通过网络流式传输视频 本节介绍来自 rpica…...

逻辑回归:给不确定性划界的分类大师

想象你是一名医生。面对患者的检查报告&#xff08;肿瘤大小、血液指标&#xff09;&#xff0c;你需要做出一个**决定性判断**&#xff1a;恶性还是良性&#xff1f;这种“非黑即白”的抉择&#xff0c;正是**逻辑回归&#xff08;Logistic Regression&#xff09;** 的战场&a…...

【SpringBoot】100、SpringBoot中使用自定义注解+AOP实现参数自动解密

在实际项目中,用户注册、登录、修改密码等操作,都涉及到参数传输安全问题。所以我们需要在前端对账户、密码等敏感信息加密传输,在后端接收到数据后能自动解密。 1、引入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId...

前端导出带有合并单元格的列表

// 导出async function exportExcel(fileName "共识调整.xlsx") {// 所有数据const exportData await getAllMainData();// 表头内容let fitstTitleList [];const secondTitleList [];allColumns.value.forEach(column > {if (!column.children) {fitstTitleL…...

【快手拥抱开源】通过快手团队开源的 KwaiCoder-AutoThink-preview 解锁大语言模型的潜力

引言&#xff1a; 在人工智能快速发展的浪潮中&#xff0c;快手Kwaipilot团队推出的 KwaiCoder-AutoThink-preview 具有里程碑意义——这是首个公开的AutoThink大语言模型&#xff08;LLM&#xff09;。该模型代表着该领域的重大突破&#xff0c;通过独特方式融合思考与非思考…...

Unit 1 深度强化学习简介

Deep RL Course ——Unit 1 Introduction 从理论和实践层面深入学习深度强化学习。学会使用知名的深度强化学习库&#xff0c;例如 Stable Baselines3、RL Baselines3 Zoo、Sample Factory 和 CleanRL。在独特的环境中训练智能体&#xff0c;比如 SnowballFight、Huggy the Do…...

pikachu靶场通关笔记22-1 SQL注入05-1-insert注入(报错法)

目录 一、SQL注入 二、insert注入 三、报错型注入 四、updatexml函数 五、源码审计 六、insert渗透实战 1、渗透准备 2、获取数据库名database 3、获取表名table 4、获取列名column 5、获取字段 本系列为通过《pikachu靶场通关笔记》的SQL注入关卡(共10关&#xff0…...

处理vxe-table 表尾数据是单独一个接口,表格tableData数据更新后,需要点击两下,表尾才是正确的

修改bug思路&#xff1a; 分别把 tabledata 和 表尾相关数据 console.log() 发现 更新数据先后顺序不对 settimeout延迟查询表格接口 ——测试可行 升级↑&#xff1a;async await 等接口返回后再开始下一个接口查询 ________________________________________________________…...