<u id="8bw6q"><tr id="8bw6q"></tr></u>
  • \n    \n        上傳用戶:\n        上傳文件1:\n        上傳文件2:\n        \n    <\/form>\n  <\/body>\n<\/html><\/pre>

    message.jsp的代碼如下:<\/p>

    <%@ page language=\"java\" pageEncoding=\"UTF-8\"%>\n\n\n  \n    消息提示<\/title>\n  <\/head>\n  \n  <body>
    <h1><a href="http://ipnx.cn/">亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱</a></h1>\n        ${message}\n  <\/body>\n<\/html><\/pre><p>2.2、處理文件上傳的Servlet<\/p><p>UploadHandleServlet的代碼如下:<\/p><pre class='brush:php;toolbar:false;'>package me.gacl.web.controller;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.List;\nimport javax.servlet.ServletException;\nimport javax.servlet.http.HttpServlet;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport org.apache.commons.fileupload.FileItem;\nimport org.apache.commons.fileupload.disk.DiskFileItemFactory;\nimport org.apache.commons.fileupload.servlet.ServletFileUpload;\n\npublic class UploadHandleServlet extends HttpServlet {\n\n    public void doGet(HttpServletRequest request, HttpServletResponse response)\n            throws ServletException, IOException {\n                \/\/得到上傳文件的保存目錄,將上傳的文件存放于WEB-INF目錄下,不允許外界直接訪問,保證上傳文件的安全\n                String savePath = this.getServletContext().getRealPath(\"\/WEB-INF\/upload\");\n                File file = new File(savePath);\n                \/\/判斷上傳文件的保存目錄是否存在\n                if (!file.exists() && !file.isDirectory()) {\n                    System.out.println(savePath+\"目錄不存在,需要創(chuàng)建\");\n                    \/\/創(chuàng)建目錄\n                    file.mkdir();\n                }\n                \/\/消息提示\n                String message = \"\";\n                try{\n                    \/\/使用Apache文件上傳組件處理文件上傳步驟:\n                    \/\/1、創(chuàng)建一個DiskFileItemFactory工廠\n                    DiskFileItemFactory factory = new DiskFileItemFactory();\n                    \/\/2、創(chuàng)建一個文件上傳解析器\n                    ServletFileUpload upload = new ServletFileUpload(factory);\n                     \/\/解決上傳文件名的中文亂碼\n                    upload.setHeaderEncoding(\"UTF-8\"); \n                    \/\/3、判斷提交上來的數(shù)據(jù)是否是上傳表單的數(shù)據(jù)\n                    if(!ServletFileUpload.isMultipartContent(request)){\n                        \/\/按照傳統(tǒng)方式獲取數(shù)據(jù)\n                        return;\n                    }\n                    \/\/4、使用ServletFileUpload解析器解析上傳數(shù)據(jù),解析結果返回的是一個List<FileItem>集合,每一個FileItem對應一個Form表單的輸入項\n                    List<FileItem> list = upload.parseRequest(request);\n                    for(FileItem item : list){\n                        \/\/如果fileitem中封裝的是普通輸入項的數(shù)據(jù)\n                        if(item.isFormField()){\n                            String name = item.getFieldName();\n                            \/\/解決普通輸入項的數(shù)據(jù)的中文亂碼問題\n                            String value = item.getString(\"UTF-8\");\n                            \/\/value = new String(value.getBytes(\"iso8859-1\"),\"UTF-8\");\n                            System.out.println(name + \"=\" + value);\n                        }else{\/\/如果fileitem中封裝的是上傳文件\n                            \/\/得到上傳的文件名稱,\n                            String filename = item.getName();\n                            System.out.println(filename);\n                            if(filename==null || filename.trim().equals(\"\")){\n                                continue;\n                            }\n                            \/\/注意:不同的瀏覽器提交的文件名是不一樣的,有些瀏覽器提交上來的文件名是帶有路徑的,如:  c:\\a\\b\\1.txt,而有些只是單純的文件名,如:1.txt\n                            \/\/處理獲取到的上傳文件的文件名的路徑部分,只保留文件名部分\n                            filename = filename.substring(filename.lastIndexOf(\"\\\\\")+1);\n                            \/\/獲取item中的上傳文件的輸入流\n                            InputStream in = item.getInputStream();\n                            \/\/創(chuàng)建一個文件輸出流\n                            FileOutputStream out = new FileOutputStream(savePath + \"\\\\\" + filename);\n                            \/\/創(chuàng)建一個緩沖區(qū)\n                            byte buffer[] = new byte[1024];\n                            \/\/判斷輸入流中的數(shù)據(jù)是否已經讀完的標識\n                            int len = 0;\n                            \/\/循環(huán)將輸入流讀入到緩沖區(qū)當中,(len=in.read(buffer))>0就表示in里面還有數(shù)據(jù)\n                            while((len=in.read(buffer))>0){\n                                \/\/使用FileOutputStream輸出流將緩沖區(qū)的數(shù)據(jù)寫入到指定的目錄(savePath + \"\\\\\" + filename)當中\(zhòng)n                                out.write(buffer, 0, len);\n                            }\n                            \/\/關閉輸入流\n                            in.close();\n                            \/\/關閉輸出流\n                            out.close();\n                            \/\/刪除處理文件上傳時生成的臨時文件\n                            item.delete();\n                            message = \"文件上傳成功!\";\n                        }\n                    }\n                }catch (Exception e) {\n                    message= \"文件上傳失??!\";\n                    e.printStackTrace();\n                    \n                }\n                request.setAttribute(\"message\",message);\n                request.getRequestDispatcher(\"\/message.jsp\").forward(request, response);\n    }\n\n    public void doPost(HttpServletRequest request, HttpServletResponse response)\n            throws ServletException, IOException {\n\n        doGet(request, response);\n    }\n}<\/pre><p>在Web.xml文件中注冊UploadHandleServlet<\/p><pre class='brush:php;toolbar:false;'><servlet>\n    <servlet-name>UploadHandleServlet<\/servlet-name>\n    <servlet-class>me.gacl.web.controller.UploadHandleServlet<\/servlet-class>\n<\/servlet>\n\n<servlet-mapping>\n    <servlet-name>UploadHandleServlet<\/servlet-name>\n    <url-pattern>\/servlet\/UploadHandleServlet<\/url-pattern>\n<\/servlet-mapping><\/pre><p>文件上傳成功之后,上傳的文件保存在了WEB-INF目錄下的upload目錄,如下圖所示:<\/p>\n<p><img src=\"https:\/\/img.php.cn\/upload\/image\/678\/158\/650\/1573530602598078.jpg\" title=\"1573530602598078.jpg\" alt=\"How to upload files in java\"><\/p>"}	</script>
    	
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <script>var V_PATH="/";window.onerror=function(){ return true; };</script>
    </head>
    
    <body data-commit-time="2023-12-28T14:50:12+08:00" class="editor_body body2_2">
    	<link rel="stylesheet" type="text/css" href="/static/csshw/stylehw.css">
    <header>
        <div   id="wjcelcm34c"   class="head">
            <div   id="wjcelcm34c"   class="haed_left">
                <div   id="wjcelcm34c"   class="haed_logo">
                    <a href="http://ipnx.cn/" title="" class="haed_logo_a">
                        <img src="/static/imghw/logo.png" alt="" class="haed_logoimg">
                    </a>
                </div>
                <div   id="wjcelcm34c"   class="head_nav">
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="Community" class="head_nava head_nava-template1">Community</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/article.html" title="Articles" class="languagechoosea on">Articles</a>
                                <a href="http://ipnx.cn/faq/zt" title="Topics" class="languagechoosea">Topics</a>
                                <a href="http://ipnx.cn/wenda.html" title="Q&A" class="languagechoosea">Q&A</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="Learn" class="head_nava head_nava-template1_1">Learn</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1_1" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/course.html" title="Course" class="languagechoosea on">Course</a>
                                <a href="http://ipnx.cn/dic/" title="Programming Dictionary" class="languagechoosea">Programming Dictionary</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="Tools Library" class="head_nava head_nava-template1_2">Tools Library</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1_2" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/toolset/development-tools" title="Development tools" class="languagechoosea on">Development tools</a>
                                <a href="http://ipnx.cn/toolset/website-source-code" title="Website Source Code" class="languagechoosea">Website Source Code</a>
                                <a href="http://ipnx.cn/toolset/php-libraries" title="PHP Libraries" class="languagechoosea">PHP Libraries</a>
                                <a href="http://ipnx.cn/toolset/js-special-effects" title="JS special effects" class="languagechoosea on">JS special effects</a>
                                <a href="http://ipnx.cn/toolset/website-materials" title="Website Materials" class="languagechoosea on">Website Materials</a>
                                <a href="http://ipnx.cn/toolset/extension-plug-ins" title="Extension plug-ins" class="languagechoosea on">Extension plug-ins</a>
                            </div>
                        </div>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="http://ipnx.cn/ai" title="AI Tools" class="head_nava head_nava-template1_3">AI Tools</a>
                    </div>
    
                    <div   id="wjcelcm34c"   class="head_navs">
                        <a href="javascript:;" title="Leisure" class="head_nava head_nava-template1_3">Leisure</a>
                        <div   class="wjcelcm34c"   id="dropdown-template1_3" style="display: none;">
                            <div   id="wjcelcm34c"   class="languagechoose">
                                <a href="http://ipnx.cn/game" title="Game Download" class="languagechoosea on">Game Download</a>
                                <a href="http://ipnx.cn/mobile-game-tutorial/" title="Game Tutorials" class="languagechoosea">Game Tutorials</a>
    
                            </div>
                        </div>
                    </div>
                </div>
            </div>
                        <div   id="wjcelcm34c"   class="head_search">
                    <input id="key_words"  onkeydown="if (event.keyCode == 13) searchs('en')" class="search-input" type="text" autocomplete="off" name="keywords" required="required" placeholder="Block,address,transaction,news" value="">
                    <a href="javascript:;" title="search"  onclick="searchs('en')"><img src="/static/imghw/find.png" alt="search"></a>
                </div>
                    <div   id="wjcelcm34c"   class="head_right">
                <div   id="wjcelcm34c"   class="haed_language">
                    <a href="javascript:;" class="layui-btn haed_language_btn">English<i class="layui-icon layui-icon-triangle-d"></i></a>
                    <div   class="wjcelcm34c"   id="dropdown-template" style="display: none;">
                        <div   id="wjcelcm34c"   class="languagechoose">
                                                    <a href="javascript:setlang('zh-cn');" title="簡體中文" class="languagechoosea">簡體中文</a>
                                                    <a href="javascript:;" title="English" class="languagechoosea">English</a>
                                                    <a href="javascript:setlang('zh-tw');" title="繁體中文" class="languagechoosea">繁體中文</a>
                                                    <a href="javascript:setlang('ja');" title="日本語" class="languagechoosea">日本語</a>
                                                    <a href="javascript:setlang('ko');" title="???" class="languagechoosea">???</a>
                                                    <a href="javascript:setlang('ms');" title="Melayu" class="languagechoosea">Melayu</a>
                                                    <a href="javascript:setlang('fr');" title="Fran?ais" class="languagechoosea">Fran?ais</a>
                                                    <a href="javascript:setlang('de');" title="Deutsch" class="languagechoosea">Deutsch</a>
                                                </div>
                    </div>
                </div>
                <span id="wjcelcm34c"    class="head_right_line"></span>
                                <div style="display: block;" id="login" class="haed_login ">
                        <a href="javascript:;"  title="Login" class="haed_logina ">Login</a>
                    </div>
                    <div style="display: block;" id="reg" class="head_signup login">
                        <a href="javascript:;"  title="singup" class="head_signupa">singup</a>
                    </div>
                
            </div>
        </div>
    </header>
    
    	
    	<main>
    		<div   id="wjcelcm34c"   class="Article_Details_main">
    			<div   id="wjcelcm34c"   class="Article_Details_main1">
    							<div   id="wjcelcm34c"   class="Article_Details_main1M">
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainL1">
    						<a href="http://ipnx.cn/" title="Home"
    							class="phpgenera_Details_mainL1a">Home</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    												<a href="http://ipnx.cn/java/"
    							class="phpgenera_Details_mainL1a">Java</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    												<a href="http://ipnx.cn/java/base/"
    							class="phpgenera_Details_mainL1a">JavaBase</a>
    						<img src="/static/imghw/top_right.png" alt="" />
    						<span>How to upload files in java</span>
    					</div>
    					
    					<div   id="wjcelcm34c"   class="Articlelist_txts">
    						<div   id="wjcelcm34c"   class="Articlelist_txts_info">
    							<h1 class="Articlelist_txts_title">How to upload files in java</h1>
    							<div   id="wjcelcm34c"   class="Articlelist_txts_info_head">
    								<div   id="wjcelcm34c"   class="author_info">
    									<a href="http://ipnx.cn/member/490068.html"  class="author_avatar">
    									<img class="lazy"  data-src="https://img.php.cn/upload/avatar/000/490/068/5d2bd4ed95560268.jpeg" src="/static/imghw/default1.png" alt="angryTom">
    									</a>
    									<div   id="wjcelcm34c"   class="author_detail">
    																			<a href="http://ipnx.cn/member/490068.html" class="author_name">angryTom</a>
                                    										</div>
    								</div>
                    			</div>
    							<span id="wjcelcm34c"    class="Articlelist_txts_time">Nov 12, 2019 am	 11:57 AM</span>
    															<div   id="wjcelcm34c"   class="Articlelist_txts_infos">
    																			<span id="wjcelcm34c"    class="Articlelist_txts_infoss on">java</span>
    																			<span id="wjcelcm34c"    class="Articlelist_txts_infoss ">upload files</span>
    																	</div>
    														
    						</div>
    					</div>
    					<hr />
    					<div   id="wjcelcm34c"   class="article_main php-article">
    						<div   id="wjcelcm34c"   class="article-list-left detail-content-wrap content">
    						<ins class="adsbygoogle"
    							style="display:block; text-align:center;"
    							data-ad-layout="in-article"
    							data-ad-format="fluid"
    							data-ad-client="ca-pub-5902227090019525"
    							data-ad-slot="3461856641">
    						</ins>
    						
    
    					<p>在Web應用系統(tǒng)開發(fā)中,文件上傳和下載功能是非常常用的功能,今天來講一下JavaWeb中的文件上傳功能的實現(xiàn)。</p>
    <p style="text-align: center;"><strong><img  src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/article/000/000/040/5dca2bf78a2aa477.jpg" class="lazy" alt="How to upload files in java" ></strong></p>
    <p><strong>java怎么上傳文件</strong></p>
    <p>對于文件上傳,瀏覽器在上傳的過程中是將文件以流的形式提交到服務器端的,如果直接使用Servlet獲取上傳文件的輸入流然后再解析里面的請求參數(shù)是比較麻煩,所以一般選擇采用apache的開源工具common-fileupload這個文件上傳組件。這個common-fileupload上傳組件的jar包可以去apache官網(wǎng)上面下載,也可以在struts的lib文件夾下面找到,struts上傳的功能就是基于這個實現(xiàn)的。common-fileupload是依賴于common-io這個包的,所以還需要下載這個包。(推薦教程:<a href="http://ipnx.cn/java-article.html" target="_blank">java教程</a>)</p>
    <p><strong>一、開發(fā)環(huán)境搭建</strong></p>
    <p>創(chuàng)建一個FileUploadAndDownLoad項目,加入Apache的commons-fileupload文件上傳組件的相關Jar包,如下圖所示:</p>
    <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/722/419/214/1573530528206424.jpg" class="lazy" title="1573530528206424.jpg" alt="How to upload files in java"></p>
    <p><strong>二、實現(xiàn)文件上傳</strong></p>
    <p>2.1、文件上傳頁面和消息提示頁面</p>
    <p>upload.jsp頁面的代碼如下:</p><pre class='brush:php;toolbar:false;'><%@ page language="java" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML>
    <html>
      <head>
        <title>文件上傳</title>
      </head>
      
      <body>
        <form action="${pageContext.request.contextPath}/servlet/UploadHandleServlet" enctype="multipart/form-data" method="post">
            上傳用戶:<input type="text" name="username"><br/>
            上傳文件1:<input type="file" name="file1"><br/>
            上傳文件2:<input type="file" name="file2"><br/>
            <input type="submit" value="提交">
        </form>
      </body>
    </html></pre><p>message.jsp的代碼如下:</p><pre class='brush:php;toolbar:false;'><%@ page language="java" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML>
    <html>
      <head>
        <title>消息提示</title>
      </head>
      
      <body>
            ${message}
      </body>
    </html></pre><p>2.2、處理文件上傳的Servlet</p><p>UploadHandleServlet的代碼如下:</p><pre class='brush:php;toolbar:false;'>package me.gacl.web.controller;
    
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.List;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.commons.fileupload.FileItem;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    
    public class UploadHandleServlet extends HttpServlet {
    
        public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
                    //得到上傳文件的保存目錄,將上傳的文件存放于WEB-INF目錄下,不允許外界直接訪問,保證上傳文件的安全
                    String savePath = this.getServletContext().getRealPath("/WEB-INF/upload");
                    File file = new File(savePath);
                    //判斷上傳文件的保存目錄是否存在
                    if (!file.exists() && !file.isDirectory()) {
                        System.out.println(savePath+"目錄不存在,需要創(chuàng)建");
                        //創(chuàng)建目錄
                        file.mkdir();
                    }
                    //消息提示
                    String message = "";
                    try{
                        //使用Apache文件上傳組件處理文件上傳步驟:
                        //1、創(chuàng)建一個DiskFileItemFactory工廠
                        DiskFileItemFactory factory = new DiskFileItemFactory();
                        //2、創(chuàng)建一個文件上傳解析器
                        ServletFileUpload upload = new ServletFileUpload(factory);
                         //解決上傳文件名的中文亂碼
                        upload.setHeaderEncoding("UTF-8"); 
                        //3、判斷提交上來的數(shù)據(jù)是否是上傳表單的數(shù)據(jù)
                        if(!ServletFileUpload.isMultipartContent(request)){
                            //按照傳統(tǒng)方式獲取數(shù)據(jù)
                            return;
                        }
                        //4、使用ServletFileUpload解析器解析上傳數(shù)據(jù),解析結果返回的是一個List<FileItem>集合,每一個FileItem對應一個Form表單的輸入項
                        List<FileItem> list = upload.parseRequest(request);
                        for(FileItem item : list){
                            //如果fileitem中封裝的是普通輸入項的數(shù)據(jù)
                            if(item.isFormField()){
                                String name = item.getFieldName();
                                //解決普通輸入項的數(shù)據(jù)的中文亂碼問題
                                String value = item.getString("UTF-8");
                                //value = new String(value.getBytes("iso8859-1"),"UTF-8");
                                System.out.println(name + "=" + value);
                            }else{//如果fileitem中封裝的是上傳文件
                                //得到上傳的文件名稱,
                                String filename = item.getName();
                                System.out.println(filename);
                                if(filename==null || filename.trim().equals("")){
                                    continue;
                                }
                                //注意:不同的瀏覽器提交的文件名是不一樣的,有些瀏覽器提交上來的文件名是帶有路徑的,如:  c:\a\b\1.txt,而有些只是單純的文件名,如:1.txt
                                //處理獲取到的上傳文件的文件名的路徑部分,只保留文件名部分
                                filename = filename.substring(filename.lastIndexOf("\\")+1);
                                //獲取item中的上傳文件的輸入流
                                InputStream in = item.getInputStream();
                                //創(chuàng)建一個文件輸出流
                                FileOutputStream out = new FileOutputStream(savePath + "\\" + filename);
                                //創(chuàng)建一個緩沖區(qū)
                                byte buffer[] = new byte[1024];
                                //判斷輸入流中的數(shù)據(jù)是否已經讀完的標識
                                int len = 0;
                                //循環(huán)將輸入流讀入到緩沖區(qū)當中,(len=in.read(buffer))>0就表示in里面還有數(shù)據(jù)
                                while((len=in.read(buffer))>0){
                                    //使用FileOutputStream輸出流將緩沖區(qū)的數(shù)據(jù)寫入到指定的目錄(savePath + "\\" + filename)當中
                                    out.write(buffer, 0, len);
                                }
                                //關閉輸入流
                                in.close();
                                //關閉輸出流
                                out.close();
                                //刪除處理文件上傳時生成的臨時文件
                                item.delete();
                                message = "文件上傳成功!";
                            }
                        }
                    }catch (Exception e) {
                        message= "文件上傳失??!";
                        e.printStackTrace();
                        
                    }
                    request.setAttribute("message",message);
                    request.getRequestDispatcher("/message.jsp").forward(request, response);
        }
    
        public void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
    
            doGet(request, response);
        }
    }</pre><p>在Web.xml文件中注冊UploadHandleServlet</p><pre class='brush:php;toolbar:false;'><servlet>
        <servlet-name>UploadHandleServlet</servlet-name>
        <servlet-class>me.gacl.web.controller.UploadHandleServlet</servlet-class>
    </servlet>
    
    <servlet-mapping>
        <servlet-name>UploadHandleServlet</servlet-name>
        <url-pattern>/servlet/UploadHandleServlet</url-pattern>
    </servlet-mapping></pre><p>文件上傳成功之后,上傳的文件保存在了WEB-INF目錄下的upload目錄,如下圖所示:</p>
    <p><img src="/static/imghw/default1.png" data-src="https://img.php.cn/upload/image/678/158/650/1573530602598078.jpg" class="lazy" title="1573530602598078.jpg" alt="How to upload files in java"></p><p>The above is the detailed content of How to upload files in java. For more information, please follow other related articles on the PHP Chinese website!</p>
    
    
    						</div>
    					</div>
    					<div   id="wjcelcm34c"   class="wzconShengming_sp">
    						<div   id="wjcelcm34c"   class="bzsmdiv_sp">Statement of this Website</div>
    						<div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn</div>
    					</div>
    				</div>
    
    				<ins class="adsbygoogle"
         style="display:block"
         data-ad-format="autorelaxed"
         data-ad-client="ca-pub-5902227090019525"
         data-ad-slot="2507867629"></ins>
    
    
    
    				<div   id="wjcelcm34c"   class="AI_ToolDetails_main4sR">
    
    
    				<ins class="adsbygoogle"
            style="display:block"
            data-ad-client="ca-pub-5902227090019525"
            data-ad-slot="3653428331"
            data-ad-format="auto"
            data-full-width-responsive="true"></ins>
        
    
    
    					<!-- <div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
    						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									src="/static/imghw/hotarticle2.png" alt="" />
    								<h2>Hot Article</h2>
    							</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796832397.html" title="Grass Wonder Build Guide | Uma Musume Pretty Derby" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide | Uma Musume Pretty Derby</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796833110.html" title="Roblox: 99 Nights In The Forest - All Badges And How To Unlock Them" class="phpgenera_Details_mainR4_bottom_title">Roblox: 99 Nights In The Forest - All Badges And How To Unlock Them</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 weeks ago</span>
    										<span>By DDD</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796831605.html" title="Uma Musume Pretty Derby Banner Schedule (July 2025)" class="phpgenera_Details_mainR4_bottom_title">Uma Musume Pretty Derby Banner Schedule (July 2025)</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796829586.html" title="Today's Connections hint and answer 3rd July for 753" class="phpgenera_Details_mainR4_bottom_title">Today's Connections hint and answer 3rd July for 753</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>1 months ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796831905.html" title="Windows Security is blank or not showing options" class="phpgenera_Details_mainR4_bottom_title">Windows Security is blank or not showing options</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By 下次還敢</span>
    									</div>
    								</div>
    														</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    								<a href="http://ipnx.cn/article.html">Show More</a>
    							</div>
    						</div>
    					</div> -->
    
    
    											<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    								<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/hottools2.png" alt="" />
    									<h2>Hot AI Tools</h2>
    								</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_bottom">
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title">
    													<h3>Undress AI Tool</h3>
    												</a>
    												<p>Undress images for free</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title">
    													<h3>Undresser.AI Undress</h3>
    												</a>
    												<p>AI-powered app for creating realistic nude photos</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title">
    													<h3>AI Clothes Remover</h3>
    												</a>
    												<p>Online AI tool for removing clothes from photos.</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title">
    													<h3>Clothoff.io</h3>
    												</a>
    												<p>AI clothes remover</p>
    											</div>
    										</div>
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title">
    													<h3>Video Face Swap</h3>
    												</a>
    												<p>Swap faces in any video effortlessly with our completely free AI face swap tool!</p>
    											</div>
    										</div>
    																</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    									<a href="http://ipnx.cn/ai">Show More</a>
    								</div>
    							</div>
    						</div>
    					
    
    
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
    						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									src="/static/imghw/hotarticle2.png" alt="" />
    								<h2>Hot Article</h2>
    							</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796832397.html" title="Grass Wonder Build Guide | Uma Musume Pretty Derby" class="phpgenera_Details_mainR4_bottom_title">Grass Wonder Build Guide | Uma Musume Pretty Derby</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796833110.html" title="Roblox: 99 Nights In The Forest - All Badges And How To Unlock Them" class="phpgenera_Details_mainR4_bottom_title">Roblox: 99 Nights In The Forest - All Badges And How To Unlock Them</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>3 weeks ago</span>
    										<span>By DDD</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796831605.html" title="Uma Musume Pretty Derby Banner Schedule (July 2025)" class="phpgenera_Details_mainR4_bottom_title">Uma Musume Pretty Derby Banner Schedule (July 2025)</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796829586.html" title="Today's Connections hint and answer 3rd July for 753" class="phpgenera_Details_mainR4_bottom_title">Today's Connections hint and answer 3rd July for 753</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>1 months ago</span>
    										<span>By Jack chen</span>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/1796831905.html" title="Windows Security is blank or not showing options" class="phpgenera_Details_mainR4_bottom_title">Windows Security is blank or not showing options</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<span>4 weeks ago</span>
    										<span>By 下次還敢</span>
    									</div>
    								</div>
    														</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    								<a href="http://ipnx.cn/article.html">Show More</a>
    							</div>
    						</div>
    					</div>
    
    
    											<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    								<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/hottools2.png" alt="" />
    									<h2>Hot Tools</h2>
    								</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_bottom">
    																		<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Notepad++7.3.1" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/toolset/development-tools/92" title="Notepad++7.3.1" class="phpmain_tab2_mids_title">
    													<h3>Notepad++7.3.1</h3>
    												</a>
    												<p>Easy-to-use and free code editor</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/toolset/development-tools/93" title="SublimeText3 Chinese version" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Chinese version" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/toolset/development-tools/93" title="SublimeText3 Chinese version" class="phpmain_tab2_mids_title">
    													<h3>SublimeText3 Chinese version</h3>
    												</a>
    												<p>Chinese version, very easy to use</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/toolset/development-tools/121" title="Zend Studio 13.0.1" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Zend Studio 13.0.1" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/toolset/development-tools/121" title="Zend Studio 13.0.1" class="phpmain_tab2_mids_title">
    													<h3>Zend Studio 13.0.1</h3>
    												</a>
    												<p>Powerful PHP integrated development environment</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="Dreamweaver CS6" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title">
    													<h3>Dreamweaver CS6</h3>
    												</a>
    												<p>Visual web development tools</p>
    											</div>
    										</div>
    																			<div   id="wjcelcm34c"   class="phpmain_tab2_mids_top">
    											<a href="http://ipnx.cn/toolset/development-tools/500" title="SublimeText3 Mac version" class="phpmain_tab2_mids_top_img">
    												<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    													class="lazy"  data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac version" />
    											</a>
    											<div   id="wjcelcm34c"   class="phpmain_tab2_mids_info">
    												<a href="http://ipnx.cn/toolset/development-tools/500" title="SublimeText3 Mac version" class="phpmain_tab2_mids_title">
    													<h3>SublimeText3 Mac version</h3>
    												</a>
    												<p>God-level code editing software (SublimeText3)</p>
    											</div>
    										</div>
    																	</div>
    								<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    									<a href="http://ipnx.cn/ai">Show More</a>
    								</div>
    							</div>
    						</div>
    										
    
    					
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4">
    						<div   id="wjcelcm34c"   class="phpmain1_4R_readrank">
    							<div   id="wjcelcm34c"   class="phpmain1_4R_readrank_top">
    								<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    									src="/static/imghw/hotarticle2.png" alt="" />
    								<h2>Hot Topics</h2>
    							</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottom">
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/laravel-tutori" title="Laravel Tutorial" class="phpgenera_Details_mainR4_bottom_title">Laravel Tutorial</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1597</span>
    										</div>
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>29</span>
    										</div>
    									</div>
    								</div>
    															<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms">
    									<a href="http://ipnx.cn/faq/php-tutorial" title="PHP Tutorial" class="phpgenera_Details_mainR4_bottom_title">PHP Tutorial</a>
    									<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_info">
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/eyess.png" alt="" />
    											<span>1488</span>
    										</div>
    										<div   id="wjcelcm34c"   class="phpgenera_Details_mainR4_bottoms_infos">
    											<img src="/static/imghw/tiezi.png" alt="" />
    											<span>72</span>
    										</div>
    									</div>
    								</div>
    														</div>
    							<div   id="wjcelcm34c"   class="phpgenera_Details_mainR3_more">
    								<a href="http://ipnx.cn/faq/zt">Show More</a>
    							</div>
    						</div>
    					</div>
    				</div>
    			</div>
    							<div   id="wjcelcm34c"   class="Article_Details_main2">
    					<div   id="wjcelcm34c"   class="phpgenera_Details_mainL4">
    						<div   id="wjcelcm34c"   class="phpmain1_2_top">
    							<a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img
    									src="/static/imghw/index2_title2.png" alt="" /></a>
    						</div>
    						<div   id="wjcelcm34c"   class="phpgenera_Details_mainL4_info">
    
    													<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796853961.html" title="VSCode settings.json location" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175399996276197.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="VSCode settings.json location" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796853961.html" title="VSCode settings.json location" class="phphistorical_Version2_mids_title">VSCode settings.json location</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 01, 2025 am	 06:12 AM</span>
    								<p class="Articlelist_txts_p">The settings.json file is located in the user-level or workspace-level path and is used to customize VSCode settings. 1. User-level path: Windows is C:\Users\\AppData\Roaming\Code\User\settings.json, macOS is /Users//Library/ApplicationSupport/Code/User/settings.json, Linux is /home//.config/Code/User/settings.json; 2. Workspace-level path: .vscode/settings in the project root directory</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796852916.html" title="python itertools combinations example" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175392679036414.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="python itertools combinations example" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796852916.html" title="python itertools combinations example" class="phphistorical_Version2_mids_title">python itertools combinations example</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 31, 2025 am	 09:53 AM</span>
    								<p class="Articlelist_txts_p">itertools.combinations is used to generate all non-repetitive combinations (order irrelevant) that selects a specified number of elements from the iterable object. Its usage includes: 1. Select 2 element combinations from the list, such as ('A','B'), ('A','C'), etc., to avoid repeated order; 2. Take 3 character combinations of strings, such as "abc" and "abd", which are suitable for subsequence generation; 3. Find the combinations where the sum of two numbers is equal to the target value, such as 1 5=6, simplify the double loop logic; the difference between combinations and arrangement lies in whether the order is important, combinations regard AB and BA as the same, while permutations are regarded as different;</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796855228.html" title="How to handle transactions in Java with JDBC?" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175410894189634.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How to handle transactions in Java with JDBC?" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796855228.html" title="How to handle transactions in Java with JDBC?" class="phphistorical_Version2_mids_title">How to handle transactions in Java with JDBC?</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 02, 2025 pm	 12:29 PM</span>
    								<p class="Articlelist_txts_p">To correctly handle JDBC transactions, you must first turn off the automatic commit mode, then perform multiple operations, and finally commit or rollback according to the results; 1. Call conn.setAutoCommit(false) to start the transaction; 2. Execute multiple SQL operations, such as INSERT and UPDATE; 3. Call conn.commit() if all operations are successful, and call conn.rollback() if an exception occurs to ensure data consistency; at the same time, try-with-resources should be used to manage resources, properly handle exceptions and close connections to avoid connection leakage; in addition, it is recommended to use connection pools and set save points to achieve partial rollback, and keep transactions as short as possible to improve performance.</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796853906.html" title="Mastering Dependency Injection in Java with Spring and Guice" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175399880187055.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Mastering Dependency Injection in Java with Spring and Guice" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796853906.html" title="Mastering Dependency Injection in Java with Spring and Guice" class="phphistorical_Version2_mids_title">Mastering Dependency Injection in Java with Spring and Guice</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 01, 2025 am	 05:53 AM</span>
    								<p class="Articlelist_txts_p">DependencyInjection(DI)isadesignpatternwhereobjectsreceivedependenciesexternally,promotingloosecouplingandeasiertestingthroughconstructor,setter,orfieldinjection.2.SpringFrameworkusesannotationslike@Component,@Service,and@AutowiredwithJava-basedconfi</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796852888.html" title="python pytest fixture example" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175392573149545.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="python pytest fixture example" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796852888.html" title="python pytest fixture example" class="phphistorical_Version2_mids_title">python pytest fixture example</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 31, 2025 am	 09:35 AM</span>
    								<p class="Articlelist_txts_p">fixture is a function used to provide preset environment or data for tests. 1. Use the @pytest.fixture decorator to define fixture; 2. Inject fixture in parameter form in the test function; 3. Execute setup before yield, and then teardown; 4. Control scope through scope parameters, such as function, module, etc.; 5. Place the shared fixture in conftest.py to achieve cross-file sharing, thereby improving the maintainability and reusability of tests.</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796852852.html" title="Troubleshooting Common Java `OutOfMemoryError` Scenarios" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175392402199338.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Troubleshooting Common Java `OutOfMemoryError` Scenarios" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796852852.html" title="Troubleshooting Common Java `OutOfMemoryError` Scenarios" class="phphistorical_Version2_mids_title">Troubleshooting Common Java `OutOfMemoryError` Scenarios</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 31, 2025 am	 09:07 AM</span>
    								<p class="Articlelist_txts_p">java.lang.OutOfMemoryError: Javaheapspace indicates insufficient heap memory, and needs to check the processing of large objects, memory leaks and heap settings, and locate and optimize the code through the heap dump analysis tool; 2. Metaspace errors are common in dynamic class generation or hot deployment due to excessive class metadata, and MaxMetaspaceSize should be restricted and class loading should be optimized; 3. Unabletocreatenewnativethread due to exhausting system thread resources, it is necessary to check the number of threads, use thread pools, and adjust the stack size; 4. GCoverheadlimitexceeded means that GC is frequent but has less recycling, and GC logs should be analyzed and optimized.</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796854595.html" title="How to work with Calendar in Java?" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/431/639/175407348140593.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="How to work with Calendar in Java?" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796854595.html" title="How to work with Calendar in Java?" class="phphistorical_Version2_mids_title">How to work with Calendar in Java?</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Aug 02, 2025 am	 02:38 AM</span>
    								<p class="Articlelist_txts_p">Use classes in the java.time package to replace the old Date and Calendar classes; 2. Get the current date and time through LocalDate, LocalDateTime and LocalTime; 3. Create a specific date and time using the of() method; 4. Use the plus/minus method to immutably increase and decrease the time; 5. Use ZonedDateTime and ZoneId to process the time zone; 6. Format and parse date strings through DateTimeFormatter; 7. Use Instant to be compatible with the old date types when necessary; date processing in modern Java should give priority to using java.timeAPI, which provides clear, immutable and linear</p>
    							</div>
    														<div   id="wjcelcm34c"   class="phphistorical_Version2_mids">
    								<a href="http://ipnx.cn/faq/1796852744.html" title="Advanced Spring Data JPA for Java Developers" class="phphistorical_Version2_mids_img">
    									<img onerror="this.onerror=''; this.src='/static/imghw/default1.png'"
    										src="/static/imghw/default1.png" class="lazy"  data-src="https://img.php.cn/upload/article/001/253/068/175391965424463.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Advanced Spring Data JPA for Java Developers" />
    								</a>
    								<a href="http://ipnx.cn/faq/1796852744.html" title="Advanced Spring Data JPA for Java Developers" class="phphistorical_Version2_mids_title">Advanced Spring Data JPA for Java Developers</a>
    								<span id="wjcelcm34c"    class="Articlelist_txts_time">Jul 31, 2025 am	 07:54 AM</span>
    								<p class="Articlelist_txts_p">The core of mastering Advanced SpringDataJPA is to select the appropriate data access method based on the scenario and ensure performance and maintainability. 1. In custom query, @Query supports JPQL and native SQL, which is suitable for complex association and aggregation operations. It is recommended to use DTO or interface projection to perform type-safe mapping to avoid maintenance problems caused by using Object[]. 2. The paging operation needs to be implemented in combination with Pageable, but beware of N 1 query problems. You can preload the associated data through JOINFETCH or use projection to reduce entity loading, thereby improving performance. 3. For multi-condition dynamic queries, JpaSpecifica should be used</p>
    							</div>
    													</div>
    
    													<a href="http://ipnx.cn/java/" class="phpgenera_Details_mainL4_botton">
    								<span>See all articles</span>
    								<img src="/static/imghw/down_right.png" alt="" />
    							</a>
    											</div>
    				</div>
    					</div>
    	</main>
    	<footer>
        <div   id="wjcelcm34c"   class="footer">
            <div   id="wjcelcm34c"   class="footertop">
                <img src="/static/imghw/logo.png" alt="">
                <p>Public welfare online PHP training,Help PHP learners grow quickly!</p>
            </div>
            <div   id="wjcelcm34c"   class="footermid">
                <a href="http://ipnx.cn/about/us.html">About us</a>
                <a href="http://ipnx.cn/about/disclaimer.html">Disclaimer</a>
                <a href="http://ipnx.cn/update/article_0_1.html">Sitemap</a>
            </div>
            <div   id="wjcelcm34c"   class="footerbottom">
                <p>
                    ? php.cn All rights reserved
                </p>
            </div>
        </div>
    </footer>
    
    <input type="hidden" id="verifycode" value="/captcha.html">
    
    
    
    
    		<link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' />
    	
    	
    	
    	
    	
    
    	
    	
    
    
    
    
    
    
    <footer>
    <div class="friendship-link">
    <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p>
    <a href="http://ipnx.cn/" title="亚洲国产日韩欧美一区二区三区">亚洲国产日韩欧美一区二区三区</a>
    
    <div class="friend-links">
    
    
    </div>
    </div>
    
    </footer>
    
    
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
    </body><div id="k5mzh" class="pl_css_ganrao" style="display: none;"><dd id="k5mzh"></dd><cite id="k5mzh"></cite><ul id="k5mzh"></ul><tr id="k5mzh"></tr><bdo id="k5mzh"></bdo><li id="k5mzh"></li><noframes id="k5mzh"></noframes><xmp id="k5mzh"></xmp><dfn id="k5mzh"></dfn><address id="k5mzh"><acronym id="k5mzh"><p id="k5mzh"><center id="k5mzh"></center></p></acronym></address><pre id="k5mzh"></pre><progress id="k5mzh"></progress><blockquote id="k5mzh"></blockquote><center id="k5mzh"></center><optgroup id="k5mzh"></optgroup><div id="k5mzh"><big id="k5mzh"></big></div><s id="k5mzh"><nobr id="k5mzh"></nobr></s><thead id="k5mzh"><tbody id="k5mzh"><del id="k5mzh"></del></tbody></thead><dfn id="k5mzh"><div id="k5mzh"><i id="k5mzh"><optgroup id="k5mzh"></optgroup></i></div></dfn><td id="k5mzh"><sup id="k5mzh"><nobr id="k5mzh"></nobr></sup></td><em id="k5mzh"></em><dl id="k5mzh"></dl><em id="k5mzh"><address id="k5mzh"><center id="k5mzh"></center></address></em><dl id="k5mzh"></dl><ul id="k5mzh"><blockquote id="k5mzh"></blockquote></ul><div id="k5mzh"><i id="k5mzh"></i></div><ruby id="k5mzh"><dd id="k5mzh"></dd></ruby><form id="k5mzh"><abbr id="k5mzh"><del id="k5mzh"></del></abbr></form><label id="k5mzh"><small id="k5mzh"></small></label><u id="k5mzh"><rp id="k5mzh"><progress id="k5mzh"></progress></rp></u><strike id="k5mzh"><menu id="k5mzh"><em id="k5mzh"><tr id="k5mzh"></tr></em></menu></strike><form id="k5mzh"></form><dl id="k5mzh"><acronym id="k5mzh"><cite id="k5mzh"></cite></acronym></dl><menuitem id="k5mzh"></menuitem><font id="k5mzh"></font><tfoot id="k5mzh"></tfoot><xmp id="k5mzh"></xmp><em id="k5mzh"></em><nobr id="k5mzh"><acronym id="k5mzh"><tr id="k5mzh"><wbr id="k5mzh"></wbr></tr></acronym></nobr><xmp id="k5mzh"></xmp><u id="k5mzh"><li id="k5mzh"><optgroup id="k5mzh"><track id="k5mzh"></track></optgroup></li></u><b id="k5mzh"></b><abbr id="k5mzh"><button id="k5mzh"><th id="k5mzh"><kbd id="k5mzh"></kbd></th></button></abbr><pre id="k5mzh"></pre><td id="k5mzh"></td><thead id="k5mzh"></thead><nav id="k5mzh"><noframes id="k5mzh"><center id="k5mzh"><tfoot id="k5mzh"></tfoot></center></noframes></nav><tfoot id="k5mzh"><strong id="k5mzh"></strong></tfoot><strong id="k5mzh"><dl id="k5mzh"><th id="k5mzh"><bdo id="k5mzh"></bdo></th></dl></strong><em id="k5mzh"><th id="k5mzh"><ruby id="k5mzh"><samp id="k5mzh"></samp></ruby></th></em><blockquote id="k5mzh"></blockquote><kbd id="k5mzh"></kbd><sub id="k5mzh"><dl id="k5mzh"><listing id="k5mzh"></listing></dl></sub><del id="k5mzh"></del><label id="k5mzh"></label><menuitem id="k5mzh"><center id="k5mzh"></center></menuitem><fieldset id="k5mzh"></fieldset><u id="k5mzh"></u><acronym id="k5mzh"><p id="k5mzh"><menu id="k5mzh"></menu></p></acronym><nobr id="k5mzh"></nobr><menu id="k5mzh"></menu><strike id="k5mzh"><p id="k5mzh"><strong id="k5mzh"></strong></p></strike><acronym id="k5mzh"><rt id="k5mzh"><center id="k5mzh"><address id="k5mzh"></address></center></rt></acronym><samp id="k5mzh"><kbd id="k5mzh"></kbd></samp><thead id="k5mzh"><span id="k5mzh"><form id="k5mzh"></form></span></thead><dl id="k5mzh"></dl><td id="k5mzh"><ol id="k5mzh"><var id="k5mzh"></var></ol></td><thead id="k5mzh"><acronym id="k5mzh"><nav id="k5mzh"></nav></acronym></thead><th id="k5mzh"></th><wbr id="k5mzh"><label id="k5mzh"></label></wbr><nobr id="k5mzh"><noframes id="k5mzh"><ruby id="k5mzh"><blockquote id="k5mzh"></blockquote></ruby></noframes></nobr><bdo id="k5mzh"><small id="k5mzh"><acronym id="k5mzh"></acronym></small></bdo><blockquote id="k5mzh"><tbody id="k5mzh"><dl id="k5mzh"></dl></tbody></blockquote><blockquote id="k5mzh"><span id="k5mzh"></span></blockquote><mark id="k5mzh"></mark><nobr id="k5mzh"><small id="k5mzh"></small></nobr><menu id="k5mzh"><bdo id="k5mzh"><form id="k5mzh"><em id="k5mzh"></em></form></bdo></menu><th id="k5mzh"><small id="k5mzh"><kbd id="k5mzh"></kbd></small></th><input id="k5mzh"><noframes id="k5mzh"><ruby id="k5mzh"><menuitem id="k5mzh"></menuitem></ruby></noframes></input><acronym id="k5mzh"><xmp id="k5mzh"><pre id="k5mzh"></pre></xmp></acronym><font id="k5mzh"></font><ol id="k5mzh"></ol><td id="k5mzh"><strike id="k5mzh"><bdo id="k5mzh"></bdo></strike></td><div id="k5mzh"></div><thead id="k5mzh"><xmp id="k5mzh"><tr id="k5mzh"></tr></xmp></thead><track id="k5mzh"><option id="k5mzh"><kbd id="k5mzh"></kbd></option></track><abbr id="k5mzh"><tr id="k5mzh"></tr></abbr><blockquote id="k5mzh"></blockquote><strong id="k5mzh"></strong><noframes id="k5mzh"></noframes><tr id="k5mzh"></tr><video id="k5mzh"></video><pre id="k5mzh"></pre><ul id="k5mzh"><sub id="k5mzh"></sub></ul><pre id="k5mzh"><del id="k5mzh"><center id="k5mzh"><dl id="k5mzh"></dl></center></del></pre><label id="k5mzh"></label><ol id="k5mzh"></ol><button id="k5mzh"></button><label id="k5mzh"><tbody id="k5mzh"></tbody></label></div>
    
    </html>