infopath 如何调用返回值为dataset的webservice 并遍历 5C

infopath 如何在表单代码中调用返回值为dataset的webservice 并遍历每行。
我的主要目的是为了自动填充 我表单上的重复表内容。值的来原就是另一个表单的重复表(通过webservice读取)

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
asp.net如何在页面加载infopath生成的xsn格式表单?
如题,我想在页面上显示infopath生成的xsn格式表单,使用的工具为vs2015,infopath为2010
outlook中打开infopath表单时怎么自动获取当前用户名
在infopath表单中自动设置一个文本框的默认文本是当前的用户名,请问将infopath表单通过邮件发送给A用户,当A用户在outlook中打开infopath表单时,表单中的文本框能否自动获取A的用户名?
关于INFOPATH 表单的问题
兄弟的oa 系统是垃圾的SHAREPOINT2010 ,使用infopath 做表单。可是出现一个问题无法解决,就是如下图。 哪位高手可以给我指点啊,我百度,google 都无能为力了。 ![图片说明](https://img-ask.csdn.net/upload/201508/20/1440051946_934598.jpg) 查询后台的log 日志如下: 08/20/2015 11:22:15.62 w3wp.exe (0x1DB4) 0x1244 InfoPath Forms Services Administration 82fk Warning Exception occurred during request processing. (User: , Form Name: HT_合同内发货流程_20150725, IP: , Request: http://xxxx/flowcenter/_layouts/IntelliOfficeWorkflow/ApproveReject.aspx?List=0019c817-1007-491b-bcc7-a7ed82d79415&ID=866252&Source=/_layouts/xxxxxx.ClosedPage/ClosedPage.aspx&Web=94c18582-0016-4283-af79-d89aa74a1345, Form ID: urn:schemas-microsoft-com:office:infopath:HT-8-5AW1--20150725:-myXSD-2013-04-08T12-19-03, Type: InfoPathLocalizedException, Exception Message: 此表单的安全性验证无效。) 3728a68e-afe2-439a-9cc4-179ac3d5fe45 08/20/2015 11:22:15.64 w3wp.exe (0x1DB4) 0x0C8C SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (EnsureListItemsData#3). Execution Time=419.695170754942 83e501da-6522-44e7-beb5-978f15dd55d8
C# winfrom如何展示infopath模版(xsn)
如题,winfrom如何展示infopath模版(xsn) 项目需求为:用户会有很多的表单模版,每个表单模版会录入数据并保存在数据库,计划采用C/S架构来做; 因用户的表单模版中的格式比较复杂,同时又不会不定时的增加模版,程序中来做格式就不太现实。 所以想到用infopath来做格式,然后用winform来展示,并自动生成后台数据库字段,但现在没有实现方法。 请大神给个方法。
求教java解析infopath,xsn文件
求教java解析infopath,xsn文件,求大仙解决; 求教java解析infopath,xsn文件,求大仙解决; 求教java解析infopath,xsn文件,求大仙解决;
设计InfoPath表单以及建立Sharepoint网站
我尝试用Microsoft InfoPath设计表单,设计出的表单模板可以以三种方式发布:电子邮件、网站、基于sharepoint的网站。对于前两种方式发布的表单,用户只能用InfoPath Filler填写,考虑到广泛的用户群不可能人人有这个软件,我想通过Sharepoint上的Form library来实现,但我是Cient OS而建立一个Sharepont网站需Server OS。 不知道有什么好的解决办法~求助!! 另外,如何设计出表单,用户提交表单后其数据被自动汇总到一个表格中?
infopath2010再次打开变成空白页
用infopath2010编辑表单没有保存, 再次打开的时候竟然变成空白页!但是sharepoint上面显示正常! 跪求各位大神帮忙!!!
java实现infopath表单转html代码
公司最近要搞infopath动态表单,希望提供技术点思路,最好有源码参考
如何使用c#读取Infopath内feild,然后写入到一个txt文件中?
如何使用c#读取Infopath内feild,然后写入到一个txt文件中? 请大神帮忙解答下?谢谢!
InfoPath表单怎么实现日期相减
![图片说明](https://img-ask.csdn.net/upload/201708/15/1502761953_424729.png) 休假开始时间 - 休假结束时间 = 本次请假时间(默认值) 求大佬们帮忙想想办法
infopath发布表单到sharepoint
当我设计好表单需要发布到sharepoint表单库德时候提示报错Url无效![图片说明](https://img-ask.csdn.net/upload/201612/03/1480755717_546047.png)
js 方法调用有问题 请路过的帮忙看看!!
js的方法 function open_Dialog(id) { var id=id; var title="需要跟新的记录!!!!!!!!!!!!!!!!!"; var url="orderAction!findorderByTxd?txd="+id; alter(url); var Width="100%"; var Height="400"; var return_Value; if (document.all&&window.print) { return_Value = window.showModalDialog(url,window,"dialogWidth=100%" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;"); alert(return_Value); } else window.open("update_confirmorder.jsp","","width=100%" + Width + "px,height=20%" + Height + "px,resizable=1,scrollbars=1"); } <c:forEach items="${request.al}" var="lb"> <tr> <td align="center"><!-- ${lb.transactionId } --><input type="hidden" id="txnId" name="txnId" value="${lb.transactionId }"/> <input type="hidden" id="fullName" name="fullName" value="${lb.fullName }"/>${lb.fullName }</td> <td align="center"><input type="text" id="address1" name="address1" value="${lb.address1 }"/></td> <td align="center"><input type="hidden" id="itemCode" name="itemCode" value="${lb.itemCode }"/>${lb.itemCode }</td> <td align="center"><textarea id="notes" name="notes" cols="50" rows="3">${lb.notes }</textarea></td> [color=red] <td> <a href=" javascript:open_Dialog(${lb.transactionId}) ">详情 </a></td> [/color] // 这个地方在调用js方法出现问题: 网页错误详细信息 用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.1) 时间戳: Thu, 27 Oct 2011 07:10:28 UTC 消息: 缺少 ')' 行: 1 字符: 14 代码: 0 URI: http://localhost:8080/Merchandise/indexAction!updateOrderBefore 把这个超连接换成其他的action 调用 不会出现问题 我肯定是这个地方的写法有问题<a href=" javascript:open_Dialog(${lb.transactionId}) "> 大家帮忙看看 </tr> </c:forEach>
C# 如何使用 HttpWebReques 编写baidu(百度)自动登录,请高手帮忙看看,如何解决?
下面是我写的代码,不知道那里出错,实现不了登录,请帮忙解决...先说声谢谢啦代码: ---------- string postdata = "ppui_logintime=482599&charset=utf-8&codestring=&token=e80e24119525675ba6ee9e0e15c6a8be&isPhone=false&index=0&u=&safeflg=0&staticpage=http%3A%2F%2Fwww.baidu.com%2Fcache%2Fuser%2Fhtml%2Fjump.html&loginType=1&tpl=mn&callback=parent.bdPass.api.login._postCallback&username=xx&password=xx&verifycode=&mem_pass=on"; string url = "https://passport.baidu.com/v2/api/?login"; //准备发送请求 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); Encoding myEncoding = Encoding.GetEncoding("UTF-8"); byte[] data = myEncoding.GetBytes(postdata); CookieContainer cc=new CookieContainer(); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.Accept = "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"; request.KeepAlive = true; request.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E))"; request.CookieContainer=cc; request.ContentLength = data.Length; // //发送数据 Stream webStream = request.GetRequestStream(); webStream.Write(data, 0, data.Length); //webStream.Close(); webStream.Flush(); //获取返回数据 HttpWebResponse webResponse = (HttpWebResponse)request.GetResponse(); StreamReader reader = new StreamReader(webResponse.GetResponseStream(), myEncoding ); postdata = reader.ReadToEnd(); Console.WriteLine(postdata); webResponse.Close(); postdata.Trim(); //Cookies CookieContainer cs = new System.Net.CookieContainer(); System.Net.CookieCollection cc1 = cc.GetCookies(new Uri("https://passport.baidu.com/v2/api/?login")); foreach (System.Net.Cookie item in cc1) { Console.WriteLine(item.Name); Console.WriteLine(item.Value); } webBrowser1.Navigate("www.baidu.com");
weblogic性能问题--线程阻塞
![图片说明](https://img-ask.csdn.net/upload/201612/09/1481252207_576799.jpg) 大家帮忙看下weblogic线程阻塞了 报错:which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: 但是不知道是怎么引起线程超时的,求解决方案。 另问吞吐率3.999正常吗,这个是什么逻辑? 新增日志文件: ``` ####<2016-12-8 上午09时02分49秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481158969400> <BEA-100094> <The session id: 6tCpYLwNGJdj2222F3pS9TvYnCJyTf1V2znvhtBKNXmy3kHYcqJS has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时02分49秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481158969566> <BEA-100094> <The session id: 6tCpYLwNGJdj2222F3pS9TvYnCJyTf1V2znvhtBKNXmy3kHYcqJS has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时03分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481159018626> <BEA-310002> <72% of the total memory in the server is free> ####<2016-12-8 上午09时05分24秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481159124066> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时05分27秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481159127541> <BEA-100094> <The session id: pyHyYLwPLvG0qJnD7kNrFpQyrQJS882K5qTKJgJn51VlY928QdwY has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时07分14秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481159234066> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时07分24秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481159244066> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时07分44秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481159264313> <BEA-100094> <The session id: W2HDYLxFCjJcsJQyXNL3s8xL2GTRP2NJrzhgyNCnM1JFzJBkJCyM has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时07分44秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481159264540> <BEA-100094> <The session id: W2HDYLxFCjJcsJQyXNL3s8xL2GTRP2NJrzhgyNCnM1JFzJBkJCyM has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时09分52秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481159392716> <BEA-100094> <The session id: nyV5YLxBVRs2qTVxdSmBG7TDZJgG5QVSHS6qqKWHJdrMhz1zpQ3v has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时09分52秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481159392958> <BEA-100094> <The session id: nyV5YLxBVRs2qTVxdSmBG7TDZJgG5QVSHS6qqKWHJdrMhz1zpQ3v has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时09分54秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481159394064> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时11分53秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481159513702> <BEA-100094> <The session id: LJnnYLwD2r2xpkhz2DbHZRyX4MVhlwZ78MgCSvLRyhVNXQbT26G2 has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时12分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481159558630> <BEA-310002> <58% of the total memory in the server is free> ####<2016-12-8 上午09时16分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481159798632> <BEA-310002> <44% of the total memory in the server is free> ####<2016-12-8 上午09时17分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481159858634> <BEA-310002> <72% of the total memory in the server is free> ####<2016-12-8 上午09时19分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481159978635> <BEA-310002> <61% of the total memory in the server is free> ####<2016-12-8 上午09时25分07秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481160307790> <BEA-100094> <The session id: sLRDYLzLtJnyG1LtHLXy5qrfH5h6Y2hQ1svLbHzB26CJsYS87k3g has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/login> ####<2016-12-8 上午09时25分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481160338637> <BEA-310002> <48% of the total memory in the server is free> ####<2016-12-8 上午09时26分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481160398639> <BEA-310002> <74% of the total memory in the server is free> ####<2016-12-8 上午09时26分49秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481160409486> <BEA-100094> <The session id: LKCqYLyhXMbpgvTpChzXPSF1kPVhzBZ02VHw2hK1fXb0ztdL1JMK has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/> ####<2016-12-8 上午09时27分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481160424057> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时27分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481160458640> <BEA-310002> <62% of the total memory in the server is free> ####<2016-12-8 上午09时27分54秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481160474055> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时31分14秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481160674563> <BEA-100094> <The session id: vqmXYL3RZhczJzY2J1gTLZv520GrZlphpK8C5CmknFQTwvdjmydw has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/> ####<2016-12-8 上午09时31分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481160698644> <BEA-310002> <74% of the total memory in the server is free> ####<2016-12-8 上午09时32分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481160724054> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时32分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481160758645> <BEA-310002> <49% of the total memory in the server is free> ####<2016-12-8 上午09时33分16秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481160796674> <BEA-100094> <The session id: 1rVpYL3LTmRjDsTz0RTxpJlNj5qvj1R0jmbXXR4mL2FyQbbk2Xyh has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/> ####<2016-12-8 上午09时33分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481160818647> <BEA-310002> <68% of the total memory in the server is free> ####<2016-12-8 上午09时35分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481160904053> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时36分44秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481161004052> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时36分54秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481161014052> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时44分14秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481161454048> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时46分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481161598651> <BEA-310002> <57% of the total memory in the server is free> ####<2016-12-8 上午09时49分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481161778654> <BEA-310002> <70% of the total memory in the server is free> ####<2016-12-8 上午09时50分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481161838655> <BEA-310002> <50% of the total memory in the server is free> ####<2016-12-8 上午09时52分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481161924045> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时52分14秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481161934043> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时52分34秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481161954044> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时53分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481162018657> <BEA-310002> <67% of the total memory in the server is free> ####<2016-12-8 上午09时54分14秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162054044> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时55分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162104044> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时55分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481162138659> <BEA-310002> <47% of the total memory in the server is free> ####<2016-12-8 上午09时56分16秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '25' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481162176142> <BEA-100094> <The session id: PjB7YLtLh7DyWyFYKQ1hy0dKTLdKTpntn2Hyr42l1LCyT2CxQTQC has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/> ####<2016-12-8 上午09时56分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481162198660> <BEA-310002> <68% of the total memory in the server is free> ####<2016-12-8 上午09时58分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162284040> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午09时58分07秒 CST> <Warning> <HTTP Session> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1481162287006> <BEA-100094> <The session id: 6BQBYLsd9Zn22XqLZN1cNdKXW0hvtvnVv44TyDW0GjnQsZCVv1DB has been accessed from -5920882592939250474S:10.3.172.15:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-15-1, a server that is not the primary (-6040914358129327307S:10.3.172.16:[7002,7002,-1,-1,-1,-1,-1]:10.3.172.16:7002,10.3.172.16:7003,10.3.172.15:7002,10.3.172.15:7003:weblogic:Server-16-1). The request URL was: http://10.3.200.15:7002/pam/> ####<2016-12-8 上午09时58分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481162318661> <BEA-310002> <53% of the total memory in the server is free> ####<2016-12-8 上午10时00分24秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162424039> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时00分54秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162454040> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时01分24秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162484039> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时01分44秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162504039> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时03分04秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481162584039> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时04分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481162678665> <BEA-310002> <76% of the total memory in the server is free> ####<2016-12-8 上午10时11分24秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481163084035> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时13分24秒 CST> <Info> <WorkManager> <jxglapp1> <Server-15-1> <weblogic.cluster.MessageReceiver> <<WLS Kernel>> <> <> <1481163204035> <BEA-002936> <maximum thread constraint ClusterMessaging is reached> ####<2016-12-8 上午10时13分38秒 CST> <Info> <Health> <jxglapp1> <Server-15-1> <weblogic.GCMonitor> <<anonymous>> <> <> <1481163218668> <BEA-310002> <65% of the total memory in the server is free> ####<2016-12-8 上午10时13分46秒 CST> <Error> <WebLogicServer> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '60' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1481163226845> <BEA-000337> <[STUCK] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "630" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@36c010bd[ POST /pam/secUser_save.action HTTP/1.1 x-requested-with: XMLHttpRequest Accept-Language: zh-cn Referer: http://10.3.200.15:7002/pam/secUser_toForm.action?operateType=2&userId=27673470C2BC5B64E050007F010049C5&id=27673470C2BC5B64E050007F010049C5 Accept: text/plain, */*; q=0.01 Content-Type: application/x-www-form-urlencoded;charset=utf-8 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2) Content-Length: 880 Connection: Keep-Alive Cache-Control: no-cache Cookie: loginUserName=004768; JSESSIONID=0LdbYL1LnqLSvvPfQ2p0TgLLp2MShyGDMh8FZs8Xxnhl6DhrW4xQ!-618279062!933202096 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: null> ####<2016-12-8 上午10时14分46秒 CST> <Error> <WebLogicServer> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '67' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1481163286847> <BEA-000337> <[STUCK] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "615" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@6fff4f77[ POST /pam/login HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://10.3.200.15:7002/pam/login.jsp Accept-Language: zh-cn User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate Content-Length: 31 Connection: Keep-Alive Cache-Control: no-cache Cookie: loginUserName=004768; JSESSIONID=FZvsYL1pFLx3T508BSn9zV6RZHV4HghrTnnNsLyQnR2qv8GRvPy9!-618279062!933202096 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: null> ####<2016-12-8 上午10时14分46秒 CST> <Error> <WebLogicServer> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '67' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1481163286848> <BEA-000337> <[STUCK] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "690" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@36c010bd[ POST /pam/secUser_save.action HTTP/1.1 x-requested-with: XMLHttpRequest Accept-Language: zh-cn Referer: http://10.3.200.15:7002/pam/secUser_toForm.action?operateType=2&userId=27673470C2BC5B64E050007F010049C5&id=27673470C2BC5B64E050007F010049C5 Accept: text/plain, */*; q=0.01 Content-Type: application/x-www-form-urlencoded;charset=utf-8 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2) Content-Length: 880 Connection: Keep-Alive Cache-Control: no-cache Cookie: loginUserName=004768; JSESSIONID=0LdbYL1LnqLSvvPfQ2p0TgLLp2MShyGDMh8FZs8Xxnhl6DhrW4xQ!-618279062!933202096 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: null> ####<2016-12-8 上午10时14分46秒 CST> <Error> <WebLogicServer> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '67' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1481163286849> <BEA-000337> <[STUCK] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "622" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@62ba4712[ POST /pam/login HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://10.3.200.15:7002/pam/login.jsp Accept-Language: zh-cn User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate Content-Length: 31 Connection: Keep-Alive Cache-Control: no-cache Cookie: loginUserName=000111; JSESSIONID=FZvsYL1pFLx3T508BSn9zV6RZHV4HghrTnnNsLyQnR2qv8GRvPy9!-618279062!933202096 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: null> ####<2016-12-8 上午10时14分46秒 CST> <Error> <WebLogicServer> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '67' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1481163286849> <BEA-000337> <[STUCK] ExecuteThread: '25' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "625" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@33902161[ POST /pam/login HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://10.3.200.15:7002/pam/login.jsp Accept-Language: zh-cn User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate Content-Length: 31 Connection: Keep-Alive Cache-Control: no-cache Cookie: loginUserName=000111; JSESSIONID=FZvsYL1pFLx3T508BSn9zV6RZHV4HghrTnnNsLyQnR2qv8GRvPy9!-618279062!933202096 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: null> ####<2016-12-8 上午10时14分46秒 CST> <Error> <WebLogicServer> <jxglapp1> <Server-15-1> <[ACTIVE] ExecuteThread: '67' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1481163286850> <BEA-000337> <[STUCK] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "614" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@3b7f81b9[ POST /pam/login HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://10.3.200.15:7002/pam/login.jsp Accept-Language: zh-cn User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.2) Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate Content-Length: 31 Connection: Keep-Alive Cache-Control: no-cache Cookie: loginUserName=004768; JSESSIONID=FZvsYL1pFLx3T508BSn9zV6RZHV4HghrTnnNsLyQnR2qv8GRvPy9!-618279062!933202096 ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: null> ```
python3多进程爬虫的每个进程停止运行但是程序没有退出?
我写了一个多进程和多线程结合的爬虫(我不知道多进程和多线程怎样结合使用)所以我先说一下**我的思路**: * 首先我爬取的是[某车之家](https://www.autohome.com.cn/)的文章 * 汽车之家有很多种车,比如奥迪,宝马,奔驰,我创建一个进程池pool, 对应每一种车创建一个进程下载它的文章 * 然后,因为每种车下面有很多篇文章,我创建一个线程池,对应每一篇文章,创建一个线程来下载文章 * 创建进程池我使用的是multiprocessing.Pool * 创建线程池使用的是concurrent.futures.ThreadPoolExecutor ## 那么现在问题来了 * 当我刚开始运行我的代码的时候,因为我创建的进程池大小是cpu_count()=8,所以打开任务管理器可以看到8个python进程正在运行 ![图片说明](https://img-ask.csdn.net/upload/201901/26/1548506446_775132.png) * **然后,当代码运行一段时间后,进程池中的8个进程全部停止运行了** ![图片说明](https://img-ask.csdn.net/upload/201901/26/1548506504_930707.png) ![图片说明](https://img-ask.csdn.net/upload/201901/26/1548506544_201575.png) ## 可以看到此时代码并没有运行完毕,而且代码运行卡在这里无论等多久都不会继续运行 * 我观察发现,这些进程在下载某辆车如本田-雅阁的所有文章后,注意是将所有文章下载完毕才会停止运行,而且不再运行 ## 我想知道进程池中的进程为什么会停止运行,而我的函数没有停止?可以确定的是我的爬虫任务并没有全部完成,仅仅完成了一小部分。进程池中的每一个进程在爬取几辆车的所有文章后停止运行,求大佬解答,不甚感激。 ## 代码如下 ``` # coding=utf-8 import requests import os import re import json import time import random import threading import multiprocessing import concurrent.futures from bs4 import BeautifulSoup def change_title(title): rstr = r"[\/\\\:\*\?\"\<\>\|]" return re.sub(rstr, "", title) USER_AGENTS = [ "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)", "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.5; AOLBuild 4337.35; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)", "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.30)", "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)", "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070215 K-Ninja/2.1.1", "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9) Gecko/20080705 Firefox/3.0 Kapiko/3.0", "Mozilla/5.0 (X11; Linux i686; U;) Gecko/20070322 Kazehakase/0.4.5", "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko Fedora/1.9.0.8-1.fc10 Kazehakase/0.5.6", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.20 (KHTML, like Gecko) Chrome/19.0.1036.7 Safari/535.20", "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52", ] http_ip = list() https_ip = list() with open(r'D:\pycharm\Spider\99mm\useful_ip.txt', 'r') as fp: lines = fp.readlines() for line in lines: ips = eval(line) if str(ips['kind']) == 'HTTP': http_ip.append(ips['proxy']) else: https_ip.append(ips['proxy']) def get_all_cars(main_url, file_path): car_dict = {} html = requests.get(main_url) soup = BeautifulSoup(html.text, "html.parser") catalog = soup.find("div", id="hotcar-1").find_all("div", class_="name") for cata in catalog[-1:]: # suv, 紧凑型车, 中型车 cata_a = cata.find("a") print(cata_a["href"]) print(cata_a.get_text()) car_url = main_url + cata_a["href"] car_html = requests.get(car_url) car_soup = BeautifulSoup(car_html.text, "html.parser") # 有4个 class_="tab-content-item" car_letter_boxes = car_soup.find("div", class_="tab-content-item").find_all("div", class_="uibox") for car_letter_box in car_letter_boxes[:]: # 车牌按字母排序 A~Z, 一个字母下有很多车牌, 对每个字母进行处理 car_brand_info = car_letter_box.find("div", class_="uibox-con rank-list rank-list-pic") if car_brand_info: car_brands = car_brand_info.find_all("dl", olr=re.compile("^.*$")) for car_brand in car_brands: # 一个车牌有很多种车型, 对每个车牌进行处理 brand_name = car_brand.find("div").find("a").get_text() print("-car brand-", brand_name) car_dict[cata_a.get_text() + "-" + brand_name] = {} car_brand_path = main_path + "\\" + cata_a.get_text() + "-" + brand_name if not os.path.exists(car_brand_path): os.mkdir(car_brand_path) # os.chdir(car_brand_path) car_name_lists = car_brand.find_all("ul", class_="rank-list-ul") for car_name_list in car_name_lists: car_name_lis = car_name_list.find_all("li", id=re.compile("^.*$")) for car_name_li in car_name_lis: car_a_tag = car_name_li.find("h4").find("a") specific_car_url = "https:" + car_a_tag["href"] car_name = car_a_tag.get_text() print("\t", car_name, "\t", specific_car_url) car_dict[cata_a.get_text() + "-" + brand_name][car_name] = specific_car_url brand_cars_path = car_brand_path + "\\" + car_name if not os.path.exists(brand_cars_path): os.mkdir(brand_cars_path) # os.chdir(brand_cars_path) # 至此, 找到了每一辆车的url, 需要从这个url中找到它对应的一系列文章 # get_each_car_articles(main_url, specific_car_url) else: continue return car_dict def get_each_car_articles(main_url, specific_car_url, file_path, headers, proxies, info): # main_url, specific_car_url, file_path, headers, proxies, info = args # 传入的是每一种车的url, 即specific_car_url article_dict = {} specific_car_html = requests.get(url=specific_car_url, headers=headers, proxies=proxies) specific_car_soup = BeautifulSoup(specific_car_html.text, "html.parser") art_temp = specific_car_soup.find("div", class_="athm-sub-nav__channel athm-js-sticky") if art_temp: art = art_temp.find_all("li") else: print(f"\t\t****article is None, url is {specific_car_url}****") return part_url = art[6].find("a")["href"] specific_car_article_url = main_url + part_url right_pos = specific_car_article_url.rfind("/") specific_car_article_url = specific_car_article_url[:right_pos + 1] specific_car_article_html = requests.get(specific_car_article_url, headers=headers, proxies=proxies) specific_car_article_soup = BeautifulSoup(specific_car_article_html.text, "html.parser") page_info = specific_car_article_soup.find("div", class_="page") page_num = 1 if page_info: pages = page_info.find_all("a", target="_self") page_num = int(pages[-2].get_text()) for i in range(1, page_num + 1): if i == 1: page_url = specific_car_article_url else: page_url = specific_car_article_url[:-4] + str(i) + specific_car_article_url[-3:] # print("\t"*2, f"正在查找第{i}页的文章\t", page_url) page_html = requests.get(page_url, headers=headers, proxies=proxies) page_soup = BeautifulSoup(page_html.text, "html.parser") articles = page_soup.find("div", class_="cont-info").find_all("li") for article in articles: each_article = article.find("h3").find("a") each_article_url = "https:" + each_article["href"] each_article_title = each_article.get_text() article_dict[each_article_title] = each_article_url os.chdir(file_path) with concurrent.futures.ThreadPoolExecutor(max_workers=8) as t_executor: for key, value in article_dict.items(): t_executor.submit(download_each_article, *(value, key,info)) # thread_list = [] # for key, value in article_dict.items(): # thread_list.append(threading.Thread(target=download_each_article, args=(value, key,info))) # [thread.start() for thread in thread_list] # [thread.join() for thread in thread_list] def download_each_article(each_article_url, each_article_title, info): headers = { "User-Agent": random.choice(USER_AGENTS), "Referer": "https://www.autohome.com.cn" } proxies = {"proxy": random.choice(http_ip)} # each_article_url, each_article_title, headers, proxies, info = args print(f"\t\t--下载文章-- {info}\t{each_article_title}\t{each_article_url}") article_html = requests.get(each_article_url, headers=headers, proxies=proxies) article_soup = BeautifulSoup(article_html.text, "html.parser") article_content = article_soup.find("div", class_="container article") if article_content: with open(f"{change_title(each_article_title)}.txt", "w+", encoding="utf-8") as f: time_span = article_content.find("div", class_="article-info").find("span", class_="time") time = time_span.get_text() time_dict = {"time": time} f.write(json.dumps(time_dict) + "\n\n") article_content_div = article_content.find("div", id="articleContent") for content in article_content_div.find_all("p"): if content.get_text().strip(): content_dict = {"content": content.get_text()} f.write(json.dumps(content_dict) + "\n") else: try: imgs = content.find_all("a") for i in imgs: img = i.find("img") img_dict = {f"<[image] {img['alt']}> ": "https:" + img["src"]} f.write(json.dumps(img_dict) + "\n") except: continue pages = article_content.find("div", class_="athm-page__num") if pages: for a in pages.find_all("a", target="_self")[1:]: next_page_url = "https://www.autohome.com.cn" + a["href"] pages_html = requests.get(next_page_url, headers=headers, proxies=proxies) pages_soup = BeautifulSoup(pages_html.text, "html.parser") pages_content_div = pages_soup.find("div", class_="container article").find("div", id="articleContent") for content in pages_content_div.find_all("p"): if content.get_text().strip(): content_dict = {"content": content.get_text()} f.write(json.dumps(content_dict) + "\n") else: try: imgs = content.find_all("a") for i in imgs: img = i.find("img") img_dict = {f"<[image] {img['alt']}> ": "https:" + img["src"]} f.write(json.dumps(img_dict) + "\n") except: continue # 下载评论 f.write("\n") article_comment_span = article_content.find("div", "article-tools").find("span", class_="comment") article_comment_url = "https:" + article_comment_span.find("a")["href"] # print(article_comment_url) basic_reply_url = "https://reply.autohome.com.cn/api/comments/show.json?count=50&" \ "page={}&id={}&appid=1&datatype=jsonp&order=0&replyid=0" html = requests.get(article_comment_url, headers=headers, proxies=proxies) html_soup = BeautifulSoup(html.text, "html.parser") article_id = re.search(r"articleid=([\d]*)#", article_comment_url).groups()[0] first_json_dict = json.loads(requests.get(basic_reply_url.format(1, article_id), headers=headers, proxies=proxies).text[1:-1]) page_num = int(first_json_dict["commentcount"]) // 50 + 1 for i in range(1, page_num + 1): json_dict = json.loads(requests.get(basic_reply_url.format(i, article_id)).text[1:-1]) comment_dicts = json_dict["commentlist"] for comment in comment_dicts: comment_dict = {} comment_dict["RMemberId"] = comment["RMemberId"] comment_dict["RMemberName"] = comment["RMemberName"] comment_dict["replydate"] = comment["replydate"] comment_dict["ReplyId"] = comment["ReplyId"] comment_dict["RObjId"] = comment["RObjId"] comment_dict["RTargetReplyId"] = comment["RTargetReplyId"] comment_dict["RTargetMemberId"] = comment["RTargetMemberId"] comment_dict["RReplyDate"] = comment["RReplyDate"] comment_dict["RContent"] = comment["RContent"] comment_dict["RFloor"] = comment["RFloor"] f.write(json.dumps(comment_dict) + "\n") print(f"**{info}-{each_article_title} completed") else: print(f"\tPicture article, passed. URL is {each_article_url}") if __name__ == '__main__': main_url = r"https://www.autohome.com.cn" main_path = r"D:\pycharm\python_work\autohome\汽车之家" start_time = time.time() proxies = {'proxy': random.choice(http_ip)} headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", "Referer": "https://www.autohome.com.cn" } car_dict = get_all_cars(main_url, main_path) # print(car_dict) # with concurrent.futures.ProcessPoolExecutor(max_workers=8) as p_executor: # for keys, values in car_dict.items(): # for key, value in values.items(): # file_path = main_path + "\\" + str(keys) + "\\" + key # info = f"-{keys}-{key}-" # p_executor.submit(get_each_car_articles, *(main_url, value, file_path, headers, proxies, info)) pool = multiprocessing.Pool() for keys, values in car_dict.items(): print(keys, values) for key, value in values.items(): print("\t", key, value) file_path = main_path + "\\" + str(keys) + "\\" + key info = f"-{keys}-{key}-" pool.apply_async(get_each_car_articles, args=(main_url, value, file_path, headers, proxies, info)) pool.close() pool.join() end_time = time.time() print("##########已完成##########") print(f"spend time {end_time-start_time}") ```
爬取网页只能读取到“请刷新页面或按键盘F5”
以下是源码 ``` import urllib from urllib import request import re import random url = "http://x77558.net/bbs/thread.php?fid=6" user_agent = [ "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3; rv:11.0) like Gecko", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11", "Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)", "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5", "Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5", "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5", "Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1", "Opera/9.80 (Android 2.3.4; Linux; Opera Mobi/build-1107180945; U; en-GB) Presto/2.8.149 Version/11.10", "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13", "Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+", "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0", "Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124", "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan)", "UCWEB7.0.2.37/28/999", "NOKIA5700/ UCWEB7.0.2.37/28/999", "Openwave/ UCWEB7.0.2.37/28/999", "Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999", # iPhone 6: "Mozilla/6.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/8.0 Mobile/10A5376e Safari/8536.25", ] # read the url and return a list named page_data def read_url(url,page_data,headers): req = urllib.request.Request(url, headers=headers) for i in range(3): web_data = urllib.request.urlopen(req).read() web_data = web_data.decode("gbk",errors = 'ignore')# the second parament can solver the problem that in # error decode page_data.append(str(web_data)) return page_data # find taget in the page , used re , an return a list def find_tag(tagstr,idx,data,lists): lists.append(re.findall(tagstr,data[idx])) return lists # read the list to download the photo which type is jpg def download_jpg(lists,path): for lis in lists: for l in lis: print(l) name = l.split("/")[-1] print(name) if ".jpg" or ".png" in l: if "js" in l: continue elif "http" in l: # sometimes met a missing name 403 , the solve is in the another file named download.py urllib.request.urlretrieve(l,path+name) else: continue tagstr = '<a title="开放主题" href="(.*?)"' page_data = [] img_url_list = [] url_lsit = [] img_list = [] while len(page_data)==0 or page_data[-1]=="请刷新页面或按键盘F5": headers = {'User-Agent': random.choice(user_agent)} read_url(url,page_data,headers) print(page_data[-1]) ```
weblogic 下 ajaxfileuplpad上传图片时报错如下:
weblogic 下 ajaxfileuplpad上传图片时报错如下:之前没有见过啊,还有一个配置和代码和这个一样的环境,都不报错 <2015-12-31 涓..12??4?.5绉.CST> <Error> <HTTP> <BEA-101017> <[ServletContext@158534201[app:my_info module:my_info path:/my_info spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@422cd301[ POST /my_info/uploadFile.s?userCode=20120625222107067138714 HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://10.1.244.25:7003/my_info/personInfoEditPage.s?userCode=MTExMTU1OTM@ Accept-Language: zh-CN User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; . NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3) Content-Type: multipart/form-data; boundary=---------------------------7df23024130bd0 Accept-Encoding: gzip, deflate Content-Length: 4871 Connection: Keep-Alive Cache-Control: no-cache Cookie: menhuSESSIONID=Gv1GWGnRnLRB4VnQ2LZRmlDt20192kQVJLn6nQwdZJR8XMzT41N0!-741842230; JSESSIONID=Hp2QWGsQfK1M2Q1j2DKpLrjKsySHhr1Wvwd5Zkv4FvLnvFHTcGdf!-741842230; ADMINCONSOLESESSION=RJJFWGsNGkLQS77JFnLTYdzyRTcL7jsDsBpZT1C1TkGmTnvnsM4G!-741842230 ]] Root cause of ServletException. java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1125) Truncated. see log file for complete stacktrace
相见恨晚的超实用网站
相见恨晚的超实用网站 持续更新中。。。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
JavaScript 为什么能活到现在?
作者 | 司徒正美 责编 |郭芮 出品 | CSDN(ID:CSDNnews) JavaScript能发展到现在的程度已经经历不少的坎坷,早产带来的某些缺陷是永久性的,因此浏览器才有禁用JavaScript的选项。甚至在jQuery时代有人问出这样的问题,jQuery与JavaScript哪个快?在Babel.js出来之前,发明一门全新的语言代码代替JavaScript...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
吐血推荐珍藏的Visual Studio Code插件
作为一名Java工程师,由于工作需要,最近一个月一直在写NodeJS,这种经历可以说是一部辛酸史了。好在有神器Visual Studio Code陪伴,让我的这段经历没有更加困难。眼看这段经历要告一段落了,今天就来给大家分享一下我常用的一些VSC的插件。 VSC的插件安装方法很简单,只需要点击左侧最下方的插件栏选项,然后就可以搜索你想要的插件了。 下面我们进入正题 Material Theme ...
实战:如何通过python requests库写一个抓取小网站图片的小爬虫
有点爱好的你,偶尔应该会看点图片文字,最近小网站经常崩溃消失,不如想一个办法本地化吧,把小照片珍藏起来! 首先,准备一个珍藏的小网站,然后就可以开始啦! 第一步 我们先写一个获取网站的url的链接,因为url常常是由page或者,其他元素构成,我们就把他分离出来,我找到的网站主页下有图片区 图片区内有标题页,一个标题里有10张照片大概 所以步骤是: 第一步:进入图片区的标题页 def getH...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Python 植物大战僵尸代码实现(2):植物卡片选择和种植
这篇文章要介绍的是: - 上方植物卡片栏的实现。 - 点击植物卡片,鼠标切换为植物图片。 - 鼠标移动时,判断当前在哪个方格中,并显示半透明的植物作为提示。
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
相关热词 基于c#波形控件 c# 十进制转十六进制 对文件aes加密vc# c#读取栈中所有的值 c# rsa256加密 好 学c# 还是c++ c# 和java的差距 c# curl网络框架 c# https证书请求 c# 中崎
立即提问