- 博客(8)
- 资源 (4)
- 收藏
- 关注
原创 解决python ValueError:source code string cannot contain null bytes
点击UTF-16LE 在弹出的窗口中点击UTF-8,然后再弹出的对话框中选择Convert。上面提到的vscode的解决方案,其实pycharm也有相同的功能。用pycharm打开目标文件可以看到左下角的编码显示UTF-16F,仔细观察可以发现其他所有python文件的编码都是UTF-8。推测是文件编码不一致导致的问题。
2023-03-22 12:59:56
1291
1
原创 powershell静默批量卸载补丁
#17763.2114 补丁系统KB5005030 (OS Build 17763.2114)$UpdateArray = @(”17763.2114“) foreach ($UpdateVersion in $UpdateArray) { $SearchUpdates = dism /online /get-packages | findstr "Package_for" | findstr "$UpdateVersion" if ($SearchUpdate
2021-08-19 13:37:03
495
原创 ssh连接docker容器Connection closed by foreign host
vim /etc/ssh/sshd_config 修改客户端链接活跃时间为就可以登录了ClientAliveInterval 60ClientAliveCountMax 3
2021-08-07 19:40:16
1013
原创 powershell MSOnline和AzureAD混用的一些坑
MSOnline与AzureAD实现机制不同,混用会到导致明显的问题例如你用New-AzureADUser创建完账户,用Set-MsolUser企图修改用户属性就会出现找不到用户的情况。其中Set-MsolUser提供了开启MFA 的-StrongAuthenticationRequirements的参数而Set-AzureADUser却没有,如果不用同一个包修改和创建用户修改失败。如果需要创建用户的同时开启MFA必须统一使用MSOnline包```powershell$GivenName =
2021-08-05 10:01:48
335
原创 javascript匹配字符串中第二个空格
//str为字符串//index(str,i)str为要匹配的字符,i为从第i个位置开始var n=str.indexOf(" ",str.indexOf(" ")+1)
2020-12-15 10:25:11
691
原创 Win32_LogicalMemoryConfiguration在win7下无法使用
strComputer = "."Set objSWbemServices = GetObject("winmgmts:\" & strComputer)Set colSWbemObjectSet = _objSWbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")For Each objSWbemObject In colSWbemObjectSetWscript.Echo "Total Physical Memory
2020-11-30 17:14:22
226
原创 解决selenium headless模式下填写表单失败
.AddArgument "--headless" '无头模式隐藏游览器窗体.AddArgument "--no-sandbox".AddArgument "--disable-dev-shm-usage".AddArgument "window-size=1920,1080" '这一条尤其重要参考资料 stackoverflow
2020-11-30 17:12:37
737
原创 通过注册表添加自定义游览器协议
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\test];申明协议内容"URL Protocol"="C:\Windows\System32\test.exe";申明打开文件[HKEY_CLASSES_ROOT\test\shell\open\command]@="\"C:\Windows\System32\test.exe\" \"%1\""
2020-11-30 17:10:26
521
人人都可以学会的天际HDT-SMP XML编写教程
2020-12-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人