踩坑笔记

踩坑笔记

电脑打开Office的word和Excel后,疯狂频闪黑屏

点击文件-选项-高级-禁用硬件图形加速打钩-然后确定

pip 安装包到指定python

找到你想装包的python的python.exe路径,然后 路径/python.exe -m install package_name

Chrome

Chrome修改js代码

不能直接在script改,而要在console中重新定义函数

1
2
3
4
5
6
7
8
//orignal
function f(){
alert(1);
}
//changed
function f(){
alert(123);
}

禁用页面可见性API visibilitychange

这个玩意常用在广告,视频什么的,让你不能切换tab,一切换就自动暂停

1
2
3
4
5
6
7
for (event_name of ["visibilitychange", "webkitvisibilitychange", "blur"]) {
//console.log(event_name);
window.addEventListener(event_name, function(event) {
//console.log(event);
event.stopImmediatePropagation();
}, true);
}

stopPropagation与stopImmediatePropagation的区别

event.stopPropagation();阻止事件冒泡。
event.stopImmediatePropagation(); 阻止事件冒泡并且阻止该元素上同事件类型的监听器被触发。

Chrome94 关闭空闲检测API

chrome://settings/content/idleDetection

删除个别表单自动填充建议

鼠标悬浮在表单建议上,键盘按shift+del

spacedesk数据线连接

免费的app 非常好用 如果想用数据线的话,推荐大家用adb来端口转发下 方法如下: 连接adb之后输入adb reverse tcp:28252 tcp:28252 之后在安卓手机用浏览器打开html5版本的客户端(在spaceDesktop官网有) ,之后ip地址输入127.0.0.1就能连接了,记得在网页调节清晰度,尺寸之类的 (由于有udp暂时只能用html端)

Android Debug Bridge Cable
There is no native ADB cable support by spacedesk. However, advanced users can still use ADB port forwarding.
On Windows, enter “adb reverse tcp:28252 tcp:28252″
On Android, go to spacedesk Menu->”Settings”->”Connection”->”Automatic Server Discovery”. Turn OFF.
Then you can enter IP address 127.0.0.1 to connect.

笔记本睡眠很久后指纹登录失效

设备管理器-生物识别-指纹登录器-属性-取消勾选允许关闭此设备省电

解决windows10中开代理之后microsoft应用商店无法连接的问题

Win10 所有 UWP 应用均运行在被称为 App Container 的虚拟沙箱环境中,App Container 可以保证应用安全性,但同时也阻止了网络流量发送到本机(即 loopback), 使大部分网络抓包调试工具无法对 UWP 应用进行流量分析。同样的,该机制也阻止了 UWP 应用访问 localhost,即使你在系统设置中启用了代理,也无法令 UWP 应用访问本地代理服务器。

  1. 用clash for windows的话General里面有个UWP Loopback设置,把所有microsoft开头的都打勾
  2. 下载 fiddler(http://www.telerik.com/fiddler)在下载完成之后,点击左上角的winconfig,之后把所有的microsoft的产品打勾就行

清除Word中多余没用的空格

在“查找和替换”窗口的单击“替换”菜单,然后在查找内容的输入框里面输入^w。在替换为的输入框什么也不要输入,接着点击”全部替换“

Word代码更美观

http://word.wd1x.com/
复制即可

vscode修改缓存目录

1.右键快捷方式启动程序时添加启动参数的方法——以修改VSCode工作区存储目录…\AppData\Roaming\Code为例

Clash突然所有线路都是timeout

起因是我清理风扇断了主板电源,导致时间不匹配

将时间同步后问题即可解决

github读代码

访问github的时候有没有觉得寻找代码比较麻烦,这个时候其实很简单 只需要你访问github.com/xxx的时候
改成github-vscode.com/xxx
即可直接访问在线vscode编辑器 速度超级快!

解决微软商店打不开

在打开的 “Windows Powershell(管理员)” 窗口中输入以下命令(慎用):

get-appxpackage *store* | remove-Appxpackage

再次安装:

add-appxpackage -register "C:\Program Files\WindowsApps\*Store*\AppxManifest.xml" -disabledevelopmentmode

由于在创建转储期间出错,创建转储文件失败。

1
2
3
4
5
6
7
8
9
10
//按 “Windows 徽标键+X”,启动 “Windows PowerShell (管理员)”,依次执行以下命令:

Dism /Online /Cleanup-Image /ScanHealth

Dism /Online /Cleanup-Image /CheckHealth

DISM /Online /Cleanup-image /RestoreHealth

sfc /SCANNOW

硬盘更改后的权限问题

1
TAKEOWN /F 移动盘名:\* /r

解决JDK14没有jre问题

  • 进入jdk目录
  • 输入bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre

Typora破解激活

Clion控制台乱码

菜单栏 - 帮助(Help) - 编辑自定义VM选项(Edit Custom VM Options)

加上下面这行配置即可

1
-Dfile.encoding=UTF-8

罗技M330鼠标卡顿

我的电脑-右键-管理-控制面板:设备管理器 --通用串行总线控制器–USB根集线字样–右键属性–电源管理–允许计算机关闭此设备节约电源那个勾去掉看看
(有多个USB根集线字样的话都看看有没有电源属性)

VSCODE提示:放弃备份所需要的时间较长

  • Closing the window is taking a bit longer
  • 放弃备份所需要的时间较长

VSCode 1.66 slow, laggy when re-focusing/switching back to editing from another window or program #146737

Note 1: Starting VSCode with code --disable-features=CalculateNativeWinOcclusion doesn’t help at all anymore. It only worked in 1.66 which used Electron 17.2. Since VSCode 1.67 with Electron 17.4 it just doesn’t make any difference whether you add the flag or not.

Note 2: Is there any way for me to reopen this issue? It has been closed by @deepak1556 and now I can’t open it anymore, even if I was the one reporting it in the first place. Please don’t tell me to open another issue… that’s just not a productive way of tracking down and fixing bugs.

Edit: With the CalculateNativeWinOcclusion feature disabled, VSCode can also be closed very fast (almost instantly), same as it always was in previous versions, that popup Closing the window is taking a bit longer... doesn’t appear anymore.

Edit2: The Chromium project added the native window occlusion calculation “feature”, which seems to be causing this issue between v91 (VSCode 1.65.2) and v98 (VSCode 1.66.0) https://blog.chromium.org/2021/12/chrome-windows-performance-improvements-native-window-occlusion.html

Breakpoint hit -> window gets focused -> VS Code freezes for some time

There is a workaround on disabling this option in VS Code Settings.
By doing this u have to live with the fact that the VS Code icon will not blink in the taskbar when the debugger hits a breakpoint
But the Window will also not freeze
image

最终解决问题的方式

ctags改为none (似乎改成ctags.exe解决问题,并没有。。)

解决方式:vivado的设置,增加vscod启动命令(还是会有问题)

D:/Program Files/Microsoft VS Code/Code.exe --disable-features=CalculateNativeWinOcclusion -g [file name]:[line number]

同病相怜的人(评论区):用VSCode代替Vivado的文本编辑器进行编辑

解决VSCode无缘无故卡顿的问题 (并没解决我的问题)

  • 设置搜索框中输入“Search:Follow Symlinks”搜索,将该项之前的复选框√去掉
  • 设置搜索框中输入“Git:Autorefresh”搜索,将该项之前的复选框√去掉
  • 打开Chorme浏览器 -> 设置 ->系统 ->将【启用硬件加速模式】取消勾选即可

2022-12-31

Vivado关联第三方编辑器-Vscode(包括解决打开Vscode卡死的问题)未解决

注意,之前网上很多教程输入的指令是:D:\Microsoft VS Code\Code.exe [file name] [line number],我之前也一直用这个指令没有问题,但是在2022年3月Vscode 1.66版本后(就是增加了本地文件历史记录功能之后的版本),使用以上配置就会出现Vscode卡死的情况,如下图所示。

而上述指令去除[line number]后,一切正常,所以,不要再加[line number]。

最终更新

VScode和Vivado联合设计时VScode卡死,请问如何解决? - 晚起的鸟儿h的回答 - 知乎 https://www.zhihu.com/question/544908819/answer/2647846398

使用cmd /S /k "code -g [file name]:[line number]"解决VsCode卡顿的问题

解决VMWare虚拟机复制粘贴功能失效问题

1
2
3
sudo apt-get autoremove open-vm-tools
sudo apt-get install open-vm-tools
sudo apt-get install open-vm-tools-desktop

Allegro转AD

  1. 任意路径新建一个文件夹,将AD安装路径(x:\ADxx\System)下的这个Allegro2Altium.bat批处理软件和AllegroExportViews.txt这个文本以及需要转换的PCB文件放里面
  2. D:\Cadence\SPB_17.4\tools\bin放入系统环境变量
  3. 打开命令行,输入.\Allegro2Altium.bat .\XXX.brd

PyTorch

win10+MX350显卡+CUDA10.2+PyTorch 安装过程记录 深度学习环境配置

只复制文件夹结构

1
xcopy D:\操作示例\A D:\操作示例\B /T/E

电脑投屏串流到电视

moonlight obs livego

https://github.com/gwuhaolin/livego/blob/master/README_cn.md

https://zhuanlan.zhihu.com/p/520972884

解决VMware虚拟机中Ubuntu 22.04无法联网

解决VMware虚拟机中Ubuntu 22.04无法联网, 安装VMwareTools失败,未发现软件包open-vm-dkms,open-vm-tools问题解决

1
2
3
sudo service NetworkManager stop 
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo service NetworkManager start

为什么在WIN10系统下 内网文件共享(FTP或者SMB)传输速度那么慢?

1
2
netsh int tcp set global autotuninglevel=restricted
netsh interface tcp set heuristics disabled

重复文件搜索

打开Everything,输入sizedupe: size:>10mb doc:

Clash service

  1. 无法安装 Service Mode
  2. Service Mode 使用 WinSW 3.x

Win10系统怎么把蓝牙及其多余不用的设备数据彻底清理干净

Matlab工具箱安装不上

下载离线安装包ISO,里面有所有的工具箱安装

移动硬盘获取权限

NTFS读写权限 管理员执行

1
TAKEOWN /F 移动盘名:\* /r

Process Lasso开机会弹hosts被破坏的弹窗解决方法

用火绒自定义规则防护,阻止Process Lasso对hosts的读取。

具体操作

  • 火绒-防护中心-高级防护-自定义防护-添加规则
  • 发起程序以默认安装位置举例C:\Program Files\Process Lasso\*
  • 保护对象:C:\WINDOWS\system32\drivers\etc\hosts
  • 创建读取删除修改都可以勾上

Github Desktop for Linux

1
bash -c "$(curl -fsSL https://raw.githubusercontent.com/kontr0x/github-desktop-install/main/installGitHubDesktop.sh)"

win11花屏问题

不是所有应用都花屏,个别应用花屏,当把鼠标移动上去,花屏消失,显示正常

英伟达控制面板 --管理3D设置–图像锐化
关闭图像锐化
如果还没解决,就恢复默认,重启

作者

GWJ

发布于

2021-02-20

更新于

2024-01-31

许可协议

评论