牛客社区所有的表和SQL语句

news2025/3/11 9:01:58

文章目录

  • 1 帖子表 discuss_post
    • 1.1 字段描述
    • 1.2 相关功能描述
      • 1.2.1 分页查询帖子
      • 1.2.2 查询帖子总数量
      • 1.2.3 插入一条帖子记录
      • 1.2.4 根据帖子ID查询某条帖子
      • 1.2.5 更新帖子评论数量
      • 1.2.6 更新帖子类型
      • 1.2.6 更新帖子状态
      • 1.2.7 更新帖子分数
  • 2 用户表 user
    • 2.1 字段描述
    • 2.2 相关功能描述
      • 2.2.1 根据用户ID查询用户
      • 2.2.2 通过用户名查询用户
      • 2.2.3 根据用户邮箱查询用户
      • 2.2.4 插入一条用户记录
      • 2.2.5 更新用户状态
      • 2.2.6 更新用户头像
      • 2.2.7 更新用户密码
  • 3 登录凭证表 login_ticket
    • 3.1 字段描述
    • 3.2 相关功能描述
      • 3.2.1 插入一条登录凭证记录
      • 3.2.2 根据凭证字符串查询登录凭证
      • 3.2.3 根据凭证字符串修改对应登录凭证的状态
  • 4 评论表 comment
    • 4.1 字段描述
    • 4.2 相关功能描述
      • 4.2.1 分页查询某个帖子的回帖,查询某个回帖下的所有评论和回复
      • 4.2.2 查询某条帖子的回帖数量,查询回帖下的评论和回复数量
      • 4.2.3 插入一条comment记录(回帖/评论/回复)
      • 4.2.4 根据comment 的 id查询回帖/评论/回复
  • 5 消息表 message
    • 5.1 字段描述
    • 5.2 相关功能描述
      • 5.2.1 分页查询某个用户的所有私信,按会话id分组,每组只有一条最新的私信
      • 5.2.2 根据userId,查询某个用户所有会话的数量
      • 5.2.3 根据conversation_id查询消息列表
      • 5.2.4 查询某个用户未读消息数量,查询某个用户的某个会话id下的未读消息数量
      • 5.2.5 新增一条消息记录
      • 5.2.6 根据消息ids,修改一批消息的状态
      • 5.2.7 查询某个用户的,某个通知事件类型的,一条最新通知
      • 5.2.8 查询某个用户的,某个通知事件类型的,通知数量
      • 5.2.9 查询某个用户的未读通知数量,查询某个用户的某个通知事件类型的未读通知数量
      • 5.2.10 分页查询某个用户的,某个通知事件类型的通知

1 帖子表 discuss_post

1.1 字段描述

描述字段类型
帖子Id,主键idint
贴子所属的用户id,帖子是由谁发表的user_idvarchar(45)
帖子标题titlevarchar(100)
帖子内容contenttext
帖子类型:0-普通; 1-置顶;typeint
帖子状态:0-正常; 1-精华; 2-删除;statusint
帖子创建时间create_timetimestamp
帖子评论数量(回帖、评论、回复)comment_countint
帖子分数(根据分数进行热度排行)scoredouble

1.2 相关功能描述

1.2.1 分页查询帖子

对应接口

List<DiscussPost> selectDiscussPosts(int userId, int offset, int limit, int orderMode);

注意事项

  1. 以下所有查询都是查未被删除的帖子,即status != 2。
  2. 如果userId不为0,即要查询某个用户的帖子。
  3. 如果 orderMode 为 0,先按照帖子类型(置顶1、普通0)降序排序,让置顶的帖子放在前面,type一样的帖子按照时间顺序降序排序,让先发表的帖子放在前面。
  4. 如果 orderMode 为 1,表示按照热度查询,先按照帖子类型(置顶1、普通0)降序排序,让置顶的帖子放在前面,type一样的帖子分数降序排序,让分数高的帖子放在前面,如果分数一样,按照时间排序,把先发布的帖子放在前面。

对应SQL

<select id="selectDiscussPosts" resultType="DiscussPost">
    select <include refid="selectFields"></include>
    from discuss_post
    where status != 2
    <if test="userId!=0">
        and user_id = #{userId}
    </if>
    <if test="orderMode==0">
        order by type desc, create_time desc
    </if>
    <if test="orderMode==1">
        order by type desc, score desc, create_time desc
    </if>
    limit #{offset}, #{limit}
</select>

1.2.2 查询帖子总数量

对应接口

int selectDiscussPostRows(@Param("userId") int userId);

注意事项

  1. 查询的是查未被删除的帖子,即status != 2。
  2. 如果userId不为0,表明要查询某个用户发布的帖子总数量,此时应该假设where条件判断。

对应SQL

<select id="selectDiscussPostRows" resultType="int">
    select count(*)
    from discuss_post
    where status != 2
    <if test="userId!=0">
        and user_id = #{userId}
    </if>
</select>

1.2.3 插入一条帖子记录

对应接口

int insertDiscussPost(DiscussPost discussPost);

注意事项

传入的是帖子对象

对应SQL

<insert id="insertDiscussPost" parameterType="DiscussPost" keyProperty="id">
    insert into discuss_post(<include refid="insertFields"></include>)
    values(#{userId},#{title},#{content},#{type},
    #{status},#{createTime},#{commentCount},#{score})
</insert>

1.2.4 根据帖子ID查询某条帖子

对应接口

DiscussPost selectDiscussPostById(int id);

注意事项

查询的是未被删除的帖子,所以status != 2。

对应SQL

<select id="selectDiscussPostById" resultType="DiscussPost">
    select <include refid="selectFields"></include>
    from discuss_post
    where status != 2 and id = #{id}
</select>

1.2.5 更新帖子评论数量

对应接口

int updateCommentCount(int id, int commentCount);

注意事项

更新帖子评论数量要和新增帖子放在同一个事务中,防止出现数据不一致问题。

对应SQL

<update id="updateCommentCount">
    update discuss_post set comment_count = #{commentCount} where id = #{id}
</update>

1.2.6 更新帖子类型

对应接口

int updateType(int id, int type);

注意事项

对应SQL

<update id="updateType">
    update discuss_post set type = #{type} where id = #{id}
</update>

1.2.6 更新帖子状态

对应接口

int updateStatus(int id, int status);

注意事项

对应SQL

<update id="updateStatus">
    update discuss_post set status = #{status} where id = #{id}
</update>

1.2.7 更新帖子分数

对应接口

int updateScore(int id, double score);

注意事项

对应SQL

<update id="updateScore">
    update discuss_post set score = #{score} where id = #{id}
</update>

2 用户表 user

2.1 字段描述

描述字段类型
用户ididint
用户名usernamevarchar(50)
用户密码passwordvarchar(50)
saltvarchar(50)
用户邮箱emailvarchar(100)
用户类型:0-普通用户; 1-超级管理员; 2-版主;typeint
用户状态:0-未激活; 1-已激活;statusint
注册用户的激活码activation_codevarchar(100)
用户头像header_urlvarchar(200)
用户创建时间create_timetimestamp

2.2 相关功能描述

2.2.1 根据用户ID查询用户

对应接口

User selectById(int id);

注意事项

对应SQL

<select id="selectById" resultType="User">
    select <include refid="selectFields"></include>
    from user
    where id = #{id}
</select>

2.2.2 通过用户名查询用户

对应接口

User selectByName(String username);

注意事项

对应SQL

<select id="selectByName" resultType="User">
    select <include refid="selectFields"></include>
    from user
    where username = #{username}
</select>

2.2.3 根据用户邮箱查询用户

对应接口

User selectByEmail(String email);

注意事项

对应SQL

<select id="selectByEmail" resultType="User">
    select <include refid="selectFields"></include>
    from user
    where email = #{email}
</select>

2.2.4 插入一条用户记录

对应接口

int insertUser(User user);

注意事项

对应SQL

<insert id="insertUser" parameterType="User" keyProperty="id">
    insert into user (<include refid="insertFields"></include>)
    values(#{username}, #{password}, #{salt}, #{email}, #{type}, #{status}, #{activationCode}, #{headerUrl}, #{createTime})
</insert>

2.2.5 更新用户状态

对应接口

int updateStatus(int id, int status);

注意事项

对应SQL

<update id="updateStatus">
    update user set status = #{status} where id = #{id}
</update>

2.2.6 更新用户头像

对应接口

int updateHeader(int id, String headerUrl);

注意事项

对应SQL

<update id="updateHeader">
    update user set header_url = #{headerUrl} where id = #{id}
</update>

2.2.7 更新用户密码

对应接口

int updatePassword(int id, String password);

注意事项

对应SQL

<update id="updatePassword">
    update user set password = #{password} where id = #{id}
</update>

3 登录凭证表 login_ticket

3.1 字段描述

描述字段类型
登录凭证ididint
用户id,谁的登录凭证user_idint
登录凭证字符串,一串UUID,保证每个登录用户不重复ticketvarchar(45)
0-有效; 1-无效;statusint
过期时间,一段时间后登录凭证会过期,用户需要重新登录expiredtimestamp

3.2 相关功能描述

3.2.1 插入一条登录凭证记录

对应接口

int insertLoginTicket(LoginTicket loginTicket);

注意事项

在插入一条登录凭证信息后需要将主键id回填,useGeneratedKeys = true, keyProperty = “id”
我觉得这个回填功能并没有使用到

对应SQL

@Insert({
        "insert into login_ticket(user_id,ticket,status,expired) ",
        "values(#{userId},#{ticket},#{status},#{expired})"
})
// @Options(useGeneratedKeys = true, keyProperty = "id")  // 这个回填并没有被使用到。

3.2.2 根据凭证字符串查询登录凭证

对应接口

LoginTicket selectByTicket(String ticket);

注意事项

对应SQL

@Select({
        "select id,user_id,ticket,status,expired ",
        "from login_ticket where ticket=#{ticket}"
})

3.2.3 根据凭证字符串修改对应登录凭证的状态

对应接口

int updateStatus(String ticket, int status);

注意事项

对应SQL

@Update({
        "<script>",
        "update login_ticket set status=#{status} where ticket=#{ticket} ",
        "<if test=\"ticket!=null\"> ",
        "and 1=1 ",
        "</if>",
        "</script>"
})

以下是对代码的解释:

解释 MyBatis 注解中的 @Update 使用

这段代码是一个 MyBatis 框架中使用的数据库更新操作的注解定义。这里使用的是 MyBatis 的动态 SQL 特性来构造 SQL 更新语句。让我们逐一分析这个代码的组成部分:

  1. @Update 注解:

    • @Update 是用于标识一个方法执行数据库的更新操作(即 SQL 的 UPDATE 语句)。
    • 在大括号 {} 内部,你可以定义实际执行的 SQL 语句。
  2. 使用 <script> 标签:

    • <script> 标签在这里用来包围可能包含动态 SQL 部分的 SQL 语句。
    • MyBatis 使用 XML 类似的标签来处理动态 SQL 语句,即使在注解中也可以使用这些标签。
  3. 更新语句:

    • update login_ticket set status=#{status} where ticket=#{ticket} 是一个基础的 SQL 更新语句,它的作用是更新 login_ticket 表中的 status 字段。更新的条件是 ticket 字段等于方法参数 ticket 的值。
  4. 使用 <if> 标签进行条件判断:

    • <if test=\"ticket!=null\"> 是一个条件语句,用来检查输入参数 ticket 是否不为 null
    • 这里的条件实际上并没有改变 SQL 逻辑,因为 and 1=1 是一个总是为真的条件。这种写法通常用于测试或者作为编写更复杂逻辑的占位符。
  5. 方法签名:

    • int updateStatus(String ticket, int status); 这个方法接收两个参数:ticketstatus,并返回一个整型值,表示更新操作影响的行数。
    • 在 MyBatis 中,更新操作通常返回一个整数,表示 SQL 语句影响的行数。

总结来说,这段代码通过 MyBatis 注解定义了一个更新数据库中 login_ticket 表的操作。它使用动态 SQL 来确保只有当 ticket 不为 null 时才执行更新,虽然在这个特定的示例中,and 1=1 没有实际的过滤作用,更多的可能是为了展示如何在条件内部使用固定的真值条件。

4 评论表 comment

4.1 字段描述

描述字段类型
回帖/评论/回复ididint
用户id,这条回帖/评论/回复是谁发的user_idint
在哪个实体类型下面:1-帖子;2-回帖entity_typeint
实体identity_idint
被回复的用户id,0-不是回复,是回帖或评论,不为0-回复的用户idtarget_idint
回帖/评论/回复的内容contenttext
回帖/评论/回复的状态:0-正常;1-删除statusint
回帖/评论/回复的创建时间create_timetimestamp

可以这样理解:在帖子下的评论,和在评论下的评论
也可以按照下面的理解
在这里插入图片描述

在这里插入图片描述

以这三条数据为例

在这里插入图片描述

在这里插入图片描述

以下是另外一组数据:

在这里插入图片描述在这里插入图片描述
在这里插入图片描述)

4.2 相关功能描述

4.2.1 分页查询某个帖子的回帖,查询某个回帖下的所有评论和回复

对应接口

List<Comment> selectCommentsByEntity(int entityType, int entityId, int offset, int limit);

注意事项

  1. 查询的回帖/评论/回复都是存在的,未被删除的,即 status = 0
  2. 当 entityType = 1:表示需要分页查询某个帖子下所有的回帖,此时会利用offset和limit参数
  3. 当 entityType = 2:表示需要查询某个回帖下的所有评论和回复,此时ofsset = 0, limit = Integer.MAX_VALUE

对应SQL

<select id="selectCommentsByEntity" resultType="Comment">
    select <include refid="selectFields"></include>
    from comment
    where status = 0
    and entity_type = #{entityType}
    and entity_id = #{entityId}
    order by create_time asc
    limit #{offset}, #{limit}
</select>

4.2.2 查询某条帖子的回帖数量,查询回帖下的评论和回复数量

对应接口

int selectCountByEntity(int entityType, int entityId);

注意事项

  1. 当 entiyType = 1:查询某条帖子的回帖数量,用于分页显示计算回帖页数。
  2. 当 entiyType = 2:查询回帖下的评论和回复数量,用于前端页面显示某条回帖下的评论和回复数量。

对应SQL

<select id="selectCountByEntity" resultType="int">
    select count(id)
    from comment
    where status = 0
    and entity_type = #{entityType}
    and entity_id = #{entityId}
</select>

4.2.3 插入一条comment记录(回帖/评论/回复)

对应接口

int insertComment(Comment comment);

注意事项

对应SQL

<insert id="insertComment" parameterType="Comment">
    insert into comment(<include refid="insertFields"></include>)
    values(#{userId},#{entityType},#{entityId},#{targetId},#{content},#{status},#{createTime})
</insert>

4.2.4 根据comment 的 id查询回帖/评论/回复

对应接口

Comment selectCommentById(int id);

注意事项

对应SQL

<select id="selectCommentById" resultType="Comment">
    select <include refid="selectFields"></include>
    from comment
    where id = #{id}
</select>

5 消息表 message

5.1 字段描述

消息ididint
消息发送方id:1-系统;大于1-用户idfrom_idint
消息接收方用户idto_idint
对话id或通知事件类型:小用户id_大用户id,表示是对话id;like/follow/comment,表示是通知事件类型conversation_idvarchar(45)
消息的内容contenttext
消息状态:0-未读;1-已读;2-删除;statusint
消息创建时间create_timetimestamp

在这里插入图片描述
在这里插入图片描述
可以这样理解:在帖子下的评论,和在评论下的评论
在这里插入图片描述

5.2 相关功能描述

5.2.1 分页查询某个用户的所有私信,按会话id分组,每组只有一条最新的私信

对应接口

List<Message> selectConversations(int userId, int offset, int limit);

注意事项

  1. 这个查询比较复杂,要嵌套查询,先查出每个会话最大的消息id,再查询这些消息id对应的完整的信息,按时间降序排序,只显示offset开始的limit条记录。
  2. 要选择未被删除的消息,所以status != 2
  3. 要选择的是私信,所以from_id != 1
  4. 要查的是user_id的对话信息,所以是from_id = #{userId} or to_id = #{userId}

对应SQL

<select id="selectConversations" resultType="Message">
    select <include refid="selectFields"></include>
    from message
    where id in (
        select max(id) from message
        where status != 2
        and from_id != 1
        and (from_id = #{userId} or to_id = #{userId})
        group by conversation_id
    )
    order by id desc
    limit #{offset}, #{limit}
</select>

5.2.2 根据userId,查询某个用户所有会话的数量

对应接口

int selectConversationCount(int userId);

注意事项

  1. 用于分页显示用户会话
  2. 要选择未被删除的消息,所以status != 2
  3. 要查询的是会话的数量,所以from_id != 1
  4. 要查的是user_id的对话信息,所以是from_id = #{userId} or to_id = #{userId}

对应SQL

我觉得直接使用这个SQL要比课程里面的要好。

select count(*) from message
where status != 2
and from_id != 1
and (from_id = 111 or to_id = 111)
group by conversation_id

5.2.3 根据conversation_id查询消息列表

对应接口

int selectLetterCount(String conversationId);

注意事项

对应SQL

我觉得这里不用写from_id != 1

<select id="selectLetterCount" resultType="int">
    select count(id)
    from message
    where status != 2
    // and from_id != 1  
    and conversation_id = #{conversationId}
</select>

5.2.4 查询某个用户未读消息数量,查询某个用户的某个会话id下的未读消息数量

对应接口

int selectLetterUnreadCount(int userId, String conversationId);

注意事项

  1. 是查询未读消息,消息发送发一定是已读的,所以要用to_id筛选
  2. 未读消息,status = 0

对应SQL

<select id="selectLetterUnreadCount" resultType="int">
    select count(id)
    from message
    where status = 0
    and from_id != 1
    and to_id = #{userId}
    <if test="conversationId!=null">
        and conversation_id = #{conversationId}
    </if>
</select>

5.2.5 新增一条消息记录

对应接口

 int insertMessage(Message message);

注意事项

  1. 如果是私信,由程序执行,同步添加
  2. 如果是通知,由消息队列,然后异步添加

对应SQL

<insert id="insertMessage" parameterType="Message" keyProperty="id">
    insert into message(<include refid="insertFields"></include>)
    values(#{fromId},#{toId},#{conversationId},#{content},#{status},#{createTime})
</insert>

5.2.6 根据消息ids,修改一批消息的状态

对应接口

int updateStatus(List<Integer> ids, int status);

注意事项

对应SQL

<update id="updateStatus">
    update message set status = #{status}
    where id in
    <foreach collection="ids" item="id" open="(" separator="," close=")">
        #{id}
    </foreach>
</update>

5.2.7 查询某个用户的,某个通知事件类型的,一条最新通知

对应接口

Message selectLatestNotice(int userId, String topic);

注意事项

  1. 要查询的是通知,所以from_id = 1
  2. 不能是已经删除的通知,所以status != 2
  3. 查询某个用户的通知,所以to_id = #{userId}

对应SQL
也可以按时间降序排序,然后limit 1,只返回1条,就是最新的那条通知

<select id="selectLatestNotice" resultType="Message">
    select <include refid="selectFields"></include>
    from message
    where id in (
        select max(id) from message
        where status != 2
        and from_id = 1
        and to_id = #{userId}
        and conversation_id = #{topic}
    )
</select>

5.2.8 查询某个用户的,某个通知事件类型的,通知数量

对应接口

int selectNoticeCount(int userId, String topic);

注意事项

  1. 要查询的是通知,所以from_id = 1
  2. 不能是已经删除的通知,所以status != 2
  3. 查询某个用户的通知,所以to_id = #{userId}

对应SQL

<select id="selectNoticeCount" resultType="int">
    select count(id) from message
    where status != 2
    and from_id = 1
    and to_id = #{userId}
    and conversation_id = #{topic}
</select>

5.2.9 查询某个用户的未读通知数量,查询某个用户的某个通知事件类型的未读通知数量

对应接口

int selectNoticeUnreadCount(int userId, String topic);

注意事项

对应SQL

<select id="selectNoticeUnreadCount" resultType="int">
    select count(id) from message
    where status = 0
    and from_id = 1
    and to_id = #{userId}
    <if test="topic!=null">
        and conversation_id = #{topic}
    </if>
</select>

5.2.10 分页查询某个用户的,某个通知事件类型的通知

对应接口

List<Message> selectNotices(int userId, String topic, int offset, int limit);

注意事项

按照时间降序排序。

对应SQL

<select id="selectNotices" resultType="Message">
    select <include refid="selectFields"></include>
    from message
    where status != 2
    and from_id = 1
    and to_id = #{userId}
    and conversation_id = #{topic}
    order by create_time desc
    limit #{offset}, #{limit}
</select>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1618243.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

spring一二三级缓存和@Lazy解决循环依赖流程

简单对象指的是 实例化后还没有属性注入的时候的早期bean lambda表达式用于判断a是否存在aop代理 假如a和b循环依赖&#xff0c;a实例化时&#xff0c; bean创建流程如下&#xff1a; 0&#xff0c;创建一个set记录当前正在实例化的bean&#xff0c; 1.实例化a的简单对象时…

陆金所控股一季报到底是利好还是利空?

3月底&#xff0c;陆金所控股&#xff08;LU.N;06623.HK&#xff09;因其特别分红方案受到市场高度关注。但在4月23日发布的2024年一季度财报中&#xff0c;陆金所控股营收同比下降30.9%&#xff0c;净亏损8.3亿元。 两者对比&#xff0c;外界不由得对公司的经营状况产生疑惑。…

docker内实现多机多卡分布式训练

docker内实现多机多卡分布式训练 1. 多台docker宿主机网络配置2. 创建overlay 网络3. 注意 1. 多台docker宿主机网络配置 https://docs.docker.com/network/overlay/ 这里需要创建overlay网络使得多台宿主机的容器可以通过网络连接 初始化swarm集群&#xff0c;并设置主节点&a…

条件编译 #和##运算符

目录 1. #运算符2. ##运算符3. 条件编译4. 题目分享总结 正文开始 前言: 本章为C语言语法完结撒花, 下文将进行C语言中#和##操作符以及条件编译的讲解, 来进一步让我们了解C语言. 作者主页: 酷酷学!!! 1. #运算符 #运算符将宏的⼀个参数转换为字符串字⾯量。它仅允许出现在带…

【刷题】前缀和入门

送给大家一句话&#xff1a; 既然已经做出了选择&#xff0c;最好还是先假定自己是对的。焦虑未来和后悔过去&#xff0c;只经历一个就够了。 – 张寒寺 《不正常人类症候群》 ☆ミヾ(∇≦((ヾ(≧∇≦)〃))≧∇)ノ彡☆ ☆ミヾ(∇≦((ヾ(≧∇≦)〃))≧∇)ノ彡☆ ☆ミヾ(∇≦((ヾ…

比特币中的符文是什么?

比特币中的符文是什么&#xff1f; 比特币符文是存在于比特币区块链上的独特的、可替代的代币。它们旨在代表具有独特特征和元数据的可替代资产。 Ordinals 协议的创建者 Casey Rodamor 最近放弃了一项替代 BRC-20 可替代代币协议的提案&#xff0c;该替代方案被称为 Runes。 破…

STM32 HAL库F103系列之DAC实验(一)

DAC输出实验 原理图 DAC数据格式 DAC输出电压 DORX - 数据输出寄存器 Vref 3.3V 实验简要 1&#xff0c;功能描述 通过DAC1通道1(PA4)输出预设电压&#xff0c; 然后由ADC1通道1 (PA1) 采集&#xff0c;最后显示ADC转换的数字量及换算后的电压值 2&#xff0c;关闭通道1…

TypeError: Cannot read properties of undefined (reading ‘tapAsync‘)

项目启动&#xff0c;一直报tabAsync未定义&#xff0c;整个项目中没有找到引用的地方&#xff1b; 最终重新安装webpack4版本 解决问题&#xff1b; npm install webpack4

Android studio顶部‘app‘红叉- Moudle ‘XX.app’ dosen’t exist in project

Android studio顶部app红叉- Moudle ‘XX.app’ dosen’t exist in project 1、现象&#xff1a; 运行老项目或者有时候替换项目中的部分代码&#xff0c;明明没有错但是Android studio就编译报错了。 1.1 Android studio顶部app红叉。 1.2 点击Build没有clear菜单&#xff0…

掼蛋赢牌口诀

1、不能做头游&#xff0c;单张暂缓走。 2、起始出单张&#xff0c;表明有大王。 3、单牌先起步&#xff0c;对家应相助。 4、情况尚不明&#xff0c;对子可先行。 5、要想使个坏&#xff0c;就出三不带。 6、小顺往前凑&#xff0c;大顺必殿后。 7、哪张牌先下&#xff0c;倒数…

Electron+Vue3+ElectronForge整合 - 打包时整合 -分步打包

说明 本文介绍一下 Electron Vue3 的打包整合的基本操作。实现的效果是 &#xff1a; 1、一个正常的Vue3项目&#xff1b; 2、整合加入 Electron 框架 &#xff1a;开发时 Electron 加载的是开发的vue项目&#xff1b; 3、完成打包时整合&#xff1a;3.1 先完成vue3项目的正常…

情感识别——情感计算的模型和数据集调查

概述 情感计算指的是识别人类情感、情绪和感觉的工作&#xff0c;已经成为语言学、社会学、心理学、计算机科学和生理学等领域大量研究的主题。 本文将概述情感计算的重要性&#xff0c;涵盖思想、概念和方法。 情感计算是皮卡德于 1997 年提出的一个想法&#xff0c;此后出…

小案例:ToolBar+选项菜单

使用选项菜单&#xff0c;一般是用于做单选&#xff0c;需要重写方法&#xff1a; public boolean onCreateOptionsMenu(Menu menu) 如果想要实现事件监听&#xff0c;则采用基于回调的事件监听机制&#xff0c;可以监听到具体是哪一项被选中。即重写方法&#xff1a; publi…

基于Spring Boot的点餐平台网站设计与实现

基于Spring Boot的点餐平台网站设计与实现 开发语言&#xff1a;Java框架&#xff1a;springbootJDK版本&#xff1a;JDK1.8数据库工具&#xff1a;Navicat11开发软件&#xff1a;eclipse/myeclipse/idea 系统部分展示 管理员登录界面&#xff0c;通过填写用户名、密码、角色…

OpenHarmony实战开发-性能测试工具SmartPerf Editor使用指导

概述 SmartPerf Editor是一款PC端桌面应用&#xff0c;通过监测、采集应用运行时FPS、CPU、GPU、Memory、Battery、Network等性能数据&#xff0c;帮助开发者了解应用的性能状况。SmartPerf Editor还集成了DrawingDoc功能&#xff0c;可录制Render Service绘制指令&#xff0c…

Idea如何本地调试线上测试服务器代码?

线上出现问题&#xff0c;但是没加日志打印拍脑门惋惜为啥不多打一行日志 加日志重新部署&#xff0c;半小时没了&#xff0c;问题还没有找到&#xff0c;头顶的灯却早已照亮了整层楼...... 排查别人线上的 bug&#xff0c;不仅代码还没看懂&#xff0c;还没一行日志&#…

Linux 终端中的目录切换

目录 ⛳️推荐 前言 理解 Linux 中的路径 利用 cd 命令变更目录 故障解决 文件或目录不存在 非目录错误 特殊目录符号 测试你的知识 ⛳️推荐 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击…

AD 21、22 软件安装教程

AD2022安装包链接 链接&#xff1a;https://pan.baidu.com/s/1oMNbXibQ1Zjl0RTLdPDVGw 提取码&#xff1a;xfs4 软件下载 1.以管理员身份运行 2. 3. 4. 5.路径最好改为C盘以外的&#xff0c;如D盘&#xff0c;要新建一个空文件夹 6. 7.下载好以后 8.在Crack文件夹下找…

内插和抽取

抽取&#xff1a; 频域表达式的关系&#xff1a; 1、角频率扩大M倍 2、移动2pi、22pi…&#xff08;n-1&#xff09; 2pi 3、相加 4、幅度变为1/M 内插&#xff1a; 加入低通滤波&#xff0c;减小混叠&#xff0c;但是由于截短&#xff0c;也会造成误差&#xff0c;但是…

投资网站汇总

1、 中信证券(600030)历年财务指标——亿牛网https://eniu.com/gu/sh600030/cwzb 2、 3、 4、