会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
棂信
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
下一页
2021年2月26日
下载excel文件时,url过长无法正常请求时。通过form提交来作post请求
摘要: var tempForm = document.createElement("form"); tempForm.id = "tempForm1"; tempForm.method = "post"; tempForm.action = url; tempForm.target = "_self";
阅读全文
posted @ 2021-02-26 10:30 棂信
阅读(246)
评论(0)
推荐(0)
2020年11月28日
Spire.Xls导出slx表格2:当WPS版本过低时,NPOI导出大数据文件在低版本无法打开
摘要: var path = HttpContext.Server.MapPath($"~/Temp/文件xls导出{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.xls"); 获取datatable数据... try { Workbook newBook1 = n
阅读全文
posted @ 2020-11-28 14:54 棂信
阅读(250)
评论(0)
推荐(0)
判断进程、服务是否存在
摘要: using System.ServiceProcess; string serviceName = "WeChat"; string processName = "WeChat"; private void Test1() { List<string> ls = new List<string>()
阅读全文
posted @ 2020-11-28 14:44 棂信
阅读(287)
评论(0)
推荐(0)
WPF获取窗口句柄,并向窗口结构性发送文本内容
摘要: 发送端: using System.Runtime.InteropServices; //DllImport /*发送消息的结构体*/ [DllImport("User32.dll", EntryPoint = "SendMessage")] private static extern int Se
阅读全文
posted @ 2020-11-28 14:41 棂信
阅读(327)
评论(0)
推荐(0)
WPF获取窗口句柄,并向窗口内控件无差别发送文本内容
摘要: using System.Windows.Interop;using System.Runtime.InteropServices; //DllImport /*通过这个方法,可以找到主进程的窗体*/ [DllImport("User32.dll", EntryPoint = "FindWindow
阅读全文
posted @ 2020-11-28 14:32 棂信
阅读(475)
评论(0)
推荐(0)
WPF通过钩子监听当前进程windows消息
摘要: using System.Windows.Interop; this.SourceInitialized += new EventHandler(MainWindow_SourceInitialized); protected override void OnSourceInitialized(Ev
阅读全文
posted @ 2020-11-28 14:26 棂信
阅读(555)
评论(0)
推荐(0)
2020年9月30日
Selenium + FireFox 安装与使用
摘要: pip install selenium //安装 下载geckodriver.exe 放到Python目录,在系统变量添加目录 报错:permission denied(权限不足) pip install --upgrade selenium :由于版本不匹配导致,更新selenium版本 访问页
阅读全文
posted @ 2020-09-30 15:28 棂信
阅读(594)
评论(0)
推荐(0)
2020年9月26日
Py模块安装与引用
摘要: 安装: pip install requests pip install beautifulsoup4 pip3 install lxml 无需引用 pip3 install easygui pip3 install selenium 引用: import requests 网页请求 from bs
阅读全文
posted @ 2020-09-26 10:08 棂信
阅读(130)
评论(0)
推荐(0)
2020年9月23日
解决BeautifulSoup警告未显示指定解析器问题
摘要: 安装python3 解析器: pip3 install lxml 显式指定解析器: bf = BeautifulSoup(res.text,"lxml")
阅读全文
posted @ 2020-09-23 09:09 棂信
阅读(217)
评论(0)
推荐(0)
2020年9月22日
Python爬取网页乱码解决
摘要: 设置requests返回值编码: 获取返回值编码:res.encoding :ISO-8859-1 获取文本内容编码:res.apparent_encoding :utf-8 新的字符串str1用于接收编码后的字符串: str1 = res.text.encode(res.encoding).dec
阅读全文
posted @ 2020-09-22 19:33 棂信
阅读(383)
评论(0)
推荐(0)
1
2
3
4
下一页
公告
点击右上角即可分享