web小项目-曼波生日录(Servlet+JSP+MySQL)

news2024/9/20 18:51:48

效果演示:

当记录条数过多时会自动出现滚轮,数据不会超出紫框

数据库实时记录:

项目源代码以及所用到的资源:

链接: https://pan.baidu.com/s/1w0czmH9xBfetk7CZ7RNbtQ?pwd=6666 提取码: 6666 复制这段内容后打开百度网盘手机App,操作更方便哦

1 项目准备

1.1 数据库的设计

生日表:t_birthday

需要字段:姓名,年龄,生日日期

1.2 网页的设计

首先,要准备好网页要用到的背景图片,在html文件的同一级文件夹下创建 images 文件夹,将所有图片放入其中

开始界面:main.html,需要设计一个查询生日录按钮,再美化一下网页

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>小曼波生日录</title>
  <style>
    div{
      border: 10px solid #c68383;
      margin-left: 150px;
      margin-right: 150px;
      padding: 20px;
    }
    img{
      width: 50%;
    }
    input{
      background-image: url("images/log.jpg");
      width: 300px;
      height: 300px;
      font-size: 50px;
    }
    p{
      font-size: 21px;
    }
    h1{
      background-color: #c68383;
    }
  </style>
</head>

<body>
  <div>
    <img src="images/log.jpg" style="float: left; margin-right: 10px;" />
    <h1>小曼波生日录</h1>
    <p>
      小曼波老是忘记好朋友的生日,摸摸她的脑袋,帮她回忆回忆吧!
    </p>
    <form action="show.html" method="get">
      <input type="submit" value="点击查询">
    </form>
  </div>
</body>

</html>

查询结果展示页面:show.html,需要一个新增按钮,需要在每条数据后面添加删除按钮

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>生日表查询结果</title>
  <style>
    table {
      width: 75%;
      border-collapse: collapse;
      margin: 0 auto;
    }

    th,
    td {
      border: 2px solid black;
      padding: 10px;
      text-align: center;
      background-color: white;
      opacity: 0.8;
    }
    body {
      background-image: url("images/img.png");
      background-size: cover;
      background-repeat: no-repeat;
      margin: 0;
      padding: 0;
    }
    h1{
      width: 50%;
      text-align : center;
      background-color: #e1a8f6;
      opacity: 0.8;
    }
    #content {
      background-color: white;
      border: 10px solid #e1a8f6;
      overflow-y: auto;
      max-height: 320px;
      margin-left: 100px;
      margin-right: 100px;
      opacity: 0.8;
    }
    .add {
      width: 300px;
      text-align : center;
      opacity: 0.8;
    }
  </style>
  <script type="text/javascript">
    function del(name){
      var flag = window.confirm("哦马吉利~曼波~你确认要删除吗");
      if(flag){
        //浏览器发送get请求
      }
    }
  </script>
</head>

<body>

  <div style="display: grid; place-items: center;">
    <h1>想起来了!wow~</h1>
    <button class="add" onclick="window.location.href='add.html'">新增</button>
    <button class="add" onclick="window.location.href='main.html'">返回</button>
    <br>
  </div>
  <div id="content">
    <table>
      <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>生日日期</th>
        <th>操作</th>
      </tr>
      <!-- 在这里展示查询的结果,目前先暂时写一个测试用例 -->
      <tr>
        <td>曼波</td>
        <td>18</td>
        <td>1-1-1</td>
        <td><a href="javascript:void(0)" onclick="del(this)">删除</a></td>
      </tr>
      <!-- 在这里展示查询的结果,目前先暂时写一个测试用例 -->
    </table>
  </div>
</body>

</html>

新增页面:add.html,需要输入人物信息,需要一个 post 请求提交按钮

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>新增生日信息</title>
  <style>
    body {
      height: 800px;
      background-image: url("images/add.png");
      background-repeat: no-repeat;
      background-position: center ;

      display: grid;
      place-items: center;
    }
    div {
      border: 2px solid black;
      background-color: white;
      opacity: 0.7;
      text-align: center;
      font-weight: bold;
      padding: 10px;
    }
    form{
      width: 380px;
    }
    input{
      width: 200px;
    }
  </style>
</head>

<body>
  <div>
    <p>新增生日信息</p>
    <form action="/birth/add/post" method="post">
      <label for="name">姓名:</label><input type="text" id="name" name="name"><br>
      <label for="age">年龄:</label><input type="number" id="age" name="age"><br>
      <label for="birthday">生日:</label><input type="String" id="birthday" name="birthday">
      <br>
      <hr>
      <input type="submit" value="提交">
    </form>
    <hr>
    <form action="show.html" method="get">
      <input type="submit" value="返回">
    </form>
  </div>
</body>

</html>

这是我美化网页用到的所有标签以及参数

标签中声明只需以空格隔开

选择id:#

标题居中展示属性: 
居中方式一:text-align: center;
居中方式二:margin: 0 auto;
居中方式三: <div style="display: grid; place-items: center;">
横竖都居中:
div {
      display: flex;
      align-items: center; 
      justify-content: center; 
    }

不透明度属性:opacity: 0.5;

背景颜色属性:background-color: white;

背景图片属性:background-image: url("img.png");

浮动图片:<img src="images/log.jpg" style="float: left; margin-right: 10px;" />

宽高:width: 300px; 
 height: 300px;    

字体大小:font-size: 16px;
加粗字体:font-weight: bold;

网页添加背景图片,顶满网页:
body {
      background-image: url("images/img.png");
      background-size: cover;
      background-repeat: no-repeat;
      margin: 0;
      padding: 0;
    }
以图片为基准添加背景图片,并居中
body {
      width: 751px;
      height: 1024px;
      background-image: url("images/add.jpg");
      background-repeat: no-repeat;
      background-position: center ;
    }

添加下面的属性后可以让所有内容都填充到 body的中部
display: grid;
place-items: center;

滚轮展示内容:
div {
      overflow-y: auto;
      max-height: 300px;
    }

1.3 部署一个 Tomcat 项目

不会部署的可以参考我之前的文章:同时用到,网页,java程序,数据库的web小应用

将所有要用到的图片,以及 html 页面,全部导入 web 目录中,在导入前先在浏览器上运行 html 页面看看功能是否正常,此时除了提交按钮不能点,其他按钮都是可以交互的

将所有 html 文件的后缀名改为.jsp

将 JDBC 连接数据库要用的 jar 包也导入到 WEB-INF 目录下,并 Add As  Lib... ,使其能够展开才算成功导入

1.4 自己实现一个 JDBC 的工具类,放到 src->Servlet 包下(Servlet自己创建)

import java.sql.*;

public class JDBCutil {

    private JDBCutil(){};

    //建立连接并得到连接
    public static Connection getConnection() throws SQLException, ClassNotFoundException {
        Class.forName("com.mysql.jdbc.Driver");
        return DriverManager.getConnection("jdbc:mysql://localhost:3306/learnbase","root","1234");
    }

    //释放资源
    public static void closeRs(ResultSet rs,PreparedStatement ps,Connection conn){
        if(rs != null) {
            try {
                rs.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
        }
        if(ps == null) {
            try {
                ps.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
        }
        if(conn == null) {
            try {
                conn.close();
            } catch (SQLException throwables) {
                throwables.printStackTrace();
            }
        }
    }

}

项目准备工作做好后,结构大概是这样的(其中.jsp 文件是将 html 文件改成 jsp 文件夹的)

2  JDBC 连接数据库

2.1 show 页面需要的查询数据库所有信息

由于有多个信息,我们可以将所有信息都封装成对象,再将对象装入集合,最后将集合发送到 jsp 中供网页展示

所以,我们首先要创建一个封装类:birthBeen

在 Servlet 包中新建 birthBeen 类

package Servlet;

public class birthBeen {
    private String name;
    private int age;
    private String birthday;

    public birthBeen(String name, int age, String birthday) {
        this.name = name;
        this.age = age;
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
}

这一步完成后,便可以用 JDBC 拿到数据库所有信息,并将所有信息封装后装入集合 dates (可以自己任意命名)

package Servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

@WebServlet("/getBirth")
public class getBirth extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //从数据库中获取所有人的生日
        Connection conn = null;
        PreparedStatement ps = null;
        ResultSet rs = null;

        List<birthBeen> dates = new ArrayList<>();

        try {
            conn = JDBCutil.getConnection();
            ps = conn.prepareStatement("select * from t_birthday");
            rs = ps.executeQuery();

            while (rs.next()){
                String name = rs.getString("name");
                int age = rs.getInt("age");
                String birthday = rs.getString("birthday");
                //封装成对象并加入集合
                dates.add(new birthBeen(name,age,birthday));
            }
        } catch (SQLException | ClassNotFoundException throwables) {
            throwables.printStackTrace();
        } finally {
            JDBCutil.closeRs(rs,ps, conn);
        }

        //将集合放入请求域
        request.setAttribute("dates",dates);
        //转发
        request.getRequestDispatcher("/show.jsp").forward(request,response);//这里写不需要加项目名的路径
    }
}

这样,我们就将封装好的从数据库查询到的所有记录全部装入集合,并将集合发送到 show.jsp 中了

2.2 show 页面需要删除指定姓名的记录

在Servlet目录下创建 delete 类,用于接收 删除的 get 请求,删除完后将请求重定向到查询的Servlet路径

package Servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

@WebServlet("/delete")
public class delete extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String name = request.getParameter("name");
        Connection conn = null;
        PreparedStatement ps = null;
        try {
            conn = JDBCutil.getConnection();
            ps = conn.prepareStatement("delete from t_birthday where name = ?");
            ps.setString(1,name);
            ps.executeUpdate();
        } catch (SQLException | ClassNotFoundException throwables) {
            throwables.printStackTrace();
        }finally {
            JDBCutil.closeRs(null,ps,conn);
        }
        //完成更新,重定向到show界面
        String contextPath = request.getContextPath();
        response.sendRedirect(contextPath+"/getBirth");//重定向无需加项目名
    }
}

2.3 add 页面需要增加记录

在 Servlet 下创建 getPost 类,用于接收浏览器发送的增加记录的 post 请求,在新增完数据后将请求重定向到查询的Servlet路径

package Servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

@WebServlet("/add/post")
public class getPost extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        Connection conn = null;
        PreparedStatement ps = null;
        request.setCharacterEncoding("UTF-8");
        String name = request.getParameter("name");
        int age = Integer.parseInt(request.getParameter("age"));
        String birthday = request.getParameter("birthday");
        try {
            conn = JDBCutil.getConnection();
            ps = conn.prepareStatement("insert into t_birthday values(?,?,?)");
            //给问号放值,下标从1开始
            ps.setString(1,name);
            ps.setInt(2,age);
            ps.setString(3,birthday);
            ps.executeUpdate();
        } catch (SQLException | ClassNotFoundException throwables) {
            throwables.printStackTrace();
        } finally {
            JDBCutil.closeRs(null,ps,conn);
        }
        //完成更新,重定向到show界面
        String contextPath = request.getContextPath();
        response.sendRedirect(contextPath+"/getBirth");//重定向无需加项目名
    }
}

3  改造 JSP, 响应浏览器请求

3.1 show.jsp

需要接收 getBirth 转发过来的集合 dates 并展示到页面

点击删除按钮需要向 /birth/delete 路径发送get请求 并删除记录

<%@page contentType = "text/html;charset=UTF-8" %>
<%@page import="java.util.List,Servlet.birthBeen" %>
<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>生日表查询结果</title>
  <style>
    table {
      width: 75%;
      border-collapse: collapse;
      margin: 0 auto;
    }

    th,
    td {
      border: 2px solid black;
      padding: 10px;
      text-align: center;
      background-color: white;
      opacity: 0.8;
    }
    body {
      background-image: url("images/img.png");
      background-size: cover;
      background-repeat: no-repeat;
      margin: 0;
      padding: 0;
    }
    h1{
      width: 50%;
      text-align : center;
      background-color: #e1a8f6;
      opacity: 0.8;
    }
    #content {
      background-color: white;
      border: 10px solid #e1a8f6;
      overflow-y: auto;
      max-height: 320px;
      margin-left: 100px;
      margin-right: 100px;
      opacity: 0.8;
    }
    .add {
      width: 300px;
      text-align : center;
      opacity: 0.8;
    }
  </style>
  <script type="text/javascript">
    function del(name){
      var flag = window.confirm("哦马吉利~曼波~你确认要删除吗");
      if(flag){
        document.location.href = "/birth/delete?name=" + name;//浏览器发送get请求
      }
    }
  </script>
</head>

<body>

  <div style="display: grid; place-items: center;">
    <h1>想起来了!wow~</h1>
    <button class="add" onclick="window.location.href='add.jsp'">新增</button>
    <button class="add" onclick="window.location.href='main.jsp'">返回</button>
    <br>
  </div>
  <div id="content">
    <table>
      <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>生日日期</th>
        <th>操作</th>
      </tr>
      <!-- 展示查询的结果 -->
      <%--拿到查询结果集--%>
      <%
        List<birthBeen> dates = (List<birthBeen>)request.getAttribute("dates");//注意这里返回的是 Object 类,需要强转为我们要用的类
        //记得要最在上面导入包
        for(birthBeen bb : dates){
          String name = bb.getName();
          int age = bb.getAge();
          String birthday = bb.getBirthday();
      %>
      <tr>
        <td><%=name%></td>
        <td><%=age%></td>
        <td><%=birthday%></td>
<%--        通过传入姓名参数给函数del发送get请求--%>
        <td><a href="javascript:void(0)" onclick="del('<%=name%>')">删除</a></td>
      </tr>
      <%
        }
      %>
      <!-- 展示查询的结果 -->
    </table>
  </div>

</body>

</html>

3.2 main.jsp

main 界面几乎没有大的改动,将按钮跳转的路径改一下即可

<%@page contentType = "text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>小曼波生日录</title>
  <style>
    div{
      border: 10px solid #c68383;
      margin-left: 150px;
      margin-right: 150px;
      padding: 10px;
    }
    img{
      width: 50%;
    }
    input{
      background-image: url("images/log.jpg");
      width: 300px;
      height: 300px;
      font-size: 50px;
    }
    p{
      font-size: 21px;
    }
    h1{
      background-color: #c68383;
    }
  </style>
</head>

<body>
  <div>
    <img src="images/log.jpg" style="float: left; margin-right: 10px;" />
    <h1>小曼波生日录</h1>
    <p>
      小曼波老是忘记好朋友的生日,摸摸她的脑袋,帮她回忆回忆吧!
    </p>
    <%--这里的地址需要带项目名--%>
    <form action="/birth/getBirth" method="get">
      <input type="submit" value="点击查询">
    </form>
  </div>
</body>

</html>

3.3 add.jsp

add 界面也是主要修改请求路径

<%@page contentType = "text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>新增生日信息</title>
  <style>
    body {
      height: 800px;
      background-image: url("images/add.png");
      background-repeat: no-repeat;
      background-position: center ;

      display: grid;
      place-items: center;
    }
    div {
      border: 2px solid black;
      background-color: white;
      opacity: 0.7;
      text-align: center;
      font-weight: bold;
      padding: 10px;
    }
    form{
      width: 380px;
    }
    input{
      width: 200px;
    }
  </style>
</head>

<body>
  <div>
    <p>新增生日信息</p>
<%--    这里要加项目名--%>
    <form action="/birth/add/post" method="post">
      <label for="name">姓名:</label><input type="text" id="name" name="name"><br>
      <label for="age">年龄:</label><input type="number" id="age" name="age"><br>
      <label for="birthday">生日:</label><input type="String" id="birthday" name="birthday">
      <br>
      <hr>
      <input type="submit" value="提交">
    </form>
    <hr>
    <form action="/birth/getBirth" method="get">
      <input type="submit" value="返回">
    </form>
  </div>
</body>

</html>

点击运行按钮,输入网址即可运行

还在等什么,快上手试试吧!

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

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

相关文章

【数据结构】堆,优先级队列

目录 堆堆的性质大根堆的模拟实现接口实现构造方法建堆入堆判满删除判空获取堆顶元素 Java中的PriorityQueue实现的接口构造方法常用方法PriorityQueue注意事项 练习 堆 如果有一个集合K {k0&#xff0c;k1&#xff0c; k2&#xff0c;…&#xff0c;kn-1}&#xff0c;把它的…

Listen(sockfd,backlog)监听函数的第二个参数到底是什么?深度解释

listen队列剖析 int listen(int sockfd,int backlog) backlog : 监听套接字队列 对于一个调用监听的套接字&#xff0c;系统会维护给这个套接字两个队列 1. 未完成连接队列 //当客户端发生三次握手的第一次syn包给服务器的时候&#xff0c;服务器就会再未完成队列中创建…

数据库处理表

首先先创建库&#xff0c;然后创建需要的这三个表 用dese表名查看 然后题目要求对表进行修改 用alter table这个语法来对表进行修改 modify为修改字段 需要修改的字段的属性类型改变为的属性 最后用descStudent查看 第二题需要创建索引 创建索引createindex索引名称 cre…

世界启动Ⅷ--AI视频制作-方案与创新

1.文本/图片生成视频顾名思义&#xff0c;就是输入一段文本描述/上传一张图片即可生成对应的视频。我们常见的Runway、Pika、NeverEnds、Pixverse、svd等都属于此类。比如runway的影视风格Pika的动漫风格NeverEnds的人像模特当然还有一些外延应用&#xff0c;例如最近比较火的阿…

C++客户端Qt开发——Qt窗口(工具栏)

2.工具栏 使用QToolBar表示工具栏对象&#xff0c;一个窗口可以有多个工具栏&#xff0c;也可以没有&#xff0c;工具栏往往也可以手动移动位置 ①设置工具栏 #include "mainwindow.h" #include "ui_mainwindow.h" #include<QToolBar> #include<…

JavaSE--基础语法--继承和多态(第三期)

一.继承 1.1我们为什么需要继承? 首先&#xff0c;Java中使用类对现实世界中实体来进行描述&#xff0c;类经过实例化之后的产物对象&#xff0c;则可以用来表示现实中的实体&#xff0c;但是 现实世界错综复杂&#xff0c;事物之间可能会存在一些关联&#xff0c;那在设计程…

开发AI自动直播工具需要了解的源代码!

随着人工智能技术的快速发展&#xff0c;AI自动直播工具成为了现代直播领域的一大创新&#xff0c;这些工具利用先进的算法和机器学习模型&#xff0c;能够自动化地生成、编辑和播出直播内容&#xff0c;极大地提高了直播的效率和质量。 然而&#xff0c;要开发一款功能强大的…

10 个顶级的PPT生成AI工具盘点,一文把所有好用软件尽收囊中!

你是否希望在工作中制作 PPT 演示文稿&#xff0c;与他人分享你的洞见&#xff0c;或是发表演讲&#xff1f;然而&#xff0c;使用传统的 PPT 制作方式既耗时又费力&#xff0c;步入 AI 时代后&#xff0c;人们寻求更智能、更简便的 PPT 演示文稿制作方法。 目前市场上出现了一…

谷粒商城实战笔记-65-商品服务-API-品牌管理-表单校验自定义校验器

文章目录 1&#xff0c;el-form品牌logo图片自定义显示2&#xff0c;重新导入和注册element-ui组件3&#xff0c;修改brand-add-or-update.vue控件的表单校验规则firstLetter 校验规则sort 校验规则 1&#xff0c;el-form品牌logo图片自定义显示 为了在品牌列表中自定义显示品…

本地部署VMware ESXi服务实现无公网IP远程访问管理服务器

文章目录 前言1. 下载安装ESXi2. 安装Cpolar工具3. 配置ESXi公网地址4. 远程访问ESXi5. 固定ESXi公网地址 前言 在虚拟化技术日益成熟的今天&#xff0c;VMware ESXi以其卓越的性能和稳定性&#xff0c;成为了众多企业构建虚拟化环境的首选。然而&#xff0c;随着远程办公和跨…

Codeforces Round 955 (Div. 2, with prizes from NEAR!) B. Collatz Conjecture(数学)

这道题考察的主要是通过数学对过程进行优化&#xff0c;而不是通过数学而得到结论&#xff08;让人摸不着头脑&#xff09;。 我们不需要把k次直接一次次的加&#xff0c;这样时间复杂度太大&#xff0c;那么我们现在探讨一次要加多少。 我们想要实现加一个数n&#xff0c;满足…

事务、函数和索引

什么是事务&#xff1f; 事务&#xff08;Transaction&#xff09;&#xff0c;就是将一组SQL语句放在同一批次内去执行&#xff0c;如果一个SQL语句出错&#xff0c;则该批次内 的所有SQL都将被取消执行。 特点 一个事务中如果有一个数据库操作失败&#xff0c;那么整个事务…

Linux网络-pingtelnet

作者介绍&#xff1a;简历上没有一个精通的运维工程师。希望大家多多关注我&#xff0c;我尽量把自己会的都分享给大家&#xff0c;下面的思维导图也是预计更新的内容和当前进度(不定时更新)。 Linux服务器作为一个常用的网络服务器&#xff0c;主要的作用就是向客户端提供网络…

vue3前端开发-小兔鲜项目-关于详情页图片渲染的一些技术

vue3前端开发-小兔鲜项目-关于详情页图片渲染的一些技术&#xff01;经过前面几天的努力&#xff0c;我们现在已经可以正常渲染产品详情了。是时候汇总一下&#xff0c;基础的技术知识点了。 1&#xff1a;单页面组件内的抽离&#xff0c;是一种很重要的思想。当我们遇到了&…

leetcode日记(49)旋转链表

其实不难&#xff0c;就是根据kk%len判断需要旋转的位置&#xff0c;再将后半段接在前半段前面就行。 /*** Definition for singly-linked list.* struct ListNode {* int val;* ListNode *next;* ListNode() : val(0), next(nullptr) {}* ListNode(int x) : …

World of Warcraft [CLASSIC] Timebadge

游戏币【每个服务器实时金价不一样&#xff0c;本例子是5000-6000金】 1枚【魔兽世界时光徽章】 30天游戏时间。 5760金币游戏币&#xff0c;策划如何消耗游戏里面的金币总量&#xff0c;以及如何留住那些非人民币玩家呢 30天加上去了 World of Warcraft [CLASSIC] [魔兽世界…

VitePress Index.md 的设置:开发者指南

&#x1f49d;&#x1f49d;&#x1f49d;欢迎莅临我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:「stormsha的主页」…

使用vcpkg

概述 vcpkg 是 Microsoft 和 C 社区维护的免费开放源代码 C/C 包管理器。 它于 2016 年推出&#xff0c;可帮助开发人员将项目迁移到较新版本的 Visual Studio。 vcpkg 已演变成 Windows、macOS 和 Linux 上开发人员使用的跨平台工具。 vcpkg 拥有大量开放源代码库注册表和企业…

Linux-安装VMware-01

一、认识linux Linux 是一个开源的类 Unix 操作系统&#xff0c;由林纳斯托瓦兹&#xff08;Linus Torvalds&#xff09;于1991年首次发布。Linux 是许多计算机硬件的底层操作系统&#xff0c;特别是服务器、嵌入式系统和个人电脑。它支持多种架构&#xff0c;包括 x86、x64、A…

linux编译gcc源码详解

linux编译gcc源码详解 一、下载依赖包二、安装依赖2.1 安装m42.2 编译GMP2.3 编译MPFR2.4. 编译MPC2.5 设置环境变量三、gcc编译3.1 下载gcc3.2 编译gcc源码3.3 环境变量的配置一、下载依赖包 https://gcc.gnu.org/pub/gcc/infrastructure 命令下载依赖库,注意gcc编译时的依…