基于Javaweb实现ATM机系统开发实战(十三)交易记录查看实现

news2024/11/25 7:37:20

老规矩,先看前端传递怎样的数据,已经把要展示数据的变量名都改了:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%> 
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>IMUT_BANK ATM WelCome!!</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <script type="text/javascript" src="assets/js/jquery.min.js"></script>

    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="assets/css/loader-style.css">
    <link rel="stylesheet" href="assets/css/bootstrap.css">

    <link href="assets/css/icons-style.css" rel="stylesheet">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
    <!-- Fav and touch icons -->
    <link rel="shortcut icon" href="assets/ico/minus.png">
<!--     <style type="text/css">
		a{
			color: blue;
		}
		a: hover {
			color: Red;
		}
	</style> -->
</head>

<body>
    <!-- Preloader -->
    <div id="preloader">
        <div id="status">&nbsp;</div>
    </div>
    <!-- TOP NAVBAR -->
    <nav role="navigation" class="navbar navbar-static-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
                    <span class="entypo-menu"></span>
                </button>
                <button class="navbar-toggle toggle-menu-mobile toggle-left" type="button">
                    <span class="entypo-list-add"></span>
                </button>




                <div id="logo-mobile" class="visible-xs">
                   <h1>IMUT ATM<span>v2.2.7</span></h1>
                </div>

            </div>


            <!-- Collect the nav links, forms, and other content for toggling -->
            <div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">

                    <li class="dropdown">

                       
                        <ul style="margin: 11px 0 0 9px;" role="menu" class="dropdown-menu dropdown-wrap">
                            
                          
                        </ul>
                    </li>
                    
                    <li><a href="#"><i data-toggle="tooltip" data-placement="bottom" title="Help" style="font-size:20px;" class="icon-help tooltitle"></i></a>
                    </li>

                </ul>
                <div id="nt-title-container" class="navbar-left running-text visible-lg">
                    

                    <ul id="digital-clock" class="digital">
                        <div id="time">
    <script>
        document.getElementById('time').innerHTML = new Date().toLocaleString()
                + ' 星期' + '日一二三四五六'.charAt(new Date().getDay());
        setInterval(
                "document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",
                1000);
    </script>
</div>
                    </ul>
                    <ul id="nt-title">
                        <li><i class="wi-day-lightning"></i>&#160;&#160;北京&#160;
                            <b>24°</b><i class="wi-Celsius"></i>&#160;; 
                        </li>
                        <li><i class="wi-day-lightning"></i>&#160;&#160;上海&#160;
                            <b>28°</b><i class="wi-Celsius"></i>&#160;;
                        </li>

                        <li><i class="wi-day-lightning"></i>&#160;&#160;内蒙古&#160;
                            <b>26°</b><i class="wi-Celsius"></i>&#160;;
                        </li>

                        <li><i class="wi-day-lightning"></i>&#160;&#160;海南&#160;
                            <b>31°</b><i class="wi-Celsius"></i>&#160;; 
                        </li>

                        <li><i class="wi-day-lightning"></i>&#160;&#160;四川&#160;
                            <b>29°</b><i class="wi-Celsius"></i>&#160;; 
                        </li>

                    </ul>
                </div>

                <ul style="margin-right:0;" class="nav navbar-nav navbar-right">
                    <li>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <img alt="" class="admin-pic img-circle" src="http://api.randomuser.me/portraits/thumb/men/10.jpg">欢迎您 <b class="caret"></b>
                        </a>
                        <ul style="margin-top:14px;" role="menu" class="dropdown-setting dropdown-menu">
                            <li>
                                <a href="#">
                                    <span class="entypo-user"></span>&#160;&#160;我的账户</a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="entypo-vcard"></span>&#160;&#160;账户设置</a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="entypo-lifebuoy"></span>&#160;&#160;帮助</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="/changepage/login.jsp">
                                    <span class="entypo-user"></span>&#160;&#160; 退出账户</a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="icon-gear"></span>&#160;&#160;背景颜色</a>
                        <ul role="menu" class="dropdown-setting dropdown-menu">

                            <li class="theme-bg">
                                <div id="button-bg"></div>
                                <div id="button-bg2"></div>
                                <div id="button-bg3"></div>
                                <div id="button-bg5"></div>
                                <div id="button-bg6"></div>
                                <div id="button-bg7"></div>
                                <div id="button-bg8"></div>
                                <div id="button-bg9"></div>
                                <div id="button-bg10"></div>
                                <div id="button-bg11"></div>
                                <div id="button-bg12"></div>
                                <div id="button-bg13"></div>
                            </li>
                        </ul>
                    </li>
                    
                </ul>

            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>

    <!-- /END OF TOP NAVBAR -->

    <!-- SIDE MENU -->
    <div id="skin-select">
        <div id="logo">
            <h1>IMUT ATM<span>v2.2.7</span></h1>
            </h1>
        </div>

        <a id="toggle">
            <span class="entypo-menu"></span>
        </a>
        <div class="dark">
            <form action="#">
                <span>
                    <input type="text" name="search" value="" class="search rounded id_search" placeholder="Search Menu..." autofocus="">
                </span>
            </form>
        </div>

        <div class="search-hover">
            <form id="demo-2">
                <input type="search" placeholder="Search Menu..." class="id_search">
            </form>
        </div>


        <div class="search-hover">
            <form id="demo-2">
                <input type="search" placeholder="Search Menu..." class="id_search">
            </form>
        </div>




        <div class="skin-part">
            <div id="tree-wrap">
                <div class="side-bar">
                    <ul class="topnav menu-left-nest">
                        

                        
                        
                        
                    </ul>

                    <ul class="topnav menu-left-nest">
                        

                        
                        

                       
<li>
                                    <a class="tooltip-tip2 ajax-load" href="/changepage/UserIndex.jsp" title="Profile Page">
                                    <i class="icon-user"></i><span>用户信息</span></a>
                                </li>

                        

                        <li>
                            <a class="tooltip-tip" href="/changepage/UserChangePwd.jsp" title="Extra Pages">
                                <i class="icon-lock"></i>
                                <span>修改密码</span>
                            </a>
                          
                                <li>
                                    <a class="tooltip-tip2 ajax-load" href="/UserSerch" title="Blank Page">
                                    <i class="icon-media-record"></i><span>查询余额</span></a>
                                </li>
                                
                                <li>
                                    <a class="tooltip-tip2 ajax-load" href="/changepage/UserStore.jsp" title="Invoice">
                                    <i class="entypo-newspaper"></i><span>存款</span></a>
                                </li>
                                <li>
                                    <a class="tooltip-tip2 ajax-load" href="/changepage/UserFetch.jsp" title="Pricing Table">
                                    <i class="fontawesome-money"></i><span>取款</span></a>
                                </li>
                                <li>
                                    <a class="tooltip-tip2 ajax-load" href="/changepage/UserTransfer.jsp" title="Time Line">
                                    <i class="entypo-clock"></i><span>转账</span></a>
                                </li>
                                <li>
                                    <a class="tooltip-tip2" href="/serchDetaile" title="404 Error Page">
                                    <i class="icon-preview"></i><span>交易明细</span></a>
                                </li>
                                <li>
                                    <a class="tooltip-tip2" href="/changepage/login.jsp" title="login.jsp">
                                    <i class="icon-mail"></i><span>退卡</span></a>
                                </li>
                                
                         
                     

                        

                    </ul>

                    


                    
                </div>
            </div>
        </div>
    </div>
    <!-- END OF SIDE MENU -->



    <!--  PAPER WRAP -->
    <div class="wrap-fluid">
        <div class="container-fluid paper-wrap bevel tlbr">


            <!--/ TITLE -->

            <!-- BREADCRUMB -->
            <ul id="breadcrumb">
                <li>
                    <span class="entypo-home"></span>
                </li>
                <li><i class="fa fa-lg fa-angle-right"></i>
                </li>
                <li><a href="#" title="Sample page 1">首页</a>
                </li>
                <li><i class="fa fa-lg fa-angle-right"></i>
                </li>
                <li><a href="#" title="Sample page 1">交易明细</a>
                </li>
                
            </ul>

            <!-- END OF BREADCRUMB -->

            <div class="content-wrap">
                <div class="row">


                    <div class="col-sm-12">
                        <!-- BLANK PAGE-->

                        <h2 align="center"><b>IMUT BANK借记卡明细对账单</b></h2>
							<%
								SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
								request.setAttribute("date_time", df.format(new Date()));
							%>
							<h4 align="center">打印日期:${date_time }</h4>
                            <div class="body-nest" id="Blank_Page_Content">
									<div class="form_center">

                                    
                                    
               	</table> <table width="90%" border='2'>
		<tr align="center">
		<br><br>
			<th><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;卡&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></th>
			<th><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></th>
			<th><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;货&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;币&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></th>
			<th><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;交&nbsp;&nbsp;易&nbsp;&nbsp;金&nbsp;&nbsp;额&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></th>
			<th><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账&nbsp;&nbsp;户&nbsp;&nbsp;余&nbsp;&nbsp;额&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></th>
		</tr>
		<c:forEach items="${RunMessage }" var="user">
			<tr>
				<td>${user.icno }</td>
				<td>${user.rm_date }</td>
				<td>${user.rm_currency }</td>
				<td>${user.rm_balance }</td>
				<td>${user.rm_rest }</td>
			</tr>
		</c:forEach>
	</table>                
         
                                </div>
                                
                                
                                
                                
                                
                            </div>
                        </div>
                    </div>
                    <!-- END OF BLANK PAGE -->


                </div>
<%-- ${requestScope.pageBean.pageNum == 1} --%>
<!-- <input hidden="true" name="pageNum" value="1"/> -->
<%-- <c:if test="${pageBean.pageNum==0}">
	${pageContext.request.contextPath}/serchDetaile?pageNum=1
</c:if> --%>
<div align="center">
<br/>
<br/>
<br/>
<!-- ---------------------------------------------------------------------------------------------------------- -->
<%-- 构建分页导航 --%>
            <p style="font-size:20px; color:gray">共有${pageBean.totalRecord}条数据,共${pageBean.totalPage}页,当前为${pageBean.pageNum}页</p>
            <br/>
            <div style="font-size: 17px; color: black">
            <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=1" style="font-color: green">首页</a>
            <%--如果当前页为第一页时,就没有上一页这个超链接显示 --%>
            <c:if test="${pageBean.pageNum ==1}">
                <c:forEach begin="${pageBean.start}" end="${pageBean.end}" step="1" var="i">
                    <c:if test="${pageBean.pageNum == i}">
                        ${i}
                    </c:if>                
                    <c:if test="${pageBean.pageNum != i}">
                        <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${i}">${i}</a>                                        
                    </c:if>                        
                </c:forEach>
                <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${pageBean.pageNum+1}">下一页</a>                    
            </c:if>
            
            <%--如果当前页不是第一页也不是最后一页,则有上一页和下一页这个超链接显示 --%>
            <c:if test="${pageBean.pageNum > 1 && pageBean.pageNum < pageBean.totalPage}">
                <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${pageBean.pageNum-1}">上一页</a>
                <c:forEach begin="${pageBean.start}" end="${pageBean.end}" step="1" var="i">    
                    <c:if test="${pageBean.pageNum == i}">
                        ${i}
                    </c:if>            
                    <c:if test="${pageBean.pageNum != i}">
                        <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${i}">${i}</a>                                        
                    </c:if>                        
                </c:forEach>
                <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${pageBean.pageNum+1}">下一页</a>    
            </c:if>
            
            <%-- 如果当前页是最后一页,则只有上一页这个超链接显示,下一页没有 --%>
            <c:if test="${pageBean.pageNum == pageBean.totalPage}">
                <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${pageBean.pageNum-1}">上一页</a>
                <c:forEach begin="${pageBean.start}" end="${pageBean.end}" step="1" var="i">
                    <c:if test="${pageBean.pageNum == i}">
                        ${i}
                    </c:if>
                    <c:if test="${pageBean.pageNum != i}">
                        <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${i}">${i}</a>                                        
                    </c:if>                
                </c:forEach>
            </c:if>
            <%--尾页 --%>
            <a href="${pageContext.request.contextPath}/serchDetaile?pageNum=${pageBean.totalPage}">尾页</a>
		</div>
                <!-- /END OF CONTENT -->
	<!-- ---------------------------------------------------------------------------------------------------------------- -->
</div>

                <!-- FOOTER -->
                <div class="footer-space"></div>
                <div id="footer">
                <div class="devider-footer-left"></div>
                <div class="time">
                    <p id="spanDate">
                    <p id="clock">
                </div>
                <div class="copyright">本网站基于百度查询开发 <a href="http://www.baidu.com/" title="百度" target="_blank">百度</a> All Rights Reserved</div>
                <div class="devider-footer"></div>

            </div>
                <!-- / END OF FOOTER -->


            </div>
        </div>
        <!--  END OF PAPER WRAP -->

        <!-- RIGHT SLIDER CONTENT -->
        <div class="sb-slidebar sb-right">
            <div class="right-wrapper">
                <div class="row">
                    <h3>
                        <span><i class="entypo-gauge"></i>&nbsp;&nbsp;MAIN WIDGET</span>
                    </h3>
                    <div class="col-sm-12">

                        <div class="widget-knob">
                            <span class="chart" style="position:relative" data-percent="86">
                                <span class="percent"></span>
                            </span>
                        </div>
                        <div class="widget-def">
                            <b>Distance traveled</b>
                            <br>
                            <i>86% to the check point</i>
                        </div>

                        <div class="widget-knob">
                            <span class="speed-car" style="position:relative" data-percent="60">
                                <span class="percent2"></span>
                            </span>
                        </div>
                        <div class="widget-def">
                            <b>The average speed</b>
                            <br>
                            <i>30KM/h avarage speed</i>
                        </div>


                        <div class="widget-knob">
                            <span class="overall" style="position:relative" data-percent="25">
                                <span class="percent3"></span>
                            </span>
                        </div>
                        <div class="widget-def">
                            <b>Overall result</b>
                            <br>
                            <i>30KM/h avarage Result</i>
                        </div>
                    </div>
                </div>
            </div>

            <div style="margin-top:0;" class="right-wrapper">
                <div class="row">
                    <h3>
                        <span><i class="entypo-chat"></i>&nbsp;&nbsp;CHAT</span>
                    </h3>
                    <div class="col-sm-12">
                        <span class="label label-warning label-chat">Online</span>
                        <ul class="chat">
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-circle" src="http://api.randomuser.me/portraits/thumb/men/20.jpg">
                                    </span><b>Dave Junior</b>
                                    <br><i>Last seen : 08:00 PM</i>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-circle" src="http://api.randomuser.me/portraits/thumb/men/21.jpg">
                                    </span><b>Kenneth Lucas</b>
                                    <br><i>Last seen : 07:21 PM</i>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-circle" src="http://api.randomuser.me/portraits/thumb/men/22.jpg">
                                    </span><b>Heidi Perez</b>
                                    <br><i>Last seen : 05:43 PM</i>
                                </a>
                            </li>


                        </ul>

                        <span class="label label-chat">Offline</span>
                        <ul class="chat">
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-offline img-circle" src="http://api.randomuser.me/portraits/thumb/men/23.jpg">
                                    </span><b>Dave Junior</b>
                                    <br><i>Last seen : 08:00 PM</i>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-offline img-circle" src="http://api.randomuser.me/portraits/thumb/women/24.jpg">
                                    </span><b>Kenneth Lucas</b>
                                    <br><i>Last seen : 07:21 PM</i>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-offline img-circle" src="http://api.randomuser.me/portraits/thumb/men/25.jpg">
                                    </span><b>Heidi Perez</b>
                                    <br><i>Last seen : 05:43 PM</i>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-offline img-circle" src="http://api.randomuser.me/portraits/thumb/women/25.jpg">
                                    </span><b>Kenneth Lucas</b>
                                    <br><i>Last seen : 07:21 PM</i>
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <span>
                                        <img alt="" class="img-chat img-offline img-circle" src="http://api.randomuser.me/portraits/thumb/men/26.jpg">
                                    </span><b>Heidi Perez</b>
                                    <br><i>Last seen : 05:43 PM</i>
                                </a>
                            </li>


                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <!-- END OF RIGHT SLIDER CONTENT-->


        <!-- MAIN EFFECT -->
        <script type="text/javascript" src="assets/js/preloader.js"></script>
        <script type="text/javascript" src="assets/js/bootstrap.js"></script>
        <script type="text/javascript" src="assets/js/app.js"></script>
        <script type="text/javascript" src="assets/js/load.js"></script>
        <script type="text/javascript" src="assets/js/main.js"></script>


</div></body>

</html>

创建servlet接受和处理请求:

package com.atm.servlet;

import com.atm.pojo.RunMessage;
import com.atm.pojo.User;
import com.atm.service.UserService;
import com.atm.service.impl.UserServiceImpl;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;


//查询交易记录
@WebServlet("/serchDetaile")
public class SerchDetaileServlet extends HttpServlet {

    private UserService userService=new UserServiceImpl();

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    User user =(User)request.getSession().getAttribute("ua");
        try {
            List<RunMessage> runMessages= userService.findRunMessage(user.getIcno());
            request.getSession().setAttribute("RunMessage",runMessages);
            response.sendRedirect("/changepage/UserDetaile.jsp");
        } catch (Exception e) {
           e.printStackTrace();
        }
    }

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request,response);
    }
}

接口:

    //查询用户交易记录
    public  List<RunMessage> findRunMessage (String icno) throws Exception;

实现类:

    //查询用户交易记录
    public  List<RunMessage> findRunMessage (String icno) throws Exception{
        return userDao.findRunMessage(icno);
    }

数据层:

   //查询用户交易明细
    public List<RunMessage> findRunMessage(String icno) throws Exception {
        Connection connection=DBUtils.getConnection();
        PreparedStatement preparedStatement = connection.prepareStatement("select * from runmessage where icno=?");
        preparedStatement.setString(1,icno);
        ResultSet rs=  preparedStatement.executeQuery();
        List<RunMessage>  list=new ArrayList<>();
        while (rs.next()){
            RunMessage runMessage =new RunMessage();
            runMessage.setId(rs.getInt(1));
            runMessage.setIcno(rs.getString(2));
            runMessage.setRm_date(rs.getString(3));
            runMessage.setRm_currency(rs.getString(4));
            runMessage.setRm_balance(rs.getDouble(5));
            runMessage.setRm_rest(rs.getDouble(6));
            list.add(runMessage);
        }
        DBUtils.release(connection,preparedStatement,null);
        return list;
    }

然后重启系统,测试一下:

然后就发现交易明细正常显示啦~~

 实现代码已上传~

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

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

相关文章

7、网络层(地址管理和路由选择)IP31

网络层&#xff1a;负责地址管理和路由选择 IP协议&#xff0c;路由器 一、IP协议 4位协议版本号&#xff1a;4/6 -ipv4、ipv6 4位报头长度&#xff1a;以4B为单位描述报头大小&#xff0c;IP报头最大60B最小20B 8位服务类型&#xff1a;3位优先权字段弃用&#xff0c;1位保留…

Circular lollipop | 哇咔咔!!!环形棒棒糖图好吃又好玩!~

1写在前面 今天不想废话了&#xff0c;直接看图吧。&#x1f447; 复现代码step by step&#xff0c;自己看吧。&#x1f92a; 2用到的包 rm(list ls())library(tidyverse)library(ggtext)library(patchwork) 3示例数据 df_pw <- read.csv("./passwords.csv",row…

浅析 Io 处理

文件流&#xff1a; 在Java 中&#xff0c;文件流负责操作文件&#xff0c;包括读取和写入&#xff1b; FileInputStream // 文件的字节输入流&#xff1b; FileOutputStream // 文件的字节输出流&#xff1b; FileReader // 文件的字符输入流&#xff1b; FileWriter // 文…

Python基于百度智能云平台股票资讯情感分析

Python基于百度智能云平台股票资讯情感分析 全部代码和数据地址如下&#xff1a;Python基于百度智能云平台股票资讯情感分析 本文章详细内容如下&#xff1a; 文章目录 Python基于百度智能云平台股票资讯情感分析导入相应的包1.引入库2.设置账户秘钥3.导入数据4.数据合并5.百度…

10年测试老鸟总结,性能测试-性能内存瓶颈分析(超详细)

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 性能测试-内存瓶颈…

【2023 年第三届长三角高校数学建模竞赛】B 题 长三角新能源汽车发展与双碳关系研究 18页论文、数据和代码

【2023 年第三届长三角高校数学建模竞赛】B 题 长三角新能源汽车发展与双碳关系研究 18页论文、数据和代码 1 题目 《节能与新能源汽车技术路线图 2.0》提出至 2035 年&#xff0c;新能源汽车市场占比超过 50%&#xff0c;燃料电池汽车保有量达到 100 万辆&#xff0c;节能汽车…

windows11 安装cuda和cudnn深度学习开发环境

首先先要确认自己的显卡最高能支持到cuda的版本&#xff0c;一般是不限制版本号的。 然后在官网地址下载&#xff1a; cuDNN的官网下载地址&#xff1a;cuDNN Archive | NVIDIA Developer CUDA 的下载地址&#xff1a;CUDA Toolkit Archive | NVIDIA Developer 有一点需要注…

Jetpack:DataBinding

目录 一、DataBinding简介 设置 Data Binding 数据绑定表达式 双向绑定 二、例子 MainActivity &#xff1a; Food: activity_main: build.gradle: 运行结果&#xff1a; 三、总结 一、DataBinding简介 DataBinding 是一种用于在安卓应用中实现简洁、高效的数据绑定的…

SpringMVC中的@RequestMapping注解的详细介绍过程~

RequestMapping注解的功能&#xff1a; 从注解名称上我们可以看出&#xff0c;RequestMapping注解的作用就是将请求和处理请求的控制器方法关联起来&#xff0c;建立映射关系&#xff0c;SpringMVC接收到指定的请求&#xff0c;就会来找到在映射关系中对应的控制方法来处理这个…

备战秋招 | 笔试强训7

目录 一、选择题 二、编程题 三、选择题题解 四、编程题题解 一、选择题 1、在&#xff08;&#xff09;情况下适宜采用 inline 定义内联函数 A. 函数体含有循环语句 B. 函数体含有递归语句 C. 函数代码少、频繁调用 D. 函数代码多&#xff0c;不常调用 2、在 C 语言中&a…

数据结构(王道)——队列的应用

对树的层次遍历&#xff1a; 图的广度优先遍历 队列在操作系统的应用

composer的劈坑

现在是php8盛行的天下&#xff0c;安装php8我就不多说了&#xff0c;宝塔、小出面板一大堆&#xff0c;一键安装。真心说方便。&#xff08;好吧&#xff0c;不打广告了&#xff09;&#xff0c;以下是针对 linux 系统 1、安装composer 安装composer之前&#xff0c;需要要先在…

基于SpringBoot+vue的在线BLOG网设计与实现

博主介绍&#xff1a; 大家好&#xff0c;我是一名在Java圈混迹十余年的程序员&#xff0c;精通Java编程语言&#xff0c;同时也熟练掌握微信小程序、Python和Android等技术&#xff0c;能够为大家提供全方位的技术支持和交流。 我擅长在JavaWeb、SSH、SSM、SpringBoot等框架…

CAN转ETHERCAT网关can协议和canfd协议

大家好&#xff0c;今天要跟大家分享一款自主研发的通讯网关&#xff0c;YC-ECT-CAN。这款产品能够将各种CAN总线和ETHERCAT网络连接起来&#xff0c;实现高效的数据传输和通信。那么&#xff0c;这款通讯网关具体有哪些功能和特点呢&#xff1f;接下来&#xff0c;我们就一起来…

【关于C++中----特殊类设计和单例模式】

文章目录 一、设计一个类&#xff0c;不能被拷贝1.1C98的实现方法及其弊端1.2 C11的实现方法 二、设计一个类&#xff0c;只能在堆上创建对象三、设计一个类&#xff0c;只能在栈上创建对象四、设计一个类&#xff0c;不能被继承五、设计一个类&#xff0c;只能创建一个对象(单…

【Java】理解java传参总是采用值传递/按值调用

参考《Java核心技术卷Ⅰ》 按值调用 Java所有的方法传参都是按值调用&#xff0c;方法得到的是所有参数值的一个拷贝。 方法参数的类型 方法参数共有两种类型 基本数据类型&#xff08;数字、布尔值&#xff09;对象引用 一个内部方法不可能基本数据类型&#xff0c;但能通…

Qt6 Qt Quick UI Prototype学习QML第一篇

Qt6 Qt Quick UI原型学习QML第一篇 开始创建项目Qt Quick UI原型简介.qmlproject文件举例Window平台小例子运行效果QML语法 了解语法 开始创建项目 创建一个具有QML入口点的Qt Quick 2 UI项目。要使用它&#xff0c;您需要设置一个QML运行时环境&#xff0c;例如gmlscene。 仅当…

学C的第二十六天【指针的进阶(二)】

相关代码gitee自取&#xff1a;C语言学习日记: 加油努力 (gitee.com) 接上期&#xff1a; 学C的第二十五天【指针的进阶&#xff08;一&#xff09;】_高高的胖子的博客-CSDN博客 6 . 函数指针数组 &#xff08;1&#xff09;. 含义&#xff1a; 函数指针数组 是一个数组&a…

CSDN 周赛 63 期

CSDN 周赛 63 期 参赛体验63期周赛题目题目名称:小玉家的电费题目名称:收件邮箱题目名称:饿龙咆哮-逃离城堡题目名称:寻找宝藏山小结参赛体验 这次是最近难得的四个编程题的比赛了,可惜出了一个骗分题。 然后,今天早上进入考试,还好几次,连进都进不去 嗯,最后是开着…

开源代码分享(7)—考虑电动汽车可调度潜力的充电站两阶段市场投标策略(附matlab代码)

[1]詹祥澎,杨军,韩思宁等.考虑电动汽车可调度潜力的充电站两阶段市场投标策略[J].电力系统自动化,2021,45(10):86-96. 摘要&#xff1a;在电力市场环境下,充电站优化投标策略能降低电力成本&#xff0c;甚至通过售电获取收益。文中考 虑了电动汽车成为柔性储荷资源的潜力&#…